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

Re: [soaplite] SOM result method yields 0

Expand Messages
  • Duncan Cameron
    ... Not sure what you mean here. $som- result() will return the value of the first element within the method element. In your case that is the errorCode
    Message 1 of 3 , Oct 10, 2003
    • 0 Attachment
      At 15:20:00 on 2003-10-10 bjbarleyjuice <bjbarleyjuice@...> wrote:

      >Greetings,
      >I apologise if wrong but I think I've been through the messages and
      >don't find this. I get a response (array of arrays that contain refs)
      >envelope that gives no hint of error but seems not to generate
      >a 'good' SOM (i.e. $som->result returns 0).

      Not sure what you mean here.
      $som->result() will return the value of the first element within the method
      element. In your case that is the errorCode element which does indeed have a
      value of 0.

      >Looking for clues (and referring to flying dragon pg.333) I try to
      >create a SOAP::SOM using the response envelope and get Perl
      >error: "Can't use string ("<?xml version="1.0" encoding="UT") as an
      >ARRAY ref while "strict refs" in use at c:\perl580
      >\site\lib/SOAP/Lite.pm line 376, <XML> line 1".

      If you want to create a SOM from some XML you need to do it like this:

      my $som = SOAP::Deserializer->deserialize($xml);

      You can then use the match(), valueof(), dataof() etc. methods to extract
      specific elements.

      Regards
      Duncan
    Your message has been successfully submitted and would be delivered to recipients shortly.