cristianekw has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know if already exists a library that creates a perl object (or a tree structure) from a xml soap response containing a complex object? This xml soap response is inside a file.
  • Comment on Creating a perl object from a xml response

Replies are listed 'Best First'.
Re: Creating a perl object from a xml response
by perrin (Chancellor) on Jan 09, 2008 at 13:34 UTC
      XML::Simple didn't get the multiRef information... :(

      In complex xml response, we could have:
      <ns1:list> <listReturn ... soapenc:arrayType="ns1:obj[2]"> <item href="#id0" /> <item href="#id1" /> </listReturn> </ns1:list> <multiRef id="id1" ...> <myId xsi:type="soapenc:long" xsi:nil="1" /> </multiRef>
        Well, I have no idea what that's supposed to do, but I'd suggest you either change your SOAP service to give a simpler response or pre-process the XML before handing it to XML::Simple. (Or post-process the resulting perl data.)