You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Sridhar Kotagiri <sr...@mphasis.com> on 2003/10/17 16:55:10 UTC

Deserialization problem

Hi,
      I'am new to web services.I have been facing a problem with deserialization.
      1)I am using axis to generate the client side code.When my object model is simple I dont have any problems everything is working perfect.
      2)Now I have a complex object model that returns  MyContactTOWrapper  from the web service
                a)MyContactTOWrapper object  contains 
                    1)item number:long
                    2)requestId:String
                    3)totalItems:long
                    4)MyContactTO
             
                 b)MyContactTO
                     1)Email:String
                     2)Name:String
                     3)RxClientData
 
                 c)RxClientData
                      1)nameList:[]String
                       2)ValueList:[]String
                      3)Url:String
 
The exception that is being thrown
[ERROR] Call - -Exception: <org.xml.sax.SAXException: Invalid element in com.ibportal.rxcc.integration.lob.rx.MyContactTO - MyContactTO>org.xml.sax.SAXException: Invalid element in com.ibportal.rxcc.integration.lob.rx.MyContactTO - MyContactTO

at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:260)

Do I need to write my own deserialized classes or can I use from the existing one.Any help regarding this is appreciated.
 
The wsdl document.
         
  <xsd:complexType name="MyContactTOWrapper">
-       <xsd:sequence>
             <xsd:element name="myContacts" maxOccurs="1" type="stns:ArrayOfMyContactTO"    minOccurs="1" nillable="true" /> 
             <xsd:element name="itemNumber" maxOccurs="1" type="xsd:long" minOccurs="1" /> 
          <xsd:element name="requestId" maxOccurs="1" type="xsd:string" minOccurs="1" nillable="true" /> 
      <xsd:element name="totalItems" maxOccurs="1" type="xsd:long" minOccurs="1" /> 
    </xsd:sequence>
 </xsd:complexType>
 
 
- <xsd:complexType name="MyContactTO">
-       <xsd:sequence>
               <xsd:element name="rowId" maxOccurs="1" type="xsd:string" minOccurs="1" nillable="true" /> 
       <xsd:element name="viewPortfolioLink" maxOccurs="1" type="stns:RxClientData" minOccurs="1" nillable="true" /> 
       <xsd:element name="nameLink" maxOccurs="1" type="stns:RxClientData" minOccurs="1" nillable="true" /> 
               <xsd:element name="workPhone" maxOccurs="1" type="xsd:string" minOccurs="1" nillable="true" /> 
               <xsd:element name="email" maxOccurs="1" type="xsd:string" minOccurs="1" nillable="true" /> 
               <xsd:element name="addLink" maxOccurs="1" type="stns:RxClientData" minOccurs="1" nillable="true" /> 
               <xsd:element name="firstName" maxOccurs="1" type="xsd:string" minOccurs="1" nillable="true" /> 
               <xsd:element name="lastName" maxOccurs="1" type="xsd:string" minOccurs="1" nillable="true" /> 
   </xsd:sequence>
</xsd:complexType>
 
 
- <xsd:complexType name="RxClientData">
-        <xsd:sequence>
                <xsd:element xmlns:tp="java:language_builtins.lang" name="valueList" maxOccurs="1" type="tp:ArrayOfString" minOccurs="1" nillable="true" /> 
                <xsd:element name="clientUrl" maxOccurs="1" type="xsd:string" minOccurs="1" nillable="true" /> 
                <xsd:element xmlns:tp="java:language_builtins.lang" name="nameList" maxOccurs="1" type="tp:ArrayOfString" minOccurs="1" nillable="true" /> 
    </xsd:sequence>
</xsd:complexType>
 
Thanks!
Sridhar