WSDL for REST WCF

前端 未结 2 1348
说谎
说谎 2021-01-14 09:29

I\'ve created a REST WCF in C# by specifying WebGET and WebHttpBinding in web.config. The service works fine through IE. My wsdl starts as below and it has soap in wsdl. Sin

2条回答
  •  青春惊慌失措
    2021-01-14 10:27

    As stated above, REST has no concept of a WSDL in WCF, only SOAP. If the URL for ?wsdl works, then you probably have a 'mex' (Metadata Exchange) endpoint defined in your configuration, which is what serves up the WSDL. This is usually added by default if you add a WCF service through the VisualStudio wizards. If it is there, it can be removed if you don't plan on using SOAP. It will usually look something like this:

    
    

    On a side-note; it is possible to have WCF serve up the same services as both SOAP and REST, as detailed here: REST / SOAP endpoints for a WCF service

提交回复
热议问题