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

2347Re: passing complex types to axis

Expand Messages
  • msanesh <anesh@hotmail.com>
    Feb 6, 2003
    • 0 Attachment
      This usually means that something is not being passed with the right
      type. Make sure that each element of the array is being passed as the
      right type. It looks like B is not being passed in as type B.

      Also, maptype B to right namespace.

      in your case
      my $b = bless {
      # B members
      } => 'B
      my @a = [$b];

      Hope this helps.
      Anesh.

      --- In soaplite@yahoogroups.com, "somebody8765 <martin.hajduch@a...>"
      <martin.hajduch@a...> wrote:
      > hi !
      >
      > i'm getting following error from axis:
      > <faultstring>org.xml.sax.SAXException: SimpleDeserializer
      > encountered a child element, which is NOT expected, in something it
      > was trying to deserialize.</faultstring>
      >
      >
      > i have a complex type A; which contains array of complex types B
      (as a
      > property called B_array)
      >
      > i'm receiving the complex type A from axis, and trying to pass it
      back
      >
      > in wsdl i can see, that the array of types B is defined like:
      > <complexType name="ArrayOf_tns1_B"><complexContent><restriction
      > base="soapenc:Array"><attribute ref="soapenc:arrayType"
      > wsdl:arrayType="tns1:B
      []"/></restriction></complexContent></complexType>
      >
      > in the soap message to the server, i can read something different:
      >
      > <B_array SOAP-ENC:arrayType="namesp4:B[1]"
      > xsi:type="namesp5:ArrayOf_tns1_B"><item
      xsi:type="namesp4:B"/></B_array>
      >
      > (i left type B empty, to be sure that the problem is not within
      type B)
      >
      > however - when i set B_array property (of type A) to an empty array,
      > it works
      > then i can read in a soap message to the server:
      > <B_array SOAP-ENC:arrayType="xsd:anyType[0]" xsi:type="SOAP-
      ENC:Array"/>
      >
      > i have tried a load of blessing/typemapping - no success
      > i've seen in some messages here, that people are passing complex
      types
      > to axis without any problems
      >
      > does anybody have an idea what i'm doing wrong ?
    • Show all 3 messages in this topic