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

Re: [soaplite] Accessing Array in result

Expand Messages
  • Mental Patient
    ... Actually, depending on how things are encoded, he may need $r- paramsout or maybe $r- paramsall. It depends on how the result(s) are being returned. The
    Message 1 of 3 , Aug 19, 2003
    • 0 Attachment
      Duncan Cameron wrote:
      > At 02:35:00 on 2003-08-18 jcraig949 <jcraig949@...> wrote:
      >
      >
      >>New to both SOAP and perl and having trouble getting the array
      >>values out of the below result (and dump). Could someone show me
      >>the syntax for getting the two items into an array variable?
      >>
      >><soapenv:Body>
      >> <ns1:sayHelloResponse
      >>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      >>xmlns:ns1="urn:Hello">
      >> <ns1:sayHelloReturn xsi:type="soapenc:Array"
      >>soapenc:arrayType="ns2:string[2]"
      >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      >>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      >>xmlns:ns2="http://www.w3.org/2001/XMLSchema">
      >> <item>Hell</item>
      >> <item>Watches</item>
      >> </ns1:sayHelloReturn>
      >> </ns1:sayHelloResponse>
      >></soapenv:Body>
      >>
      >
      > It's usually useful to provide an example of what you've tried already.
      > I don't know how you're accessing SOAP::Lite but something like this
      > should work:
      >
      > my $s = SOAP::Lite->proxy(...) etc.
      >
      > my $r = $s->somesub();
      >
      > my @items = @{$r->result};
      >
      >

      Actually, depending on how things are encoded, he may need
      $r->paramsout or maybe $r->paramsall. It depends on how the
      result(s) are being returned. The perldoc has a fairly decent
      explanation once you know where to look.

      --

      Mental (Mental@...)

      "The Torah... The Gospels... The Koran...
      Each claimed as the infallible word of GOD.
      Misquoted, misinterpreted, misunderstood, and misapplied.
      Maybe that's why he doesn't do any more interviews." - sinfest.net

      CARPE NOCTEM, QUAM MINIMUM CREDULA POSTERO.

      GPG public key: http://www.neverlight.com/pas/Mental.asc
    Your message has been successfully submitted and would be delivered to recipients shortly.