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

Re: [soaplite] Empty results with SOAP::Lite - why?

Expand Messages
  • Patrick Schoenfeld
    Hi Joe, ... thanks for enlightening me. I guess I need to learn more about SOAP basics, obviously. ... Yeah, so far I understood it. I missed that part from
    Message 1 of 6 , Jul 27, 2009
    • 0 Attachment
      Hi Joe,

      On Mon, Jul 27, 2009 at 11:56:56AM -0400, Joe Hourcle wrote:
      > Normally, with RPC-encoded, the response is a struct, not a string, so
      > inside the SOAP body, you'd see something like:
      >
      > <versionResponse>
      > <version xsi:type="xsd:string> ... </version>
      > </versionResponse>

      thanks for enlightening me. I guess I need to learn more about SOAP
      basics, obviously.

      > As for the 'result()' comment from earlier -- unless you're using
      > autodispatch, SOAP::Lite returns a SOAP::SOM object, not the
      > response, so you'd have to call result() on the object to get the
      > value.

      Yeah, so far I understood it. I missed that part from the paste-
      After the commment would have been the following line:

      print $ver->result, "\n";

      > (in your case, I gave it a quick test, and it came up empty -- I was
      > able to call 'body' on it, and got back:
      >
      > { 'versionResponse' => '0.1.2066' }

      Ah, so this is specific to the encoding of the SOAP data, as you
      said above. So I will now investigate a bit, if there are possible
      settings to change that behaviour (although its probably okay
      to access data this way - just out of interest).

      Best Regards,
      Patrick
    • Joe Hourcle
      ... It s not an issue with SOAP, it s an issue with RPC/encoded. It s possible that it s allowed in document/literal. I still use RPC/encoded for everything,
      Message 2 of 6 , Jul 27, 2009
      • 0 Attachment
        On Mon, 27 Jul 2009, Patrick Schoenfeld wrote:

        > Hi Joe,
        >
        > On Mon, Jul 27, 2009 at 11:56:56AM -0400, Joe Hourcle wrote:
        >> Normally, with RPC-encoded, the response is a struct, not a string, so
        >> inside the SOAP body, you'd see something like:
        >>
        >> <versionResponse>
        >> <version xsi:type="xsd:string> ... </version>
        >> </versionResponse>
        >
        > thanks for enlightening me. I guess I need to learn more about SOAP
        > basics, obviously.

        It's not an issue with SOAP, it's an issue with RPC/encoded. It's
        possible that it's allowed in document/literal. I still use RPC/encoded
        for everything, so I'm not sure.


        > Ah, so this is specific to the encoding of the SOAP data, as you
        > said above. So I will now investigate a bit, if there are possible
        > settings to change that behaviour (although its probably okay
        > to access data this way - just out of interest).

        So long as the service doesn't change their response format, it should be
        fine. I guess it's possible for later SOAP specs to change things, but
        the only issue I've ever had to deal with was how nulls were serialized.

        -Joe
      Your message has been successfully submitted and would be delivered to recipients shortly.