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

5529Setting arrayType on arrays of complex types

Expand Messages
  • Andrew Bayliss
    Aug 8, 2006
      I have a SOAP call that returns an array of a complex type. I had some
      trouble getting this work with .NET clients as the soapenc:arrayType
      was always being set to xsd:anyType[n], altho the xsi:type was being
      correctly set to the type I defined as being an array of my complex
      type. I got around this by blessing an array ref into the name of my
      type, then adding a function to SOAP::Serializer to add the correct
      type attribute to this blessed ref, which also seems to correctly set
      the arrayType.

      The problem occurs when the underlying method returns no data: the
      arrayType is again set to anyType[0] (which makes sense, as there's no
      blessed refs, therefore my custom serialiser function is never run). I
      know I could do $obj->attr({'soapenc:arrayType' => 'my:type'}), but
      this just seems wrong (plus I then have to manually add in the number
      of array elements rather than letting SOAP::Lite figure it out).

      Is there any "correct way" to set the arrayType on a SOAP::Data object?