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

RE: [soaplite] SOAP-response problems

Expand Messages
  • Thomas Eden
    Stig, Basically, you want to use $som- dataof, but loop through using a numeric reference as opposed to name reference - the trick here is realizing that
    Message 1 of 2 , Oct 10, 2003
    • 0 Attachment
      Stig,

      Basically, you want to use $som->dataof, but loop through using a numeric
      reference as opposed to name reference - the trick here is realizing that
      $som->match('//checkLineResponse/[1]') will match the first element under
      checkLineResponse, whereas
      $som->match('//checkLineResponse/connectionProperties') will match ALL
      connectionProperties elements under checkLineResponse.

      I had posted previously about processing arrays of arrays, which is
      basically what you have here. See messages 3039, 3046-8 and 3050. Thanks to
      Duncan Cameron for his assistance.

      Thom Eden

      > -----Original Message-----
      > From: tisc_swo [mailto:swoxholt@...]
      > Sent: Friday, October 10, 2003 07:25
      > To: soaplite@yahoogroups.com
      > Subject: [soaplite] SOAP-response problems
      >
      >
      > Hi, I have some problems handling the response from a certain
      > SOAP-call. The response contains several elements, and the format is
      > basically as below, though the original response is much more complex.
      >
      > The question is how on earth can i run through this, first handling
      > the 1 connectionProperties element (and all the <item>s beneath this,
      > and then move on. I have managed to get valueof working, looping
      > throught all the <item>s, but when multiple <connectionProperties> are
      > returned, i cans seeme to do this on both <connectionProperties> & <item>.
      >
      > Any help is appreciated......
      >
      > --
      > Stig Woxholt
      >
      >
      >
      >
      > *********************** response format ********************
      > <checkLineResponse>
      > <connectionProperties>
      > <addressInformation>
      > <floor>2</floor>
      > </addressInformation>
      > <elementb>
      > <item>
      > <linestatusCode>100</linestatusCode>
      > <lineStatusText>Testing</lineStatusText>
      > </item>
      > <item>
      > <linestatusCode>101</linestatusCode>
      > <lineStatusText>Testing1</lineStatusText>
      > </item>
      > <item>
      > <linestatusCode>102</linestatusCode>
      > <lineStatusText>Testing2</lineStatusText>
      > </item>
      > </elementb>
      > </connectionProperties>
      > <connectionProperties>
      > <addressInformation>
      > <floor>6</floor>
      > </addressInformation>
      > <elementb>
      > <item>
      > <linestatusCode>100</linestatusCode>
      > <lineStatusText>Testing</lineStatusText>
      > </item>
      > <item>
      > <linestatusCode>101</linestatusCode>
      > <lineStatusText>Testing1</lineStatusText>
      > </item>
      > <item>
      > <linestatusCode>102</linestatusCode>
      > <lineStatusText>Testing2</lineStatusText>
      > </item>
      > </elementb>
      > </connectionProperties>
      > </checkLineResponse>
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.