Hi, I try to create the wsdl from the example code present in the Quick Start Guide, the *StockQuoteService* ( http://ws.apache.org/axis2/1_3/quickstartguide.html), using the ant task:
<target name="generate.wsdl" depends="compile.service"> <taskdef name="java2wsdl" classname="org.apache.ws.java2wsdl.Java2WSDLTask" classpathref="axis2.classpath"/> <java2wsdl className=" samples.quickstart.service.pojo.StockQuoteService" outputLocation="${build.dir}" targetNamespace="http://quickstart.samples/" schemaTargetNamespace="http://quickstart.samples/xsd"> <classpath> <pathelement path="${axis2.classpath}"/> <pathelement location="${build.dir}/classes"/> </classpath> </java2wsdl> </target> With the generated WSDL file (see attachment) i create a java client, and all works fine, but it's an invalid xml file - i tried with XMLSPY. In the block .... <wsdl:input> <mime:content type="text/xml" part="update"/> </wsdl:input> .... the parser show the follow error: attribute 'part' in extensibility element '<mime:content>' refers to part 'update' wich could not be found in message 'updateRequest'. What's wrong, it's a bug? Marco
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://quickstart.samples/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://quickstart.samples/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://quickstart.samples/"> <wsdl:types> <xs:schema xmlns:ns="http://quickstart.samples/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://quickstart.samples/xsd"> <xs:element name="getPrice"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="getPriceResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:double"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="update"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="price" type="xs:double"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> <wsdl:message name="updateRequest"> <wsdl:part name="parameters" element="ns0:update"/> </wsdl:message> <wsdl:message name="getPriceRequest"> <wsdl:part name="parameters" element="ns0:getPrice"/> </wsdl:message> <wsdl:message name="getPriceResponse"> <wsdl:part name="parameters" element="ns0:getPriceResponse"/> </wsdl:message> <wsdl:portType name="StockQuoteServicePortType"> <wsdl:operation name="update"> <wsdl:input message="axis2:updateRequest" wsaw:Action="urn:update"/> </wsdl:operation> <wsdl:operation name="getPrice"> <wsdl:input message="axis2:getPriceRequest" wsaw:Action="urn:getPrice"/> <wsdl:output message="axis2:getPriceResponse" wsaw:Action="urn:getPriceResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="StockQuoteServiceSOAP11Binding" type="axis2:StockQuoteServicePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="update"> <soap:operation soapAction="urn:update" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> </wsdl:operation> <wsdl:operation name="getPrice"> <soap:operation soapAction="urn:getPrice" 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="StockQuoteServiceSOAP12Binding" type="axis2:StockQuoteServicePortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="update"> <soap12:operation soapAction="urn:update" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> </wsdl:operation> <wsdl:operation name="getPrice"> <soap12:operation soapAction="urn:getPrice" 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="StockQuoteServiceHttpBinding" type="axis2:StockQuoteServicePortType"> <http:binding verb="POST"/> <wsdl:operation name="update"> <http:operation location="StockQuoteService/update"/> <wsdl:input> <mime:content type="text/xml" part="update"/> </wsdl:input> </wsdl:operation> <wsdl:operation name="getPrice"> <http:operation location="StockQuoteService/getPrice"/> <wsdl:input> <mime:content type="text/xml" part="getPrice"/> </wsdl:input> <wsdl:output> <mime:content type="text/xml" part="getPrice"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="StockQuoteService"> <wsdl:port name="StockQuoteServiceSOAP11port_http" binding="axis2:StockQuoteServiceSOAP11Binding"> <soap:address location="http://localhost:8080/axis2/services/StockQuoteService"/> </wsdl:port> <wsdl:port name="StockQuoteServiceSOAP12port_http" binding="axis2:StockQuoteServiceSOAP12Binding"> <soap12:address location="http://localhost:8080/axis2/services/StockQuoteService"/> </wsdl:port> <wsdl:port name="StockQuoteServiceHttpport" binding="axis2:StockQuoteServiceHttpBinding"> <http:address location="http://localhost:8080/axis2/services/StockQuoteService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]