title: SOAP::Lite (WSDL) Response not correct deserialized (References)
body: <p>i have a problem with a SOAP-Response an i hope someone can help me.</p>
  
  <p>I think something went wrong, when the SOAP-Response is deserialized by the SOAP::Lite Module. In the SOAP-Response are some "normal" Nodes and referenced Nodes. But non of it where correct deserialized.</p>
  
  <p><strong>SOAP-Response:</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;SOAP-ENV:Body&gt;
  &lt;ns1:SOAP_GetFirmenlisteResponse xmlns:ns1="http://www.4d.com/namespace/default"&gt;
      &lt;ERRORNUM xsi:type="xsd:int"&gt;0&lt;/ERRORNUM&gt;
      &lt;ERRORTEXT xsi:type="xsd:string"&gt;
  &lt;/ERRORTEXT&gt;
      &lt;LISTE_KDLF_NR_ALS_IDS href="#ref-1"/&gt;  &lt;LISTE_SUCHNAMEN href="#ref-2"/&gt;    &lt;LISTE_LFD_NR href="#ref-3"/&gt;   &lt;LISTE_TIMESTAMP_GEAENDERT href="#ref-4"/&gt;  &lt;LISTE_TIMESTAMP_ERZEUGT href="#ref-5"/&gt;
  &lt;/ns1:SOAP_GetFirmenlisteResponse&gt;
  &lt;SOAP-ENC:Array id="ref-1" SOAP-ENC:arrayType="xsd:string[4]"&gt;
  &lt;item1&gt;19288&lt;/item1&gt;
  &lt;item2&gt;19289&lt;/item2&gt;
  &lt;item3&gt;60107&lt;/item3&gt;
  &lt;item4&gt;71897&lt;/item4&gt;
  &lt;/SOAP-ENC:Array&gt;
  &lt;SOAP-ENC:Array id="ref-2" SOAP-ENC:arrayType="xsd:string[4]"&gt;
  &lt;item1&gt;Blabla1&lt;/item1&gt;
  &lt;item2&gt;Blabla2&lt;/item2&gt;
  &lt;item3&gt;Bla München&lt;/item3&gt;
  &lt;item4&gt;Blaürm BÄR&lt;/item4&gt;
  &lt;/SOAP-ENC:Array&gt;
  &lt;SOAP-ENC:Array id="ref-3" SOAP-ENC:arrayType="xsd:int[4]"&gt;
  &lt;item1&gt;-8423&lt;/item1&gt;
  &lt;item2&gt;-8426&lt;/item2&gt;
  &lt;item3&gt;-8425&lt;/item3&gt;
  &lt;item4&gt;-8428&lt;/item4&gt;
  &lt;/SOAP-ENC:Array&gt;
  &lt;SOAP-ENC:Array id="ref-4" SOAP-ENC:arrayType="xsd:string[4]"&gt;
  &lt;item1&gt;2015-11-23T09:32:23&lt;/item1&gt;
  &lt;item2&gt;2015-11-26T14:55:52&lt;/item2&gt;
  &lt;item3&gt;2015-11-26T08:07:26&lt;/item3&gt;
  &lt;item4&gt;2015-11-27T09:26:25&lt;/item4&gt;
  &lt;/SOAP-ENC:Array&gt;
  &lt;SOAP-ENC:Array id="ref-5" SOAP-ENC:arrayType="xsd:string[4]"&gt;
  &lt;item1&gt;2015-11-23T09:30:54&lt;/item1&gt;
  &lt;item2&gt;2015-11-26T14:52:06&lt;/item2&gt;
  &lt;item3&gt;2015-11-25T10:33:27&lt;/item3&gt;
  &lt;item4&gt;2015-11-27T09:24:05&lt;/item4&gt;
  &lt;/SOAP-ENC:Array&gt;
  &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p><strong>Dump of Result Hash:</strong></p>
  
  <pre><code>$VAR1 = {
            'ARRAY(0x2c16e08)' =&gt; undef,
            '0' =&gt; '',
            'ARRAY(0x2f42168)' =&gt; [
                                    'Blabla1',
                                    'Blabla2',
                                    "Bla M\x{fc}nchen",
                                    "Bla\x{fc}rm B\x{c4}R"
                                  ],
            'ARRAY(0x2f39680)' =&gt; [
                                    '2015-11-23T09:32:23',
                                    '2015-11-26T14:55:52',
                                    '2015-11-26T08:07:26',
                                    '2015-11-27T09:26:25'
                                  ]
          };
  </code></pre>
  
  <p><strong>Perl Code:</strong></p>
  
  <pre><code>#!/usr/bin/perl
  
  use Data::Dumper;
  use SOAP::Lite +trace =&gt; [ transport =&gt; \&amp;log_message ];
  
  sub log_message {
     my ($in) = @_;
     my ($cont) = $in-&gt;content;
     $cont =~ s/&gt;&lt;/&gt;\n&lt;/g;
     print "\n-------------------------------------------------\n";
     print $cont;
     print "\n-------------------------------------------------\n";
  }
  
  my $soap    = SOAP::Lite-&gt;service('http://192.168.0.13:8181/4dwsdl');
  
  $soap-&gt;envprefix('SOAP-ENV');
  $soap-&gt;encprefix('SOAP-ENC');
  $soap-&gt;soapversion('1.1');
  
  
  my %result  = $soap-&gt;SOAP_GetFirmenliste(
                                      '00',
                                      'SOAPTest',
                                      'soaptest',
                                      '0000-00-00',
                                      '2015-10-01'
                                      );
  
  print Dumper(\%result);
  
  
  exit 0;
  </code></pre>