axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10365] New: - Wrong code generated when using optional "name" attribute of input tag
Date Mon, 01 Jul 2002 07:13:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10365>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10365

Wrong code generated when using optional "name" attribute of input tag

           Summary: Wrong code generated when using optional "name"
                    attribute of input tag
           Product: Axis
           Version: current (nightly)
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: Werner.Dittmann@icn.siemens.de


Axis version: nightly download from June, 23.
JDK 1.3.1-b24

During generation of the client-side files from a WSDL file I spotted
a problem. WSDL2Java generates wrong code from the following WSDL
(modified GetQuote example, modifications marked with comment). The
only change I did: use the optional name attribute on the input tag in
the operation section of the binding paragraph. 

Calling WSDL2Java without any options produces the usual 4
files. However, the GetQuote interface reads:

public interface GetQuote extends java.rmi.Remote {
    public float getQuote(java.lang.String symbol) throws 
java.rmi.RemoteException;
    public void getQuote() throws java.rmi.RemoteException;

Note the additional and wrong getQuote() definition. This also 
causes a wrong GetQuoteBindingStub that does not omplement the 
correct getQuote(float) method. 
Another interessting fact: the original GetQuote WSDL file also
contains a Test method definition for notification. If this is 
left in, the error does _not_ ooccur. You have to delete the 
Test method, operation and bindings.

<?xml version="1.0" ?>

<definitions name="urn:GetQuote" 
             targetNamespace="urn:xmltoday-delayed-quotes"
             xmlns:tns="urn:xmltoday-delayed-quotes"
             xmlns:xsd="http://www.w3.org/1999/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns="http://schemas.xmlsoap.org/wsdl/">

  <!-- message declns -->
  <message name="GetQuoteRequest">
    <part name="symbol" type="xsd:string"/>
  </message>

  <message name="GetQuoteResponse">
    <part name="result" type="xsd:float"/>
  </message>

  <!-- port type declns -->
  <portType name="GetQuote">
    <operation name="getQuote" >
      <input  message="tns:GetQuoteRequest"/>
      <output message="tns:GetQuoteResponse"/>
    </operation>
  </portType>

  <!-- binding declns -->
  <binding name="GetQuoteBinding" type="tns:GetQuote">
    <soap:binding style="rpc" 
                  transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="getQuote">
      <soap:operation soapAction="getQuote"/>
      <input name="justName">	****** here is the difference ****
        <soap:body use="encoded" 
                   namespace="urn:xmltoday-delayed-quotes" 
                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body use="encoded" 
                   namespace="urn:xmltoday-delayed-quotes"
                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
  </binding>

  <!-- service decln -->
  <service name="GetQuoteService">
    <port name="GetQuote" binding="tns:GetQuoteBinding">
      <soap:address location="http://localhost:8080/axis/servlet/AxisServlet"/>
    </port>
  </service>

</definitions>

regards,
Werner

Mime
View raw message