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

4301How to parse "multiRef" style responses...?

Expand Messages
  • Paul Harman
    Jan 7, 2005
    • 0 Attachment
      I'm getting the following response back from an Apache AXIS service:

      <alienKeys href="#id0"/>
      <multiRef id="id0" soapenc:root="0"
      <item href="#id1"/>
      <item href="#id2"/>
      <multiRef id="id1" soapenc:root="0"
      xsi:type="ns3:StringPair" xmlns:ns3="urn:Grapevine"
      <name xsi:type="xsd:string">Press.Net Content ID</name>
      <value xsi:type="xsd:string">672835</value>
      <multiRef id="id2" soapenc:root="0"
      xsi:type="ns4:StringPair" xmlns:ns4="urn:Grapevine"
      <name xsi:type="xsd:string">Press.Net Product ID</name>
      <value xsi:type="xsd:string">669961</value>

      What I want to get out of that is a hash:

      Press.Net Content ID => 672835
      Press.Net Product ID => 669961

      I've tried using $response->dataof("//multiRef/*") and so on to try and
      extract the fields I want (since this has been successful elsewhere) but
      with no luck. Maybe I was doing it all wrong.

      If anyone has any ideas, please let me know... even if it's to tell me how I
      can get the raw XML response so I can write my own regular-expression based



      This E-Mail and any attachment is intended only for the person or entity for
      which it is addressed and may contain confidential material. If you are not
      the addressee or have received this E-Mail in error, please inform the
      sender immediately and delete it from your computer. In addition, if you are
      not the addressee or have received this E-Mail in error, any disclosure,
      copying, distribution or any action taken or omitted to be taken in reliance
      upon it is prohibited and may be unlawful.
      If this E-Mail has been transmitted outside the ordinary course of its
      business, the company for which the sender works accepts no liability for
      any loss or damage suffered by any person arising from any use of or
      reliance on information contained in this E-Mail, and any opinion expressed
      in this E-Mail is personal to the sender and may not reflect the opinion of
      such company. Although the network operator makes every reasonable effort to
      keep its network free from viruses, neither the network operator nor the
      sender or the company for which the sender works accepts any responsibility
      for computer viruses transmitted through this E-Mail or any attachments; it
      is your responsibility to virus scan this E-Mail and any attachments. Any
      E-Mail reply to this address may be subject to interception or monitoring
      for operational reasons or for lawful business practices.
    • Show all 2 messages in this topic