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

Re: [soaplite] Question: Controlling XML generation for result - deserialization

Expand Messages
  • Duncan Cameron
    ... Yes, that s right. ... SOAP::Lite doesn t do that. ... You need to iterate throught the SOM that is returned from call() See previous answers to this kind
    Message 1 of 2 , Mar 18, 2004
    View Source
    • 0 Attachment
      At 21:03:51 on 2004-03-17 dcaffey_fl <dcaffey_fl@...> wrote:

      >Thanks in advance to anyone that can answer this question:
      >
      >Assume use of the OO interface.
      >
      >How do I control deserialization of a SOAP response into the
      > $soap->call(...)->result? I'd like to avoid having to override
      >the deserializer and am hoping there's a property that I can set
      >that
      >tells the serializer to use arrays/lists instead of hashes in the
      >case of duplicate keys in a response hash. The problem I'm having
      >is
      >that the XML nodes are coming back with the same names, which is
      >legal, and as SOAP::Lite deserializes and stuffs the data into a
      >hash, the keys are the same and the values in the hash get
      >overwritten and I end with values only for the last XML node that
      >was
      >deserialized.

      Yes, that's right.

      > I would have expected SOAP::Lite to use an array/list
      >and stuff a ref to the list into the hash ie the hash key would
      >correspond to a ref to an array/list.

      SOAP::Lite doesn't do that.

      > I used the ptkdb debugger to
      >poke around in the SOAP::Lite object and found the missing data but
      >as I mentioned above it's not making it into the $soap->call(...)-
      >>result. I'm using XML::Simple's XMLout to generate the final XML
      >but the XML is incorrect because the "$soap->call(...)->result"
      >>that
      >I'm passing to it is incorrect to begin with because of the way the
      >response to the soap call is being deserialized to begin with.

      You need to iterate throught the SOM that is returned from call()

      See previous answers to this kind of question by searching the
      group archives for 'duplicate ', in particular this answer and the rest
      of its thread

      http://groups.yahoo.com/group/soaplite/message/3057

      Regards
      Duncan
    Your message has been successfully submitted and would be delivered to recipients shortly.