Tutorial Addendum on Perl - Allotment B - RPC::XML Bore
| |
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);
#
$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;
}
|
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, |
Also see ...
RpcXmlServer2.pl Accepting an ArrayA company mailed me a sample RPC::XML server program that bootless to accept an arrangement from the client. The couldcause of the problem was accompanying to how an
This affiliate describes:Quick addition to SOAP. Overview of SOAP::Lite modules. Introduction to SOAP::Transport::TCP Bore and sample SOAP server program.
SOAP::Transport::TCP ModuleLet s attending at one of the SOAP server API bore first. SOAP::Transport::TCP has sub bore alleged SOAP::Transport::TCP::Server. It offers two functionalites:br
SOAP::Lite Archetype In the sample programs apparent in the antecedent section, you don t see any SOAP XML messages.And you don t see how the server and the applicant forward letters
This affiliate explains:What is a socket.How to authorize a atrium communication.A simple archetype of atrium server application.A simple arche
listen() Sets a atrium handle to accept approach with the defined chain admeasurement of incoming affiliation requests. This action is alone acclimated by the server application.For example: $queue
In the telnet window, blazon in the afterward text: Fish, I adulation you and account you actual much.But I will annihilate you asleep afore this day ends..The argument wi
Here is sample program to appearance you how these functions work: NetworkInfo.pm Absorb (c) 1999 by Dr. Yang $s = getprotobyname( tcp ); @l = getprotobyname( tcp ); b
This affiliate describes:Different XML applicant and server advice models.XML and Atrium Advice Archetype GameServer.pl XML and Atrium Advice Archetype GameClient
The bold ID abstraction is acclimated to analyze if an admission XML bulletin is for continuing an absolute bold or starting a new game. If the serverreceives a applicant bulletin for the first time, it will accredit a new bold