Tutorial Addendum on Perl - Allotment B - RPC::XML Bore

 31 December 18:00   

    



    



    

Installing NMake 1.5

    



    

Based on the documation, the accession action of RPC::XML bore requires the "make" utility.

    

Since I am using a Windows arrangement now, so I charge to download a "make" account for Windows.

    

John Bokma has accounting a nice apprenticeship on how to download and install Microsoft NMake at:

    

http://johnbokma.com/perl/make-for-windows.html. I acclimated the afterward accomplish to install NMake 1.5

    

on my bounded machine.

    



    

1. Download nmake15.exe at: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084

    



    

2. Bifold bang on nmake15.exe. It will accomplish 3 files: nmake.exe, nmake.err and readme.txt.

    



    

3. Archetype nmake.exe and nmake.err to perlin, which is area ActivePerl executable files are

    

located.

    



    

4. Now try the nmake command in a command window. If you see the afterward message, NMake 1.5

    

is installed correctly:

    

 

    

>nmake

    

Microsoft (R) Program Aliment Account Adaptation 1.50

    

Copyright (c) Microsoft Corp 1988-94. All rights reserved.

    

NMAKE : baleful absurdity U1064: MAKEFILE not begin and no ambition specified

    

Stop.

    



    



    



    

Installing RPC::XML Module

    



    

With NMake installed, now I am accessible to install RPC::XML. Actuality is what I did:

    



    

1. Go to http://www.blackperl.com/RPC::XML/ to apprehend the addition of RPC::XML.

    



    

2. Download RPC-XML-0.57.tar.gz from http://search.cpan.org/search?dist=RPC-XML.

    



    

3. Abstract RPC-XML-0.57.tar.gz with WinZIP 8.1 to RPC-XML-0.57.

    



    

4. Now use NMake to install RPC::XML in a command window as apparent below:

    

 

    

>cd RPC-XML-0.57

    

>perl Makefile.PL

    

......

    

Writing Makefile for RPC::XML

    

>nmake test

    

......

    

t30_method.........ok

    

t40_server.........ok

    

>nmake install

    

......

    

Writing PerlsitelibautoRPCXML.packlist

    

Appending accession advice to Perllib/perllocal.pod

    



    



    

5. Now run the afterward command in a command window to analysis the installation.

    

If you don t see any absurdity messages, RPC::XML bore is installed correctly.

    

 

    

>perl -e "use RPC::XML;"

    



    



    

Please do not annul the .tar book afterwards installation. It contains some very

    

interesting files. There are some testing programs in the "t" directory. All

    

server ancillary absence methods are authentic in the "methods" directory.

    



    

RPC::XML Server and Applicant Sample Programs

    



    

To analysis RPC::XML, I wrote the afterward the sample server program,

    

RpcXmlServer.pl:

    

 

    

#- RpcXmlServer.pl

    

#- Absorb (c) 2005 by Dr. Yang

    

#

    

use RPC::XML;

    

use RPC::XML::Server;

    

my $host = "localhost";

    

my $port = "8001";

    

my $daemon = RPC::XML::Server->new(host => $host, anchorage => $port);

    

#

    

book "Adding com..hello...
";

    

$daemon->add_method({ name => com..hello ,

    

signature => [ cord ],

    

cipher => sub {return "Hello world!";} });

    

#

    

book "Adding com..getCelsius...
";

    

my @sig = ( bifold , bifold bifold );

    

$daemon->add_method({ name => com..getCelsius ,

    

signature => @sig, cipher => &getCelsius });

    

#

    

book "Adding com..getInfo...
";

    

$daemon->add_method({ name => com..getInfo ,

    

signature => [ arrangement ], cipher => &getInfo });

    

#

    

book "Listening at $host:$port...
";

    

$daemon->server_loop();

    

#

    

sub getCelsius {

    

my $s = shift; # The first constant is the server object

    

my $f = shift;

    

$f = 0.0 unless $f;

    

book "getCelsius alleged with ".$f."...
";

    

acknowledgment ($f-32.0)/1.8;

    

}

    

#

    

sub getInfo {

    

my @info = ("Author"," Yang", "Version", "2005");

    

acknowledgment @info;

    

}

    



    

 


Tags: files, download, windows, server, microsoft, install, window, installed, signature, method, command, adding, print

 nmake, server, daemon, getcelsius, install, print, command, method, download, installation, module, following, getinfo, double, signature, utility, adding, makefile, files, window, installed, microsoft, windows, , rpc xml, xml module, daemon add, name com, adding com, xml server, command window, print adding,

Share Tutorial Addendum on Perl - Allotment B - RPC::XML Bore:
Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

Permalink
Article In : Computers & Technology  -  perl