> Also, I am attaching the soap response. It looks like the problem is due to the namespace of each array element.Namespaces are defined properly for the top level elements array  but for the recursive elements, namespace is empty.
 
Yes, correct.  If the namespace on the XML does not agree with what .NET is expecting, .NET will deserialize nothing.   So you get null for the children.   
 

 

From: Praveen Peddi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 16, 2005 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: array of recursive beans (doc/literal style)

Thanks for the response Dino.
I am using Axis rc1.2 nightly build from Feb 8th.
I think you are right regarding desinging the interfaces. Its better to work on WSDL and schema before working on java code but I have all the java classes built. These are not new services. I have all these services for long time and everything was working great until I moved to doc/literal style. I was using rpc/encoded style before.
 
I looked at the WSDL generated by Axis and it looked fine to me. May be somone can look at my WSDL and see where it is wrong. Two elements that need to look at are:
     <complexType name="ArrayOf_tns1_ContainerBean">
     <sequence>
  <element maxOccurs="unbounded" minOccurs="0" name="item" type="tns1:ContainerBean" />
  </sequence>
</complexType>
 
AND
 
     <element name="getRootContainersResponse">
    <complexType>
    <sequence>
  <element maxOccurs="unbounded" name="item" type="tns1:ContainerBean" />
  </sequence>
  </complexType>
</element>
 
Both have the right definitions for array of beans. Looks like getRootContainerResponse defines namespace properly but not the ArrayOf_tns1_ContainerBean (look at the soap response file).
 
Also, I am attaching the soap response. It looks like the problem is due to the namespace of each array element.Namespaces are defined properly for the top level elements array  but for the recursive elements, namespace is empty.
 
Any help is appreciated.
 
Thanks
Praveen
 

Reply via email to