简体   繁体   中英

Creating WSDL and XSD from WCF Contract defined using C# Interface

I have a WCF service. Contract for the service is defined using interface. The implementation is not yet created. I need to create WSDL and XSD corresponding to the contract. I will deliver the soforth generated wsdl to my team members. They must be able to create the interface from the wsdl and create the service. What are the approaches/tools for creating the wsdl and xsd from the C# interface which is used as the contract? Also, how to create the interface back from the WSDL? Do I need to provide both the xsd and wsdl to the developers or only the WSDL?

What is the best approach for WSDL interoperability ?

Note: I have two services. One uses Data Contract. Second one uses Message Contract.

Note: I am using Visual Studio 2010 and .NEt 4.0


Reading:-

  1. Generating a WSDL from an XSD file

  2. Can you combine the WSDL and XSD data from a WCF service?

  3. What tool can I use to merge wsdl and xsd file?

Providing the WSDL should be enough as the WSDL would have the reference to the xsd's using the import attribute.

When defining your bindings for your WCF service make sure you use BasicHttpBinding (follows BasicProfile 1.1) which is interoperable.

Also you would consider flattening your WSDL for your service to be highly interoperable as at times php and other java clients might need flat wsdl. If you are using .NET 4.5 then you have this as an inbuild option now else you can check this link on how to flatten your wsdl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM