Monday, 18 February 2008

Add or remove web-service protocols at the server ...

Found this useful blog entry just now:

http://blogs.msdn.com/kaevans/archive/2005/11/10/491640.aspx

The crux is this:

Member name Description
AnyHttpSoap Any version of the HTTP SOAP protocol. 
Documentation The Web Services Documentation protocol. 
HttpGet The HTTP GET protocol. 
HttpPost The HTTP POST protocol. 
HttpPostLocalhost The HTTP POST LOCALHOST protocol. 
HttpSoap The HTTP SOAP protocol. 
HttpSoap12 The HTTP SOAP version 1.2 protocol. 
Unknown Unknown protocol. 

You can use these values in the webServices/protocols element to add and remove capability.  For instance, if you want to remove SOAP 1.2 support for your service, you would include the following in your web.config:


<configuration>
<system.web>
<webServices >
<protocols>
<remove name="HttpSoap12"/>
</protocols>
</webServices>
</system.web>
</configuration>

Similarly, if you want to remove support for SOAP 1.1 and only support SOAP 1.2, you would use the following config:


<configuration>
<system.web>
<webServices >
<protocols>
<remove name="HttpSoap"/>
</protocols>
</webServices>
</system.web>
</configuration>


No comments:

Post a Comment