title: WSDL with the same operation name and input type produce incorrect client stubs?
body: <p>I have a WSDL file with the same operation name and request parameter name. When I generated the client stubs using the WSDL file, the port class produces a method with void return type. Furthermore, the request parameter changes from a single object to the contents of that single object.</p>
  
  <p>Changing the operation name on the WSDL file to a different name works. However, I believe that modifying the WSDL file is a bad practice. Furthurmore, I have no access to the actual web service. As such I can't also change the actual operation name on the web service.</p>
  
  <p>Is there a way such that <code>wsimport</code> won't be confused with the operation name and the request parameter name? I tried using the <code>-B-XautoNameResolution</code> attribute in wsimport but it didn't fix the problem.</p>
  
  <p>My WSDL file looks like this: (As you can see, the operation name and request parameter name both uses the name 'transact')</p>
  
  <pre><code>&lt;xsd:schema targetNamespace="http://com.example"&gt;
      &lt;xsd:element name="transact"&gt;
          &lt;xsd:complexType&gt;
              &lt;xsd:sequence&gt;
                  &lt;xsd:element name="from" type="xsd:string"&gt;&lt;/xsd:element&gt;
                  &lt;xsd:element name="to" type="xsd:string"&gt;&lt;/xsd:element&gt;
              &lt;/xsd:sequence&gt;
          &lt;/xsd:complexType&gt;
      &lt;/xsd:element&gt;
  &lt;/xsd:schema&gt;
  
  &lt;wsdl:message name="requestdata"&gt;
      &lt;wsdl:part element="tns:transact" name="parameters"/&gt;
  &lt;/wsdl:message&gt;
  
  &lt;wsdl:message name="responsedata"&gt;
      &lt;wsdl:part element="tns:responsedata" name="parameters"/&gt;
  &lt;/wsdl:message&gt;
  
  &lt;wsdl:portType name="portname"&gt;
      &lt;wsdl:operation name="transact"&gt;
          &lt;wsdl:input message="tns:requestdata"/&gt;
          &lt;wsdl:output message="tns:responsedata"/&gt;
      &lt;/wsdl:operation&gt;
  &lt;/wsdl:portType&gt;
  </code></pre>
  
  <p>The resulting class is like this: (The return type is void and even though the input type is declared in the <code>RequestWrapper</code>, the declared methods inside the transact method is not the object itself.)</p>
  
  <pre><code>@WebMethod(action = "http://com.example/transact")
  @RequestWrapper(localName = "transact", targetNamespace = "http://com.example", className = "com.example.Transact")
  @ResponseWrapper(localName = "transactresponse", targetNamespace = "http://com.example", className = "com.example.TransactResponse")
  public void transact(
      @WebParam(name = "to", targetNamespace = "")
      String to,
      @WebParam(name = "from", targetNamespace = "")
      String from);
  </code></pre>