1

I am currently using WCF to connect to our Java web services via the following configuration:

<bindings>
    <basicHttpBinding>
        <binding name="WebServicePortBindingHttp" maxReceivedMessageSize="500000">
            <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Basic" proxyCredentialType="None" realm="" />
            </security>
        </binding>
    </basicHttpBinding>
</bindings>
<client>
    <endpoint address="http://host:port/url" binding="basicHttpBinding" bindingConfiguration="WebServicePortBindingHttp" contract="Namespace.WSPort" name="WebServicePort" />
</client>

This is using normal HTTP. Even so, the server wouldn't authorize me until I manually added the WSSE headers using the method suggested in this answer. Once I started doing that, I was able to consume the web services without trouble.

On some of our environments, however, the server that my C# client must connect to uses HTTPS instead of HTTP. For this, the configuration given above does not work. To begin with, I had to change the security mode from TransportCredentialOnly to Transport, like so:

<binding name="WebServicePortBindingHttp" maxReceivedMessageSize="500000">
    <security mode="Transport">
        <transport clientCredentialType="Basic" proxyCredentialType="None" realm="" />
    </security>
</binding>

I have tried numerous variations on these settings, however all that happens is the request times out. When I use Wireshark to trace the communication, I can see that the server is actually responding, but I can't interpret its response as the text appears garbled (I guess because it is encrypted).

This is what the binding configuration looks like that is automatically created by Visual Studio when I import the WSDL:

<customBinding>
    <binding name="HTTPSoapBinding">
        <textMessageEncoding messageVersion="Soap11" />
        <httpsTransport />
    </binding>
</customBinding>

But this still does not change the behaviour. It would appear that Microsoft and Oracle technologies do not simply interoperate.

Please advise.

Community
  • 1
  • 1
Stephan B
  • 837
  • 1
  • 16
  • 41

1 Answers1

0

I'm an idiot. There was something else causing the timeout! This configuration actually works:

<binding name="WebServicePortBindingHttp" maxReceivedMessageSize="500000">
    <security mode="Transport">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
    </security>
</binding>

Strangely enough, now that I have identified the cause of my timeout, the webservice seems to accept just about any value for clientCredentialType (so far I have tried None, Basic and Windows, and all of them work). Could anyone explain this?

I apologize if I wasted anyone's time with this question.

Stephan B
  • 837
  • 1
  • 16
  • 41