Search code examples
javac#web-serviceswcfwsdl

How do I translate a WSDl generated for Java Webservice into a C# client?


I am in .NET environment and I am supposed to reference and consume a java WebService with a WSDL.

I am not a wsdl master and neither have I done extensive work in WCF but normally WCF has two kind of binding which are BasicHTTP and WSHTTP but it sounds like I am not able to find any details on this looking at the WSDL. instead I do see something like following:

<wsdl:port name="SFAPI12" binding="tns:SFAPISoap12Binding">
  <wsdlsoap12:address location="https://api.successfactors.eu:443/sfapi/v1/soap12" /> 
  </wsdl:port>

followed by

<wsdl:binding name="SFAPISoapBinding" type="tns:SFAPI"><wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

I have no idea how to consume it in my C# application. Any ideas?


Solution

  • Right click the ServiceReference folder in your C# project, click on 'Add new service reference'. Give the java wsdl and enter an alias name for this service. Once this is done, then you can start using this alias for making client calls to the service.