How to implement the WSDL provided by a business partner?

I was provided with a wsdl file by another business to create a webservice so that another business could connect to the service that I built using the provided wsdl and xsd files. I am a dot net developer using wcf. I want to know where to start working with wsdl and xsd files.

thanks

+4
source share
3 answers

Let's hope the schemas and WSDL are .NET friendly. If you want to use WCF, you can create your own classes using SvcUtil.exe .

 svcutil -noconfig -serializer:datacontractserializer -d:../ -namespace:*,MyCompany.Services.ServiceName wsdl.wsdl Messages.xsd Data.xsd 

The bad news is that svcutil actually generates a proxy server on the client side, so you need to manually go and remove the client and channel classes.

For a complete description of this approach, see Schema-Based Development with the Windows Communication Foundation .

The article also talks about the Visual Studio add-in, WSCF.blue , which allows you to do data contract creation (among other tasks of the first contract task).

+6
source

You can use the .net wsdl tool and the xsd tool to automatically generate your classes.

+3
source

A quick and lazy way to do this is to simply use the add link in VS (assuming .net3.5 +) or add a web link for .net 2; and let VS do the work.

http://www.eggheadcafe.com/tutorials/aspnet/a1647f10-9aa4-4b0c-bbd9-dfa51a9fab8e/adding-wcf-service-refere.aspx

As ( http://andrewtokeley.net/archive/2008/07/10/the-difference-between-ldquoadd-web-referencerdquo-and-ldquoadd-service-referencerdquo.aspx ) says that this is basically a wrapper for functions, added by Tuzo and Ben.

Makes life easier, and with the "Add service wrapper" you can use the advanced settings to automatically create ASync classes and Data Contracts.

0
source

Source: https://habr.com/ru/post/1309451/


All Articles