Java – wshttpbinding is only for .net clients

javawcfwshttpbinding

Is the wsHttpBinding only for .NET clients?

Because in wsHttpBinding default security is enabled, so data transferred with encryption.
So how can non-.NET clients (like java or php) consume such WCF services?

Best Answer

The default Message security for WsHttpBinding is set to "Windows", I believe. This may well be because this will make security work out of the box, at least for a WCF service and client.

If you need to be interoperable, it's easy to change this though. You can set it to any one of these:

  • Windows (the default)
  • None
  • UserName
  • Certificate
  • IssuedToken

See the "message, of wsHttpBinding" MSDN page for more details. To test communication with your Java or PHP client you could temporarily disable security:

<wsHttpBinding>
  <binding>
    <security mode="Message">
      <!-- Not recommended! Use only for testing. -->
      <message clientCredentialType="None" />
    </security>
  </binding>
</wsHttpBinding>

After you got things working you could switch to -for example- using certificates, depending on what your non-WCF side supports.