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

Sagara Gunathunga  updated AXIS2-4781:
--------------------------------------

    Component/s:     (was: Tools)
                 codegen
    
> WSDL2Java stub generation alternatives leads to inheritance issues
> ------------------------------------------------------------------
>
>                 Key: AXIS2-4781
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4781
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.5.1
>         Environment: Linux/Unix
>            Reporter: Kyle L.
>
> WSDL: https://webservice.s4.exacttarget.com/etframework.wsdl
> Service 'RetrieveResponseMsg' has the following definition:
> <element name="RetrieveResponseMsg"> 
>         <complexType> 
>           <sequence> 
>             <element name="OverallStatus" type="xsd:string" minOccurs="1" 
> maxOccurs="1" /> 
>             <element name="RequestID" type="xsd:string" minOccurs="0" 
> maxOccurs="1" /> 
>             <element name="Results" type="tns:APIObject" minOccurs="0" 
> maxOccurs="unbounded" /> 
>           </sequence> 
>         </complexType> 
> </element> 
> The 'Results' element is defined as APIObject. However, if a response comes 
> back from the server as:
> <?xml version='1.0' encoding='utf-8'?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";
>       
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
>       
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>       <soap:Header>
>         XXX
>       </soap:Header>
>       <soap:Body>
>               <RetrieveResponseMsg 
> xmlns="http://exacttarget.com/wsdl/partnerAPI";>
>                       <OverallStatus>OK</OverallStatus>
>                       <RequestID>XXX/RequestID>
>                       <Results xsi:type="ObjectExtension">
>                               <PartnerKey xsi:nil="true" />
>                               
> <CreatedDate>2010-07-07T12:42:06.96</CreatedDate>
>                               <ObjectID xsi:nil="true" />
>                               <Type>SubscriberStatusEvent</Type>
>                               <Properties>
>                                       <Property>
>                                               <Name>CurrentStatus</Name>
>                                               <Value>XXX</Value>
>                                       </Property>
>                                       <Property>
>                                               <Name>SubscriberKey</Name>
>                                               <Value>XXX</Value>
>                                       </Property>
>                               </Properties>
>                       </Results>
>                       <Results xsi:type="ObjectExtension">
>                          ...
>                       </Results>
>                       <Results xsi:type="ObjectExtension">
>                          ...
>                       </Results>
>                         ...
>               </RetrieveResponseMsg>
>       </soap:Body>
> </soap:Envelope>
> ObjectExtension is defined as follows:
>       <complexType name="ObjectExtension">
>         <complexContent>
>           <extension base="tns:APIObject">
>             <sequence>
>               <element name="Type" minOccurs="0" maxOccurs="1" type="string" 
> />
>               <element name="Properties" minOccurs="0" maxOccurs="1">
>                 <complexType>
>                   <sequence>
>                     <element name="Property" minOccurs="0" 
> maxOccurs="unbounded" type="tns:APIProperty" />
>                   </sequence>
>                 </complexType>
>               </element>
>             </sequence>
>           </extension>
>         </complexContent>
>       </complexType>
> Note that ObjectExtension has APIObject as a base definition.
> When the target web service responds with ObjectExtension objects, the AXIS 
> response handler blows up stating that it cannot map the ObjectExtension type.
> However, if I generate the java stubs as follows:
> $AXIS_HOME/bin/wsdl2java.sh -ss -g -o src/main/java --noBuildXML -uri 
> https://webservice.s4.exacttarget.com/etframework.wsdl
> The same response is parsed without any issues.
> Perhaps I am misunderstanding some subtlety, but this seems to me as a bug. 
> Let me know if you need any more details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to