Hello,

I'm trying to use the WSDL2Java tool to generate an RPC-style Axis 1.1
WebService from an existing WSDL file.  I've noticed that the Axis 1.1
RPCProvider forms the element name of the output message body by taking the
operation name and prepending "Response".  Consider the following WSDL
excerpt:

    <!-- Message definitions -->
    <message name="write">
        <part name="key" type="xsd:string"/>
        <part name="value" type="xsd:string"/>
    </message>

    <message name="ok">
    </message>

    <!-- Port definitions -->
    <portType name="DataService">
        <operation name="write">
            <input message="tns:write"/>
            <output message="tns:ok"/>
        </operation>
    </portType>

    <!-- Binding definitions -->
    <binding name="DataServiceBinding" type="tns:DataService">
        <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="write">
            <soap:operation soapAction=""/>
            <input>
                <soap:body
                    use="encoded"
                    namespace="http://jason.org/axis/services/DataService";

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </input>
            <output>
                <soap:body
                    use="encoded"
                    namespace="http://jason.org/axis/services/DataService";

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </output>
        </operation>
    </binding>

The Axis WebService generated from this WSDL will return output messages
with the body element name "writeResponse":

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <ns1:writeResponse
        soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
        xmlns:ns1="http://org.jason/axis/services/DataService"/>
 </soapenv:Body>
</soapenv:Envelope>

I would like to have Axis return output messages with the body element name
"ok":

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <ns1:ok
        soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
        xmlns:ns1="http://org.jason/axis/services/DataService"/>
 </soapenv:Body>
</soapenv:Envelope>

Is this possible?  I've tried specifying an attribute "name" in the WSDL
output message element, but to no avail.  Any help is greatly appreciated...

Thanks,
Jason Howe

---------------------------------------------
Jason Howes          Senior Software Engineer
BEA Systems          781.993.7345
4 Van de Graaff Dr.  [EMAIL PROTECTED]
Burlington, MA 01803 http://www.bea.com/
---------------------------------------------

Reply via email to