You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "kevin_d@mindspring.com" <ke...@mindspring.com> on 2002/05/01 20:18:27 UTC

Interop - WSDL2Java (Beta 2) and .Net with overloaded methods

I'm a bit fuzzy about whether WSDL2Java is supposed to support overloaded methods. I'm trying to generate proxies for a Microsoft .Net web service that has overloaded method signatures. In the .Net model, the methods are identified uniquely using the "MessageName" property on the WebMethod attribute. However, WSDL2Java generates two methods with the exact same function signature, so the code won't build. Has anyone else tried this?

The operation WSDL that .Net spits out looks like this:
 <operation name="SearchCatalog">
  <soap:operation soapAction="http://www.viewstar.com/webservices/2002/04/SearchCatalogDefaultCatalogSet" style="document" /> 
- <input name="SearchCatalogDefaultCatalogSet">
  <soap:body use="literal" /> 
  <soap:header d5p1:required="true" message="s0:SearchCatalogDefaultCatalogSetSessionTokenHeader" part="SessionTokenHeader" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" /> 
  </input>
- <output name="SearchCatalogDefaultCatalogSet">
  <soap:body use="literal" /> 
  <soap:header d5p1:required="true" message="s0:SearchCatalogDefaultCatalogSetSessionTokenHeader" part="SessionTokenHeader" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" /> 
  </output>
  </operation>
- <operation name="SearchCatalog">
  <soap:operation soapAction="http://www.viewstar.com/webservices/2002/04/SearchCatalog" style="document" /> 
- <input>
  <soap:body use="literal" /> 
  <soap:header d5p1:required="true" message="s0:SearchCatalogSessionTokenHeader" part="SessionTokenHeader" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" /> 
  </input>
- <output>
  <soap:body use="literal" /> 
  <soap:header d5p1:required="true" message="s0:SearchCatalogSessionTokenHeader" part="SessionTokenHeader" use="literal" xmlns:d5p1="http://schemas.xmlsoap.org/wsdl/" /> 
  </output>
  </operation>


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


Re: Interop - WSDL2Java (Beta 2) and .Net with overloaded methods

Posted by Bob Cotton <bc...@synxis.com>.
>>>>> "kevin" == kevin d <ke...@mindspring.com> writes:

    kevin> I'm a bit fuzzy about whether WSDL2Java is supposed to
    kevin> support overloaded methods. I'm trying to generate proxies
    kevin> for a Microsoft .Net web service that has overloaded method
    kevin> signatures. In the .Net model, the methods are identified
    kevin> uniquely using the "MessageName" property on the WebMethod
    kevin> attribute. However, WSDL2Java generates two methods with
    kevin> the exact same function signature, so the code won't
    kevin> build. Has anyone else tried this?

I'm seeing the same, but going Java2WSDL -> WSDL2Java 

I get in the generated WSDL:

      <wsdl:operation name="getInventory" parameterOrder="authToken chainId hotelId startDate endDate">
         <wsdl:input message="intf:getInventoryRequest"/>
         <wsdl:output message="intf:getInventoryResponse"/>
         <wsdl:fault message="intf:SrmsException" name="SrmsException"/>
      </wsdl:operation>
      <wsdl:operation name="getInventory" parameterOrder="hotel startDate endDate">
         <wsdl:input message="intf:getInventoryRequest1"/>
         <wsdl:output message="intf:getInventoryResponse1"/>
      </wsdl:operation>

Get me in the generated java:

    public java.util.HashMap getInventory(com.synxis.srms.domain.SrmsHotelIF hotel, java.util.Date startDate, java.util.Date endDate) throws java.rmi.RemoteException, com.synxis.srms.webservices.client.va.SrmsException;
    public java.util.HashMap getInventory(com.synxis.srms.domain.SrmsHotelIF hotel, java.util.Date startDate, java.util.Date endDate) throws java.rmi.RemoteException, com.synxis.srms.webservices.client.va.SrmsException;

- Bob

-- 
SynXis Corporation      | bob@synxis.com    | Obstacles are those frightful 
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 | things you see when you take your
Denver, CO  80202       | Fax:(303)534-4257 | eyes off your goal.  -Henry Ford