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

Re: [soaplite] Working with complex return datatypes

Expand Messages
  • Duncan Cameron
    ... Hi Peter I wonder what the producers of the message mean by having the answer element defined as an array of strings but each child element having
    Message 1 of 4 , Feb 18, 2005
    • 0 Attachment
      At 2005-02-18, 07:48:51 Peter Mayr <mayr@...> wrote:

      >Hi Duncan,
      >
      >> You seem to have a mismatch between defining the answer element as
      >>an
      >> array, SOAP-ENC:arrayType="xsd:string[2]", and wanting to see the
      >> result as a hash.
      >> If you remove the SOAP-ENC:arrayType attribute then S::L will
      >> deserialise answer as a blessed hash with the element names source
      >>and
      >> format.
      >Thanks for your reply..
      >Unfortunately, since I am writing only the client I have no control
      >over
      >how the data is sent.. ;-(
      >
      >So I guess I have to live with it?
      >
      Hi Peter

      I wonder what the producers of the message mean by having the answer
      element defined as an array of strings but each child element having
      different element names. To my (simplistic) view this seems
      inconsistent.
      i.e. why do the dc:source and dc:format elements have different names
      if they are meant to be simply entries of an array?
      Really, the element names should not be significant, rather their
      position in the sequence is what is significant.

      <answer
      xsi:type="namesp2:AnswerElement" SOAP-ENC:arrayType="xsd:string[2]">
      <dc:source xsi:type="xsd:string">sourceA</dc:source>
      <dc:formatxsi:type="xsd:string">formatA</dc:format>
      </answer>

      However you might be able to get around this by writing a custom
      deserialiser for the AnswerElement type, but I cannot see any examples
      of how to do that.

      Duncan








      ___________________________________________________________
      ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.