axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier DUGAST" <Olivier.DUG...@fr.adp.com>
Subject Axis2 1.1.1 - Unexpected subelement and heritage
Date Wed, 14 Feb 2007 09:14:50 GMT

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 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:11)
Caused by: java.lang.RuntimeException: Unexpected subelement attributeB
	at
com.me.client.ServiceTestStub$BeanB$Factory.parse(ServiceTestStub.java:1
304)
	at
com.me.client.ServiceTestStub$GetBeanBTabResponse$Factory.parse(ServiceT
estStub.java:3592)
	at
com.me.client.ServiceTestStub.fromOM(ServiceTestStub.java:3714)
	... 3 more
--------------------------------------------------



Any idea?

Please let me know how to solve this issue?

Thanks,
Olivier.






---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message