[ 
https://issues.apache.org/jira/browse/AXIS2-4374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Malleswara Sarma updated AXIS2-4374:
------------------------------------

    Attachment: Address_type.java
                request-response.txt

Tried with version 1.5. Still the issue exists . While parsing the response the 
following condition is getting failed as the value of the  QName object are not 
equal.


           while (!reader.isStartElement() && !reader.isEndElement()) 
reader.next();
                                
                                    if (reader.isStartElement() && new 
javax.xml.namespace.QName("","address1").equals(reader.getName())){
                                
                                                
object.setAddress1(com.test.service.provider.shared.companytype._2009._02.String_Type.Factory.parse(reader));
                                              
                                        reader.next();
                                    
                              }  // End of if for expected property start 
element


Also attached Address_type.java  


The same is working fine when we change
<xs:complexType name="address_type">
                <xs:sequence>
                        <xs:element name="address1" type="tns:String_Type" />
                        <xs:element name="address2" type="tns:String_Type" />
                        <xs:element name="address3" type="tns:String_Type" />
                        <xs:element name="address4" type="tns:String_Type" />
                </xs:sequence>
        </xs:complexType>

        <xs:complexType name="String_Type">
                <xs:simpleContent>
                        <xs:extension base="xs:string">
                        <xs:attribute name="isUpdated" type="xs:boolean"        
default="false" />
                </xs:extension>
                </xs:simpleContent>
        </xs:complexType>


To

<xs:complexType name="address_type">
                <xs:sequence>
                        <xs:element ref="tns:address1" minOccurs="0" />
                        <xs:element ref="tns:address2" minOccurs="0" />
                        <xs:element ref="tns:address3" minOccurs="0" />
                        <xs:element ref="tns:address4" minOccurs="0" />
                </xs:sequence>
        </xs:complexType>

<xs:element name="address1" type="tns:String_Type" />
        <xs:element name="address2" type="tns:String_Type" />
        <xs:element name="address3" type="tns:String_Type" />
        <xs:element name="address4" type="tns:String_Type" />



> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: 
> Unexpected subelement 
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4374
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4374
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4
>            Reporter: Malleswara Sarma
>            Priority: Critical
>         Attachments: Address_type.java, company.zip, request-response.txt
>
>
> Getting the following error 
> rg.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: 
> Unexpected subelement address1
>       at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>       at com.example.company.CompanyStub.fromOM(CompanyStub.java:543)
>       at 
> com.example.company.CompanyStub.getCompanyDetails(CompanyStub.java:183)
>       at org.example.www.company.CallService.main(CallService.java:35)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: 
> Unexpected subelement address1
>       at 
> com.test.service.provider.shared.companytype._2009._02.Address_type$Factory.parse(Address_type.java:675)
>       at 
> com.test.service.provider.shared.companyflow._2009._02.CompanyResponse$Factory.parse(CompanyResponse.java:553)
>       at 
> com.example.company.GetCompanyDetailsResponse$Factory.parse(GetCompanyDetailsResponse.java:419)
>       at com.example.company.CompanyStub.fromOM(CompanyStub.java:538)
>       ... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement 
> address1
>       at 
> com.test.service.provider.shared.companytype._2009._02.Address_type$Factory.parse(Address_type.java:669)
>       ... 5 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to