Hello Sir/Madam, We have a Java web service that uses a complex data type (array of custom objects inside an array of custom objects) and are trying to deploy it using Axis2. We are noticing that Axis2 is not creating the wsdl properly. The wsdl file does not contain definitions for the custom object at the second level, so when consuming it, the client is not able to figure out what that custom object is. Please let us know if Axis2 allows us to use such type of objects or not. If so, what steps are involved. We are able to get a single array of custom objects to work without a problem. It is when we create another level of objects, that the type for the object becomes anyType in the wsdl. I am attaching the wsdl that resulted for your reference. Please reply soon.
Mani Rana Quest Solutions, Pvt. Ltd.
<wsdl:definitions targetNamespace="http://service"> <wsdl:documentation> Please Type your service description here </wsdl:documentation> - <wsdl:types> - <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://data/xsd"> - <xs:complexType name="CarFactory"> - <xs:sequence> <xs:element minOccurs="0" name="cars" nillable="true" type="xs:anyType"/> </xs:sequence> </xs:complexType> </xs:schema> - <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://adapter/xsd"> <xs:import namespace="http://data/xsd"/> - <xs:complexType name="CarFactoryGroupAdapter"> - <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="cars" nillable="true" type="ax22:CarFactory"/> </xs:sequence> </xs:complexType> </xs:schema> - <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service"> <xs:import namespace="http://adapter/xsd"/> - <xs:element name="getCarFactoryResponse"> - <xs:complexType> - <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" type="ax21:CarFactoryGroupAdapter"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> <wsdl:message name="getCarFactoryRequest"/> - <wsdl:message name="getCarFactoryResponse"> <wsdl:part name="parameters" element="ns:getCarFactoryResponse"/> </wsdl:message> - <wsdl:portType name="CarServicePortType"> - <wsdl:operation name="getCarFactory"> <wsdl:input message="ns:getCarFactoryRequest" wsaw:Action="urn:getCarFactory"/> <wsdl:output message="ns:getCarFactoryResponse" wsaw:Action="urn:getCarFactoryResponse"/> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="CarServiceSoap11Binding" type="ns:CarServicePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - <wsdl:operation name="getCarFactory"> <soap:operation soapAction="urn:getCarFactory" 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="CarServiceSoap12Binding" type="ns:CarServicePortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - <wsdl:operation name="getCarFactory"> <soap12:operation soapAction="urn:getCarFactory" 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="CarServiceHttpBinding" type="ns:CarServicePortType"> <http:binding verb="POST"/> - <wsdl:operation name="getCarFactory"> <http:operation location="CarService/getCarFactory"/> - <wsdl:input> <mime:content type="text/xml" part="getCarFactory"/> </wsdl:input> - <wsdl:output> <mime:content type="text/xml" part="getCarFactory"/> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="CarService"> - <wsdl:port name="CarServiceHttpSoap11Endpoint" binding="ns:CarServiceSoap11Binding"> <soap:address location="http://localhost:8080/axis2/services/CarService.CarServiceHttpSoap11Endpoint/"/> </wsdl:port> - <wsdl:port name="CarServiceHttpSoap12Endpoint" binding="ns:CarServiceSoap12Binding"> <soap12:address location="http://localhost:8080/axis2/services/CarService.CarServiceHttpSoap12Endpoint/"/> </wsdl:port> - <wsdl:port name="CarServiceHttpEndpoint" binding="ns:CarServiceHttpBinding"> <http:address location="http://localhost:8080/axis2/services/CarService.CarServiceHttpEndpoint/"/> </wsdl:port> </wsdl:service> </wsdl:definitions>