c# - How to override Wsdl generation in Web Services .Net -
I would like to create a WebService that exposes many webmoles on the net
Let me introduce a webserver version Requirements per new implementation (new property in webmooth or business object) such as:
[webserver (namespace = "http://tempuri.org/")] [WebSiteBuzz (Confofo to = WSIIPROPLES BasicProfile1_1)] Public Service: System. Web. Services. Web service [Webmissions] [WebServiceVersion ("1.0")] Public string hello () {return "Hello world"; } [WebMethod] [WebServerSversion ("1.1")] Public String Newmapinists 1_1 () {Return "Hello World"; }}
With UrlRewriting or HttpHandler:
HelloWelld Webmoth only:
HelloWald WebMath and NMathineWebs 1_1:
< P> How can I generate the WSDL dynamically for the specific version used by the customer?
Resolution:
- Create a directory for each web service version : / 1 /; / 2 /; / 3 / ...
- Each version of the Web service comes from the previous version: / 2 / service: _1.Service; / 3 / service: _2.Service ...
- Apply XmlSchemaProvider to an object Return to the webmath directly with custom serialization using the IXmlSerializable interface
- A WebServiceVersionAttribute (ex : Property account only big or equal to web service version 2)
- Prevent the Web service version (use a regex: New Regex ("/ [[0-9]) with an HTTP module . / /. (*) * "))
- WriteXml method of the IXmlSerializable interface filters WebServiceVersionAttribute XML results
Implementing XmlSchemaProvider is the biggest difficulty ...
Comments
Post a Comment