I just went through the same discussion with Pradeep. 
The steps I followed "just worked". 

Have you checked the archive from last week to see?  His complextype was a 
ContainerBean, which had an array of ContainerBean within it. 

If you send me the WSDL I can have a look at it. 


-----Original Message-----
From: Gilles Devaux [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 24, 2005 12:48 AM
To: [email protected]
Subject: RE: Problem deserializing arrays of complex types

Hi,

Just an update to say that de deserialization works with the server implemented 
in Axis 1.1 and the client generated with the .NET framework (whereas the AXIS 
1.1 and Axis 1.2RC2 clients don't) and so I still don't understand where the 
problem is.

Thanks


-----Message d'origine-----
De : Gilles Devaux [mailto:[EMAIL PROTECTED] Envoy� : lundi 21 f�vrier 2005 
14:21 � : [email protected] Objet : Problem deserializing arrays of 
complex types

Hi,
 
First of all sorry if this subject has already been treated before but I can't 
find my answer in the archives.
 
I have a problem while deserializing arrays with AXIS 1.1. The serialized 
message (SOAP) is correct but the other way gives me the following exception:

Could not convert LinkType to bean field routeManeuvers[1]', type ManeuverType 
(see WSDL for type definition)

The thing is that I have list of lists with complex types elsewhere in the WSDL 
but this one is not working, here is the XSD (relevant part) contained in my 
WSDL file.
 
<xs:complexType name="DetermineRouteResponseType">
  <xs:sequence>
    <xs:element name="RouteManeuvers" type="w:ManeuverType" minOccurs="0" 
maxOccurs="unbounded"/>
    <xs:element..../>
  <xs:sequence>
</xs:complexType>

<xs:complexType name="ManeuverType">
  <xs:sequence>
    <xs:element name="Places" type="w:PlaceType" minOccurs="0" 
maxOccurs="unbounded"/>
    <xs:element name="Geometry" type="w:ConnectedLinksType"
minOccurs="0"/>
  <xs:sequence>
</xs:complexType>

<xs:complexType name="ConnectedLinksType">
  <xs:sequence>
    <xs:element name="Links" type="w:LinkType" minOccurs="0" 
maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="type" use="optional">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="Intersection"/>
        <xs:enumeration value="RoundAbout"/>
        <xs:enumeration value="EnclosedTrafficArea"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
</xs:complexType>

<xs:complexType name="LinkType">
  <xs:sequence>
    <xs:element name="InterLinkAngle" type="w:AngleType" minOccurs="0"/>
    <xs:element name="PositionOnRoundabout" type="w:AngleType" minOccurs="0"/>
    <xs:element name="Length" type="w:DistanceType" minOccurs="0"/>
  </xs:sequence>
  <xs:attribute name="type" type="xs:string" use="optional"/>
  <xs:attribute name="id" type="xs:string" use="optional"/>
  <xs:attribute name="roadClass" type="xs:int" use="optional"/>
  <xs:attribute name="accessible" type="xs:boolean" use="optional"/>
  <xs:attribute name="oneWay" type="xs:boolean" use="optional"/>
  <xs:attribute name="isManeuverEntryLink" type="xs:boolean" use="optional"/>
  <xs:attribute name="isManeuverExitLink" type="xs:boolean" use="optional"/>
  <xs:attribute name="isRouteLink" type="xs:boolean" use="optional"/>
  <xs:attribute name="previousLinkId" type="xs:string" use="optional"/> 
</xs:complexType>

<xs:complexType name="PlaceType">
  <xs:attribute name="type" type="w:PlaceName" use="required"/>
  <xs:attribute name="value" type="xs:string" use="required"/> </xs:complexType>

The thing is that if I remove the ConnectedLinksType definition and reference 
it works, even with a list of 'PlaceType' inside a list of 'ManeuverType'. If I 
add the ConnectedLinksType, the serialization is fine but not the 
deserialization.

I have already tried to create ArrayOfXXX for complex types for all lists 
without success.

I have also externalized the definition of the string restriction (type 
attribute in 'ConnectedLinksType') without success.

I have tried to remove the restriction on the 'type' attribute and just keep a 
simple string without success.

Someone has any idea ?
Thanks a lot

Gilles DEVAUX.

Reply via email to