I have perl v5.8.5 and SOAP-Lite-0.710.08. Can anybody help me resolving the error that I am getting ? I am getting a error :"SOAP::Serializer::envelope: Client Application failed during request deserialization" while client is trying to call a method on server. ** server code is :
#!/usr/bin/perl -w BEGIN { my $use_lib = "use lib qw[ /usr/lib/perl5/ /usr/lib/perl5/site_per +l/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();
Module Hello.pm is :
package Hello; sub hello { shift; return "Hello " . shift; }
Client code is :
#!/usr/bin/perl -w BEGIN { my $use_lib = "use lib qw[ /usr/lib/perl5/ /usr/lib/perl5/site_per +l/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";
Server side say :
SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () SOAP::Serializer::envelope: () Use of uninitialized value in join or string at /usr/lib/perl5/site_pe +rl/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 r +equest deserialization: \x{a}no elemen...', 'undef', 'http://localhos +t.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 deserializatio +n: \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//SOA +P/Lite.pm:746]('SOAP::Serializer=HASH(0x9cd5dd0)', 'Client', 'Applica +tion failed during request deserialization: \x{a}no elemen...', 'unde +f', 'http://localhost.localdomain:8001/') called at /usr/lib/perl5/si +te_perl/5.8.5//SOAP/Lite.pm line 2802 SOAP::Server::make_fault('SOAP::Transport::HTTP::Daemon=HASH(0 +x9e7fd8c)', 'Client', '') called at /usr/lib/perl5/site_perl/5.8.5//S +OAP/Transport/HTTP.pm line 399 SOAP::Transport::HTTP::Server::make_fault('SOAP::Transport::HT +TP::Daemon=HASH(0x9e7fd8c)', 'Client', '') called at /usr/lib/perl5/s +ite_perl/5.8.5//SOAP/Lite.pm line 2786 SOAP::Server::handle('SOAP::Transport::HTTP::Daemon=HASH(0x9e7 +fd8c)', '<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:x +s...') called at /usr/lib/perl5/site_perl/5.8.5//SOAP/Transport/HTTP. +pm line 387 SOAP::Transport::HTTP::Server::handle('SOAP::Transport::HTTP:: +Daemon=HASH(0x9e7fd8c)') called at /usr/lib/perl5/site_perl/5.8.5//SO +AP/Transport/HTTP.pm line 600 SOAP::Transport::HTTP::Daemon::handle('SOAP::Transport::HTTP:: +Daemon=HASH(0x9e7fd8c)') called at soapserver.pl line 18 SOAP::Serializer::envelope: Client Application failed during request d +eserialization: no element found at line 1, column 0, byte -1 at /usr/lib/perl5/site_p +erl/5.8.5//i386-linux-thread-multi/XML/Parser.pm line 185 http://localhost.localdomain:8001/
Clien side says:
SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x89da +a44) SOAP::Transport::HTTP::Client::send_receive: POST http://localhost:800 +1 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" <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xm +lsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema +" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><hello +xmlns="urn:Hello"><c-gensym3 xsi:type="xsd:string">Herong</c-gensym3> +</hello></soap:Body></soap:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x8b4 +387c) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Ser +ver 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 <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xm +lsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema +" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:F +ault><faultcode>soap:Client</faultcode><faultstring>Application faile +d during request deserialization: no element found at line 1, column 0, byte -1 at /usr/lib/perl5/site_p +erl/5.8.5//i386-linux-thread-multi/XML/Parser.pm line 185 </faultstring><faultactor>http://localhost.localdomain:8001/</faultact +or></soap:Fault></soap:Body></soap:Envelope> SOAP::Deserializer::deserialize: ()
Please help me in resolving this if anybody is having a idea. Thanks in advance.

In reply to SOAP::Serializer::envelope: Client Application failed during request deserialization by pravinIIT

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.