Hello, perl 5.18.2 SOAP::Lite 1.11 I'm trying to use SOAP::Lite to deserialize its own output, but I get an exception. Can someone please suggest how I might change the serializer or deserializer to resolve this issue. Solutions that are likely to be compatible with other SOAP desierializers are preferred. Thank you!
$ cat test.pl use strict; use warnings; use SOAP::Lite; print "\$SOAP::Lite::VERSION: $SOAP::Lite::VERSION\n"; my $writer = SOAP::Serializer->new(); my $fault = SOAP::Fault->new(faultcode => "Server"); my $content = $writer->envelope(fault => $fault); print $content, "\n"; eval { SOAP::Deserializer->deserialize($content); }; if ($@) { print "Deserialize failed: $@"; } $ perl test.pl $SOAP::Lite::VERSION: 1.11 Use of uninitialized value in join or string at /home/vagrant/perl5/pe +rlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm line +520. Use of uninitialized value in join or string at /home/vagrant/perl5/pe +rlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm line +520. Use of uninitialized value in join or string at /home/vagrant/perl5/pe +rlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm line +520. Argument "Server: " isn't numeric in sprintf at /home/vagrant/perl5/pe +rlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm line +1033. Use of uninitialized value $name in substitution (s///) at /home/vagra +nt/perl5/perlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Li +te.pm line 1100. Use of uninitialized value $name in exists at /home/vagrant/perl5/perl +brew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm line 11 +01. Use of uninitialized value $name in hash element at /home/vagrant/perl +5/perlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm l +ine 1101. Use of uninitialized value $name in hash element at /home/vagrant/perl +5/perlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm l +ine 1105. Use of uninitialized value $name in hash element at /home/vagrant/perl +5/perlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm l +ine 1105. Use of uninitialized value in join or string at /home/vagrant/perl5/pe +rlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm line +520. Argument "Server: " isn't numeric in sprintf at /home/vagrant/perl5/pe +rlbrew/perls/perl-5.18.2-fPIC/lib/site_perl/5.18.2/SOAP/Lite.pm line +1033. <?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyl +e="http://schemas.xmlsoap.org/soap/encoding/" xmlns:namesp1="http://n +amespaces.soaplite.com/perl" xmlns:soap="http://schemas.xmlsoap.org/s +oap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encodin +g/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://ww +w.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode x +si:type="namesp1"><_faultcode xsi:type="xsd:string">Server</_faultcod +e></faultcode><faultstring xsi:nil="true" /></soap:Fault></soap:Body> +</soap:Envelope> Deserialize failed: Unspecified namespace for type 'namesp1'

In reply to Why can't SOAP::Lite deserialize its own output? by Anonymous Monk

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.