That worked.  Thank you.

On 11/12/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
Hmmm...

Doesn't make sense to me why it isn't producing the signature you want, but you might try adding another layer of wrapping in your response message, so that when Axis unwraps the request, it returns a return value rather than a set of parameters. e.g.:

    <xs:element name="FlightAvailabilityResponse">
       <xs:complexType>
          <xs:sequence>
              <xs:element name="FlightAvailabilityReturn">
                 <xs:complexType>
                    <xs:sequence>
                        <xs:element name="FlightNo" type="xs:string"/>
                        <xs:element name="TravelClass2" type="xs:string"/>
                        <xs:element name="Price" type="xs:string"/>
                        <xs:element name="DepartureDateTime" type="xs:string"/>
                        <xs:element name="ReturnDateTime" type="xs:string"/>
                        <xs:element name="Approved" type="xs:string"/>
                    </xs:sequence>
                 </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
       </xs:element>

Anne



On 11/11/05, LiChung Liu <[EMAIL PROTECTED] > wrote:
Hi, I've written a wrapped-style service WSDL, but have been unable to
get the WSDL2Java to generate the right method signature. In the wsdl,
I've specified a complexType for the request and response.  However the
generated method always result in a 'void method(param1, param2, param3...)'.
I would appreciate another set of eyes on this, thank you.

WSDL2Java generated method signature:
public void flightAvailability(String p1, String p2, String p3...) {..}

Desired method signature:
public FlightAvailabilityResponse flightAvailibility(String p1, String p2, String p3...) {..}


WSDL in question:
-----------------------------
<?xml version="1.0 " encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/ " xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://localhost:8081/axis/services/airline/ " xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost:8081/axis/services/airline/ ">
    <wsdl:types>
        <xs:schema elementFormDefault="qualified" targetNamespace=" http://localhost:8081/axis/services/airline/">
            <xs:element name="FlightAvailability">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="OriginFrom" type="xs:string"/>
                        <xs:element name="DestinationTo" type="xs:string"/>
                        <xs:element name="DesiredDepartureDate" type="xs:date"/>
                        <xs:element name="DesiredReturnDate" type="xs:date"/>
                        <xs:element name="TravelClass1" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="FlightAvailabilityRespons
e">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="FlightNo" type="xs:string"/>
                        <xs:element name="TravelClass2" type="xs:string"/>
                        <xs:element name="Price" type="xs:string"/>
                        <xs:element name="DepartureDateTime" type="xs:string"/>
                        <xs:element name="ReturnDateTime" type="xs:string"/>
                        <xs:element name="Approved" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="FlightRequestMessage">
        <wsdl:part name="parameters" element="tns:FlightAvailability"/>
    </wsdl:message>
    <wsdl:message name="FlightResponseMessage">
        <wsdl:part name="parameters" element="tns:FlightAvailabilityResponse"/>
    </wsdl:message>
    <wsdl:portType name="FlightAvailabilityPT">
        <wsdl:operation name="FlightAvailability">
            <wsdl:input message="tns:FlightRequestMessage"/>
            <wsdl:output message="tns:FlightResponseMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="AirlineServiceBinding" type="tns:FlightAvailabilityPT">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/ >
        <wsdl:operation name="FlightAvailability">
            <soap:operation soapAction="FlightAvailability"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="AirlineService">
        <wsdl:port name="AirlineService" binding="tns:AirlineServiceBinding">
            <soap:address location=" http://localhost:8081/axis/services/AirlineService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
---------------------------------


Reply via email to