axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Wells <ja...@wells.me>
Subject wsdl2java and inheritance?
Date Mon, 02 Feb 2009 21:50:09 GMT
Hello,

I have a simple Axis2 service described by the WSDL below. I generated  
an ADB client from this with wsdl2java. However, when I call the  
getConceptByGuid operation from the client, I get this:

"org.apache.axis2.AxisFault:  
org.apache.axis2.databinding.ADBException: Unexpected subelement  
createDate"

The operation works fine when called from other clients. Why would the  
ADB stub generated from this WSDL throw this exception? createDate is  
inherited from Element by Concept, so perhaps the inheritance is the  
problem?

Thanks,
Jason



<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"  
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/

" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis

2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"  
xmlns:ax23="http://model.enterprise.semantica/xsd" xmlns:ns="http://service.enterprise.semantica

" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/

" targetNamespace="http://service.enterprise.semantica">
     <wsdl:documentation>EnterpriseServiceTest</wsdl:documentation>
     <wsdl:types>
         <xs:schema attributeFormDefault="qualified"  
elementFormDefault="qualified" targetNamespace="http://model.enterprise.semantica/xsd 
">
             <xs:complexType name="Element">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="createDate"  
nillable="true" type="xs:dateTime"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Concept">
                 <xs:complexContent>
                     <xs:extension base="ax23:Element">
                         <xs:sequence>
                             <xs:element minOccurs="0"  
name="elementType" nillable="true" type="ax23:ElementType"/>
                             <xs:element minOccurs="0" name="gap"  
type="xs:boolean"/>
                             <xs:element minOccurs="0" name="guid"  
nillable="true" type="xs:string"/>
                             <xs:element minOccurs="0"  
name="modifyDate" nillable="true" type="xs:dateTime"/>
                             <xs:element minOccurs="0" name="name"  
nillable="true" type="xs:string"/>
                         </xs:sequence>
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
             <xs:complexType name="ElementType">
                 <xs:complexContent>
                     <xs:extension base="ax23:Element">
                         <xs:sequence>
                             <xs:element minOccurs="0" name="baseType"  
type="xs:boolean"/>
                             <xs:element minOccurs="0" name="guid"  
nillable="true" type="xs:string"/>
                             <xs:element minOccurs="0"  
name="modifyDate" nillable="true" type="xs:dateTime"/>
                             <xs:element minOccurs="0" name="name"  
nillable="true" type="xs:string"/>
                             <xs:element minOccurs="0"  
name="parentGuid" nillable="true" type="xs:string"/>
                         </xs:sequence>
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
         </xs:schema>
         <xs:schema xmlns:ax24="http://model.enterprise.semantica/xsd"  
attributeFormDefault="qualified" elementFormDefault="qualified"  
targetNamespace="http://service.enterprise.semantica">
             <xs:import namespace="http://model.enterprise.semantica/ 
xsd"/>
             <xs:element name="getConceptByGuid">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="guid"  
nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getConceptByGuidResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return"  
nillable="true" type="ax24:Concept"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
         </xs:schema>
     </wsdl:types>
     <wsdl:message name="getConceptByGuidRequest">
         <wsdl:part name="parameters" element="ns:getConceptByGuid"/>
     </wsdl:message>
     <wsdl:message name="getConceptByGuidResponse">
         <wsdl:part name="parameters"  
element="ns:getConceptByGuidResponse"/>
     </wsdl:message>
     <wsdl:portType name="EnterpriseServiceTestPortType">
         <wsdl:operation name="getConceptByGuid">
             <wsdl:input message="ns:getConceptByGuidRequest"  
wsaw:Action="urn:getConceptByGuid"/>
             <wsdl:output message="ns:getConceptByGuidResponse"  
wsaw:Action="urn:getConceptByGuidResponse"/>
         </wsdl:operation>
     </wsdl:portType>
     <wsdl:binding name="EnterpriseServiceTestSoap11Binding"  
type="ns:EnterpriseServiceTestPortType">
         <soap:binding transport="http://schemas.xmlsoap.org/soap/ 
http" style="document"/>
         <wsdl:operation name="getConceptByGuid">
             <soap:operation soapAction="urn:getConceptByGuid"  
style="document"/>
             <wsdl:input>
                 <soap:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <soap:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="EnterpriseServiceTestSoap12Binding"  
type="ns:EnterpriseServiceTestPortType">
         <soap12:binding transport="http://schemas.xmlsoap.org/soap/ 
http" style="document"/>
         <wsdl:operation name="getConceptByGuid">
             <soap12:operation soapAction="urn:getConceptByGuid"  
style="document"/>
             <wsdl:input>
                 <soap12:body use="literal"/>
             </wsdl:input>
             <wsdl:output>
                 <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="EnterpriseServiceTestHttpBinding"  
type="ns:EnterpriseServiceTestPortType">
         <http:binding verb="POST"/>
         <wsdl:operation name="getConceptByGuid">
             <http:operation location="EnterpriseServiceTest/ 
getConceptByGuid"/>
             <wsdl:input>
                 <mime:content type="text/xml" part="getConceptByGuid"/>
             </wsdl:input>
             <wsdl:output>
                 <mime:content type="text/xml" part="getConceptByGuid"/>
             </wsdl:output>
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="EnterpriseServiceTest">
         <wsdl:port name="EnterpriseServiceTestHttpSoap11Endpoint"  
binding="ns:EnterpriseServiceTestSoap11Binding">
             <soap:address location="http://10.37.129.2:8080/axis2/services/EnterpriseServiceTest.EnterpriseServiceTestHttpSoap11Endpoint/

"/>
         </wsdl:port>
         <wsdl:port name="EnterpriseServiceTestHttpSoap12Endpoint"  
binding="ns:EnterpriseServiceTestSoap12Binding">
             <soap12:address location="http://10.37.129.2:8080/axis2/services/EnterpriseServiceTest.EnterpriseServiceTestHttpSoap12Endpoint/

"/>
         </wsdl:port>
         <wsdl:port name="EnterpriseServiceTestHttpEndpoint"  
binding="ns:EnterpriseServiceTestHttpBinding">
             <http:address location="http://10.37.129.2:8080/axis2/services/EnterpriseServiceTest.EnterpriseServiceTestHttpEndpoint/

"/>
         </wsdl:port>
     </wsdl:service>
</wsdl:definitions>






Mime
View raw message