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

5841Returning a hash reference

Expand Messages
  • dlaulusa
    Feb 7, 2007
      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:

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

      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.


      Here's the entire return trace from the server:

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:apachens="http://xml.apache.org/xml-soap"
      <namesp2:get_urlsResponse xmlns:namesp2="urn:/NewtonContent">
      <s-gensym6 xsi:type="apachens:Map">
      <key xsi:type="xsd:string">http://%20%20%20www.disneychannel.com/</key>
      <value xsi:type="xsd:int">1144299297</value>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()