remove
<wsdl:operation name="findVehicle">
<wsdlsoap:operation soapAction="AcesOptions"/>
<wsdl:input name="findVehicle">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="findVehicleResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
names from here as well as follows
<wsdl:operation name="findVehicle">
<wsdlsoap:operation soapAction="AcesOptions"/>
<wsdl:input >
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
On 4/5/07, Bill Treuman <[EMAIL PROTECTED]> wrote:
Thank yo very much, Amila. This change has worked great for three of the
four web service methods. But the fourth method (in the original wsdl,
included below), which follows a somewhat different naming convention, still
causes an empty method which takes no parameter and returns void to be
included in the xyzServiceSkeleton module. Here are what I believe are the
relevant portions of the wsdl:
<element name="findVehicle">
<complexType>
<sequence>
<element name="vehicle" type="tns:Vehicle"/>
<element name="attribute" type="string"/>
</sequence>
</complexType>
</element>
<element name="findVehicleResponse">
<complexType>
<sequence>
<element name="acesOptions" type="tns:AcesOptions"/>
<element name="vehicle" type="tns:Vehicle"/>
</sequence>
</complexType>
</element>
<wsdl:message name="findVehicleRequestMessage">
<wsdl:part element="wns:findVehicle" name="input"/>
</wsdl:message>
<wsdl:message name="findVehicleResponseMessage">
<wsdl:part element="wns:findVehicleResponse" name="output"/>
</wsdl:message>
<wsdl:operation name="findVehicle" parameterOrder="input">
<wsdl:input message="wns:findVehicleRequestMessage"/>
<!--name attribute removed -->
<wsdl:output message="wns:findVehicleResponseMessage"/>
<!--name attribute removed -->
</wsdl:operation>
Thanks very much again. . . Bill
-----Original Message-----
*From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED]
*Sent:* Thursday, April 05, 2007 5:35 AM
*To:* [email protected]; [EMAIL PROTECTED]
*Subject:* Re: All Methods in ServiceSkeleton Generated by WSDL2Java.batwith
Void Return Types
hi,
in your operations you have specified the input name as it is in the
Message name
<wsdl:operation name="VehicleWithIdPlusTenThousand"
parameterOrder="input">
<wsdl:input message="wns:VehicleWithIdPlusTenThousandRequestMessage"
name="VehicleWithIdPlusTenThousandRequestMessage"/>
<wsdl:output
message="wns:VehicleWithIdPlusTenThousandResponseMessage"
name="VehicleWithIdPlusTenThousandResponseMessage"/>
</wsdl:operation>
here message name (VehicleWithIdPlus TenThousandRequestMessage) and the
input name (VehicleWithIdPlusTenThou sandRequestMessage) are equeal.
In this case wsdl4j set null to wsdlmessage. I am not sure this is wrong
with the wsdl spec. But removing input and output message names would make
it fine.
<wsdl:operation name="VehicleWithIdPlusTenThousand"
parameterOrder="input">
<wsdl:input message="wns:VehicleWithIdPlusTenThousandRequestMessage"
/>
<wsdl:output
message="wns:VehicleWithIdPlusTenThousandResponseMessage" />
</wsdl:operation>
On 4/4/07, Bill Treuman <[EMAIL PROTECTED] > wrote:
>
> I'm using wsdl2java.bat to generate the Axis2 server-side, as follows:
>
> wsdl2java -uri testVehicle.wsdl -p com.carquest.ws.testvehicle -o
> server -s -ss -sd -d adb -wv 1.1
>
> Oddly, in the generated file xyzServiceSkeleton.java, every generated
> method
> has a void return type and takes no input arguments. Likewise, in the
> generated file xyzServiceMessageReceiverInOut.java, every referenced
> method
> uses getDefaultEnvelope( ). Here is an example of the generated code in
> the
> latter file:
>
> //doc style
> skel.AcesOptions();
> envelope = getSOAPFactory(msgContext).getDefaultEnvelope();
>
> When I generate your sample service and client, from Axis2UserGuide, the
> proper argument values and return types are included, and the code in
> the
> generated MessageReceiverInOut reflects this.
>
> I presume there must be some problem in my wsdl file, but I can't find
> it.
> The entire contents of testVehicle.wsdl follows. What am I missing?
>
> Thank you very much.
> -----------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> targetNamespace="http://ws.carquest.com/2006/services/vehicle "
> xmlns:wns="http://ws.carquest.com/2006/services/vehicle"
> xmlns:tns="http://ws.carquest.com/2006/types/vehicle "
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/ ">
> <wsdl:types>
>
> <schema elementFormDefault="qualified"
> targetNamespace="http://ws.carquest.com/2006/services/vehicle "
> xmlns="http://www.w3.org/2001/XMLSchema">
>
> <!--
> This wsdl is used for my initial XmlBeans test.
> There is no double-wrapping of any request or response soap
> element.
> The xxxServiceSkeleton.java module is generated by
> WSDL2Java. (The
> generated
> methods contain empty method bodies, which must be populated
> with
> the
> desired functionality).
> The operation name in the <portType> section becomes the name of
> the
> method
> in xxxServiceSkeleton.java.
> The request element name such as
> VehicleWithIdPlusTenThousandRequest
> directly below
> becomes the (only) parameter name in the xxxServiceSkeleton.java
> method. Each
> method generated by WSDL2Java receives one and only one
> parameter.
> The response element name such as
> VehicleWithIdPlusTenThousandResponse
> directly
> below becomes the return type from the xxxServiceSkeleton.java
> method (unless
> the method returns void, when there is no response element
> below).
> The interior elements below such as componentName and vehicle can
> be
> accessed
> via get/set methods in the parameter type, e.g.
> VehicleWithIdPlusTenThousandRequest.getComponentname().
> Likewise multiple interior elements in the method response type
> can be
> accessed
> via code such as . . .
> The request and response element names are both present in the
> corresponding soap
> messages, directly below <soapenv:Body>. So are the interior
> element names such
> as echoString in the request and response above. These interior
> elements are
> direct children of the request or response soap elements.
> -->
>
> <element name="VehicleWithIdPlusTenThousandRequest">
> <complexType>
> <sequence>
> <element name="componentName" type="string"/>
> <element name="vehicle" type="tns:Vehicle"/>
> </sequence>
> </complexType>
> </element>
> <element name="VehicleWithIdPlusTenThousandResponse">
> <complexType>
> <sequence>
> <element name="vehicle" type="tns:Vehicle"/>
> </sequence>
> </complexType>
> </element>
>
> <element name="AcesAttributeRequest">
> <complexType>
> <sequence />
> </complexType>
> </element>
> <element name="AcesAttributeResponse">
> <complexType>
> <sequence>
> <element name="acesAttribute" type="tns:AcesAttribute"/>
> </sequence>
> </complexType>
> </element>
>
> <element name="AcesOptionsRequest">
> <complexType>
> <sequence>
> <element name="id" type="string"/>
> </sequence>
> </complexType>
> </element>
> <element name="AcesOptionsResponse">
> <complexType>
> <sequence>
> <element name="AcesOptionsBlock" type="tns:AcesOptions"/>
> </sequence>
> </complexType>
> </element>
>
> <element name="findVehicle">
> <complexType>
> <sequence>
> <element name="vehicle" type="tns:Vehicle"/>
> <element name="attribute" type="string"/>
> </sequence>
> </complexType>
> </element>
>
> <element name="findVehicleResponse">
> <complexType>
> <sequence>
> <element name="acesOptions" type="tns:AcesOptions"/>
> <element name="vehicle" type="tns:Vehicle"/>
> </sequence>
> </complexType>
> </element>
>
> </schema>
>
>
> <!-- Note the schema shown above is for services/vehicle. -->
> <!-- The second schema shown below is for types/vehicle. -->
>
> <schema elementFormDefault="qualified"
> targetNamespace="http://ws.carquest.com/2006/types/vehicle"
> xmlns=" http://www.w3.org/2001/XMLSchema">
>
> <complexType name="Vehicle">
> <sequence>
> <element name="vehicle" type="nonNegativeInteger"
> minOccurs="0"/>
> <element name="year" type="nonNegativeInteger" minOccurs="0"/>
> <element name="make" type="nonNegativeInteger" minOccurs="0"/>
>
> <element name="model" type="nonNegativeInteger"
> minOccurs="0"/>
> <element name="submodel" type="nonNegativeInteger"
> minOccurs="0"/>
> <element name="region" type="nonNegativeInteger"
> minOccurs="0"/>
>
> <element name="bedConfig" type="nonNegativeInteger"
> minOccurs="0"/>
> <element name="bedLength" type="nonNegativeInteger"
> minOccurs="0"/>
> <element name="bedType" type="nonNegativeInteger"
> minOccurs="0"/>
>
> </sequence>
> </complexType>
>
> <complexType name="AcesAttribute">
> <sequence>
> <element name="option" type="string"/>
> </sequence>
> </complexType>
>
> <complexType name="AcesOption">
> <sequence>
> <element name="id" type="nonNegativeInteger"/>
> <element name="description" type="string"/>
> </sequence>
> </complexType>
>
> <complexType name="AcesOptions">
> <sequence>
> <element name="attribute" type="string"/>
> <element name="option" type="tns:AcesOption"
> maxOccurs="unbounded"/>
> </sequence>
> </complexType>
>
> </schema>
>
> </wsdl:types>
>
>
> <wsdl:message name="VehicleWithIdPlusTenThousandRequestMessage">
> <wsdl:part element="wns:VehicleWithIdPlusTenThousandRequest"
> name="input"/>
> </wsdl:message>
> <wsdl:message name="VehicleWithIdPlusTenThousandResponseMessage">
> <wsdl:part element="wns:VehicleWithIdPlusTenThousandResponse"
> name="output"/>
> </wsdl:message>
>
> <wsdl:message name="AcesAttributeRequestMessage">
> <wsdl:part element="wns:AcesAttributeRequest" name="input"/>
> </wsdl:message>
> <wsdl:message name="AcesAttributeResponseMessage">
> <wsdl:part element="wns:AcesAttributeResponse" name="output"/>
> </wsdl:message>
>
> <wsdl:message name="AcesOptionsRequestMessage">
> <wsdl:part element="wns:AcesOptionsRequest" name="input"/>
> </wsdl:message>
> <wsdl:message name="AcesOptionsResponseMessage">
> <wsdl:part element="wns:AcesOptionsResponse" name="output"/>
> </wsdl:message>
>
> <wsdl:message name="findVehicleRequestMessage">
> <wsdl:part element="wns:findVehicle" name="input"/>
> </wsdl:message>
> <wsdl:message name="findVehicleResponseMessage">
> <wsdl:part element="wns:findVehicleResponse" name="output"/>
> </wsdl:message>
>
>
> <wsdl:portType name="TestVehiclePortType">
>
> <wsdl:operation name="VehicleWithIdPlusTenThousand"
> parameterOrder="input">
> <wsdl:input
> message="wns:VehicleWithIdPlusTenThousandRequestMessage"
> name="VehicleWithIdPlusTenThousandRequestMessage"/>
> <wsdl:output
> message="wns:VehicleWithIdPlusTenThousandResponseMessage"
> name="VehicleWithIdPlusTenThousandResponseMessage"/>
> </wsdl:operation>
>
> <wsdl:operation name="AcesAttribute" parameterOrder="input">
> <wsdl:input message="wns:AcesAttributeRequestMessage"
> name="AcesAttributeRequestMessage"/>
> <wsdl:output message="wns:AcesAttributeResponseMessage"
> name="AcesAttributeResponseMessage"/>
> </wsdl:operation>
>
> <wsdl:operation name="AcesOptions" parameterOrder="input">
> <wsdl:input message="wns:AcesOptionsRequestMessage"
> name="AcesOptionsRequestMessage"/>
> <wsdl:output message="wns:AcesOptionsResponseMessage"
> name="AcesOptionsResponseMessage"/>
> </wsdl:operation>
>
> <wsdl:operation name="findVehicle" parameterOrder="input">
> <wsdl:input message="wns:findVehicleRequestMessage"
> name="findVehicleRequestMessage"/>
> <wsdl:output message="wns:findVehicleResponseMessage"
> name="findVehicleResponseMessage"/>
> </wsdl:operation>
>
> </wsdl:portType>
>
> <wsdl:binding name="TestVehicleSoapBinding"
> type="wns:TestVehiclePortType">
>
> <wsdlsoap:binding style="document"
> transport=" http://schemas.xmlsoap.org/soap/http"/>
>
> <wsdl:operation name="VehicleWithIdPlusTenThousand">
>
> <wsdlsoap:operation soapAction="VehicleWithIdPlusTenThousand"/>
>
> <wsdl:input name="VehicleWithIdPlusTenThousandRequest">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
>
> <wsdl:output name="VehicleWithIdPlusTenThousandResponse">
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="AcesAttribute">
>
> <wsdlsoap:operation soapAction="AcesAttribute"/>
>
> <wsdl:input name="AcesAttributeRequest">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
>
> <wsdl:output name="AcesAttributeResponse">
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="AcesOptions">
>
> <wsdlsoap:operation soapAction="AcesOptions"/>
>
> <wsdl:input name="AcesOptionsRequest">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
>
> <wsdl:output name="AcesOptionsResponse">
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="findVehicle">
>
> <wsdlsoap:operation soapAction="AcesOptions"/>
>
> <wsdl:input name="findVehicle">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
>
> <wsdl:output name="findVehicleResponse">
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
>
> </wsdl:operation>
>
> </wsdl:binding>
>
> <wsdl:service name="TestVehicleService">
>
> <wsdl:port binding="wns:TestVehicleSoapBinding" name="TestVehicle">
> <wsdlsoap:address
> location="http://localhost:8080/axis2/services/testVehicle "/>
> </wsdl:port>
>
> </wsdl:service>
>
> </wsdl:definitions>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Amila Suriarachchi,
WSO2 Inc.
--
Amila Suriarachchi,
WSO2 Inc.