Search code examples
javawcfsaas

Consuming WCF service from Java client


I have WCF service with basicHttpBinding:

 <basicHttpBinding>
    <binding name="DefaultBasic" closeTimeout="00:30:00" openTimeout="00:30:00"
      receiveTimeout="05:00:00" sendTimeout="00:30:00" maxBufferSize="655360000"
      maxBufferPoolSize="524288000" maxReceivedMessageSize="655360000">
      <readerQuotas maxDepth="655320000" maxStringContentLength="655320000"
        maxArrayLength="655320000" maxBytesPerRead="655320000"        maxNameTableCharCount="655320000" />
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Basic" />
        <message clientCredentialType="UserName" />
      </security>
    </binding>
  </basicHttpBinding>

Does java clients can consume this service? Colleagues told that this part of wsdl is a problem:

<wsp:Policy wsu:Id="Basic_policy">
 <wsp:ExactlyOne>
   <wsp:All>
       <http:BasicAuthentication     xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http"/>
   </wsp:All>
 </wsp:ExactlyOne>
</wsp:Policy>

EDIT: Does java clients can consume service with Windows authentication ?


Solution

  • The problem is that the service you want to invoke need basic http authentication, maybe this previous post can help you.