Loading ...
Sorry, an error occurred while loading the content.

Returning a hash reference

Expand Messages
  • dlaulusa
    I am calling a server procedure that returns a hash reference. It works fine when I call the procedure locally. However, bad things happen when I use SOAP.
    Message 1 of 1 , Feb 7, 2007
    • 0 Attachment
      I am calling a server procedure that returns a hash reference. It
      works fine when I call the procedure locally. However, bad things
      happen when I use SOAP.

      Here is the xml snippet of the response from the trace:

      <item>
      <key xsi:type="xsd:string">http://%20%20%20www.disneychannel.com/</key>
      <value xsi:type="xsd:int">1144299297</value>
      </item>

      Which is what I would expect for this hash reference, the key is a
      string and the value is a number. And there was only one key-value pair.

      Client side code snippet:

      my $soap_response = $soap->get_urls();
      my $url_ref = $soap_response->result();

      However $soap_response is undef, so, obviously, I can't get a result.

      I've returned a scalar, an array reference and multiple scalars from a
      soap server before and it worked just fine. Do I have to do anything
      special for a hash reference?

      Let me know any other info I need to post. Thanks.

      David


      Here's the entire return trace from the server:

      SOAP::Transport::TCP::Client::send_receive:
      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:apachens="http://xml.apache.org/xml-soap"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
      <namesp2:get_urlsResponse xmlns:namesp2="urn:/NewtonContent">
      <s-gensym6 xsi:type="apachens:Map">
      <item>
      <key xsi:type="xsd:string">http://%20%20%20www.disneychannel.com/</key>
      <value xsi:type="xsd:int">1144299297</value>
      </item>
      </s-gensym6>
      </namesp2:get_urlsResponse>
      </SOAP-ENV:Body></SOAP-ENV:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()
    Your message has been successfully submitted and would be delivered to recipients shortly.