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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With