First WCF development

It is well known how to create the first WCF service with a contract, where the first step is to define ServiceContract and DataContract s.

How to approach WCF development if you have a "first schema." In other words, the XSD scheme was independently developed. A service cannot deviate from an already defined scheme. As a complication, a circuit may use functions that are not translated into a DataContract (the capabilities of a DataContract , after all, very minimal).

Using XDocument on the server or on the client side for the entire document will be fine and good. (Using an XDocument would be very preferable to anything related to the XmlSerializer , which unfortunately seems to have gone out of use without replacement). It is a requirement that the metadata / WSDL correctly display the actual schema in accordance with standards. It may not report a β€œgeneric” scheme such as xsd: any. (Figuring out how to deal with these WSDL requirements is the part that gives me a big problem.)

(Similar questions / answers here do not apply to XDocument or WSDL requirements.)

+6
wsdl wcf xsd
source share
1 answer

If you already have an XSD, the only missing link between them and the WCF interface is WSDL. Once you have WSDL, you can use svcutil.exe to create WCF interfaces and classes that are properly annotated with the required attributes.

You can do this in a complicated way and write WSDL manually, but you also want to consider the WSCF tool.

+4
source share

All Articles