#!/usr/bin/perl -w BEGIN { my $use_lib = "use lib qw[ /usr/lib/perl5/ /usr/lib/perl5/site_perl/5.8.5/ /usr/lib/perl5/site_perl/5.8.5/SOAP/ ]"; eval $use_lib; } use SOAP::Lite +trace => qw( all ); use SOAP::Transport::HTTP; my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalAddr=>'localhost', LocalPort=>8001, listen=>5); $daemon -> dispatch_to('Hello::hello'); print "Contact SOAP server at ", $daemon->url, "\n"; $daemon->handle(); #### package Hello; sub hello { shift; return "Hello " . shift; } #### #!/usr/bin/perl -w BEGIN { my $use_lib = "use lib qw[ /usr/lib/perl5/ /usr/lib/perl5/site_perl/5.8.5/ /usr/lib/perl5/site_perl/5.8.5/SOAP/ ]"; eval $use_lib; } use SOAP::Lite +trace => qw( all ); my $client = SOAP::Lite->new(); $client->uri('urn:Hello'); $client->proxy('http://localhost:8001'); my $som = $client->hello("Herong"); my $output = $som->result; print $output . "\n"; #### SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () SOAP::Serializer::envelope: () Use of uninitialized value in join or string at /usr/lib/perl5/site_perl/5.8.5//SOAP/Lite.pm line 2826. at /usr/lib/perl5/site_perl/5.8.5//SOAP/Lite.pm line 2826 SOAP::Trace::defaultlog('Client', 'Application failed during request deserialization: \x{a}no elemen...', 'undef', 'http://localhost.localdomain:8001/') called at /usr/lib/perl5/site_perl/5.8.5//SOAP/Lite.pm line 1550 SOAP::Serializer::envelope('SOAP::Serializer=HASH(0x9cd5dd0)', 'fault', 'Client', 'Application failed during request deserialization: \x{a}no elemen...', 'undef', 'http://localhost.localdomain:8001/') called at /usr/lib/perl5/site_perl/5.8.5//SOAP/Lite.pm line 746 SOAP::Serializer::__ANON__[/usr/lib/perl5/site_perl/5.8.5//SOAP/Lite.pm:746]('SOAP::Serializer=HASH(0x9cd5dd0)', 'Client', 'Application failed during request deserialization: \x{a}no elemen...', 'undef', 'http://localhost.localdomain:8001/') called at /usr/lib/perl5/site_perl/5.8.5//SOAP/Lite.pm line 2802 SOAP::Server::make_fault('SOAP::Transport::HTTP::Daemon=HASH(0x9e7fd8c)', 'Client', '') called at /usr/lib/perl5/site_perl/5.8.5//SOAP/Transport/HTTP.pm line 399 SOAP::Transport::HTTP::Server::make_fault('SOAP::Transport::HTTP::Daemon=HASH(0x9e7fd8c)', 'Client', '') called at /usr/lib/perl5/site_perl/5.8.5//SOAP/Lite.pm line 2786 SOAP::Server::handle('SOAP::Transport::HTTP::Daemon=HASH(0x9e7fd8c)', '## SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x89daa44) SOAP::Transport::HTTP::Client::send_receive: POST http://localhost:8001 HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 451 Content-Type: text/xml; charset=utf-8 SOAPAction: "urn:Hello#hello" Herong SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x8b4387c) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error Date: Thu, 11 Jun 2009 07:03:27 GMT Server: libwww-perl-daemon/5.826 Content-Length: 692 Content-Type: text/xml; charset=utf-8 Client-Date: Thu, 11 Jun 2009 07:03:27 GMT Client-Peer: 127.0.0.1:8001 Client-Response-Num: 1 SOAPServer: SOAP::Lite/Perl/0.710.07 soap:ClientApplication failed during request deserialization: no element found at line 1, column 0, byte -1 at /usr/lib/perl5/site_perl/5.8.5//i386-linux-thread-multi/XML/Parser.pm line 185 http://localhost.localdomain:8001/ SOAP::Deserializer::deserialize: ()