Using WCF with non-microsoft clients

The default wsdl that WCF creates isn't very friendly for human's and other non-microsoft clients to read. To remedy this you can intsall WCFExtras: http://wcfextras.codeplex.com/

To use it, in your endpoint declaration add a "behaviorConfiguration" element with a name something like "WsdlRedirect". Then add an endpointBehaviors declaration something like this:
 
    <behaviors> 
      <endpointBehaviors> 
        <behavior name="WsdlRedirect"> 
          <wsdlExtensions location="https://testwebservices.website.ca/SomeService.svc" 
                          singleFile="True" /> 
        </behavior> 
      </endpointBehaviors> 
 
And add an extension under system.serviceModel like this: 
 
  <system.serviceModel> 
    <extensions> 
      <behaviorExtensions> 
        <add name="wsdlExtensions
             type="WCFExtras.Wsdl.WsdlExtensionsConfig, WCFExtras, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/> 
      </behaviorExtensions> 
    </extensions>

Comments

Popular posts from this blog

ToMethodObject Refactoring

How to unlock a file in Team Foundation Server(TFS)

Show/Hide formatting text in MS Word 2010