Unexpected subelement & inheritance & attribute
-----------------------------------------------

                 Key: AXIS2-2179
                 URL: https://issues.apache.org/jira/browse/AXIS2-2179
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.1.1
         Environment: Linux 2.6.12
Jrockit 1.4.2
weblogic 8.2
Axis2 1.1.1
            Reporter: Olivier DUGAST


Hi all, 

I try to use Axis2 with my service. One of my methods return a tab of BeanB 
class which extend an other BeanA class. But the SOAP response return only the 
attribute of BeanB without the attribute of BeanA as you can see below :

---- extract of wsdl -----
....
<xs:element name="BeanB" type="ax21:BeanB" /> <xs:complexType name="BeanB"> 
<xs:sequence> <xs:element name="attributeA"
nillable="true" type="xs:string" /> <xs:element name="attributeB"
nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> ...
<xs:element name="getBeanBTabResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="return" nillable="true"
type="ns0:BeanB" /> </xs:sequence> </xs:complexType> </xs:element> ...
--------------------------


---- SOAP request ---- 
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
  <soapenv:Header />
  <soapenv:Body>
    <getBeanBTab />
  </soapenv:Body>
</soapenv:Envelope>
-----------------------------


---- SOAP response of getBeanBTab webmethod  without attribute A ----- 
<?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
  <soapenv:Header />
  <soapenv:Body>
    <ns:getBeanBTabResponse xmlns:ns="http://server.me.com/xsd";>
      <ns:return>
        <attributeB xmlns="http://bean.service.server.me.com/xsd";>attrB
BeanB</attributeB>
      </ns:return>
    </ns:getBeanBTabResponse>
  </soapenv:Body>
</soapenv:Envelope>
--------------------------------------------------

When i try to invoke the method "getBeanBTab" as you can see above, no 
attributeA return , i catch this Exception :
--- stack trace -------------------------------------------
Exception in thread "main" java.lang.RuntimeException: 
java.lang.RuntimeException: Unexpected subelement attributeB
        at com.me.client.ServiceTestStub.fromOM(ServiceTestStub.java:3720)
        at com.me.client.ServiceTestStub.getBeanBTab(ServiceTestStub.java:365)
        at 
com.me.client.ServiceTestClient.getBeanBTab(ServiceTestClient.java:61)
        at 
com.me.client.ServiceTestClientMain.main(ServiceTestClientMain.java:15)
Caused by: java.lang.RuntimeException: Unexpected subelement attributeB
        at 
com.me.client.ServiceTestStub$BeanB$Factory.parse(ServiceTestStub.java:1304)
        at 
com.me.client.ServiceTestStub$GetBeanBTabResponse$Factory.parse(ServiceTestStub.java:3592)
        at com.me.client.ServiceTestStub.fromOM(ServiceTestStub.java:3714)
        ... 3 more
--------------------------------------------------

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to