Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate webservice from wsdl

This is maybe a really simple question, but I couldn't locate an answer:

For a client I need to HOST a webservice. The client has sent me a wsdl file that the webservice should 'implement'. How do I go about that? I've generated any number of client-rpoxies but this is the other way around. I can use both ASP.NET 2.0 webservices or Windows Communication Foundation.

like image 498
edosoft Avatar asked Aug 03 '09 07:08

edosoft


People also ask

How do I create a web service out of WSDL?

In Visual Studio, create or open an Enterprise Server Application project that contains a WSDL file that describes a COBOL application. In the Solution Explorer, right-click the WSDL file; then select Generate Web Service from the context menu.

Can we create web service using WSDL?

Typically, you start from WSDL to build your web service if you want to implement a web service that is already defined either by a standard or an existing instance of the service.

What is a WSDL generator?

A Web Services Description Language (WSDL) document specifies the interface to a web service, and enables a web service client to start it. A WSDL document that is generated from a message model defines web service requests and responses in terms of the messages that you have defined in that message model.

Is WSDL a web service?

WSDL is an XML notation for describing a web service. A WSDL definition tells a client how to compose a web service request and describes the interface that is provided by the web service provider.


1 Answers

wsdl.exe /server.

Generates an abstract class for an XML Web service based on the contracts. The default is to generate client proxy classes. When using the /parameters option, this value is a element that contains "server".

You can do a similar thing with svcutil.exe for WCF- something like:

svcutil.exe thewsdl.wsdl /language:c# /out:ITheInterface.cs (I've not tested this).

Edit- John Saunders makes a good point in his answer to favour the WCF approach- I recommend this too.

like image 191
RichardOD Avatar answered Oct 14 '22 21:10

RichardOD