title: Connect via Java client to WCF Service
body: <p>I have WCF service which has 2 endpoints: wsHttpBinding and basicHttpBinding. I can connect to each endpoint  via C# client.</p>
  
  <p>My Wcf Service configuration</p>
  
  <pre><code>  &lt;service behaviorConfiguration="App.ServiceBehavior"
            name="MyService"&gt;
          &lt;endpoint address="/ws" binding="wsHttpBinding" bindingConfiguration="httpBindingForWs"
             contract="Namespace.IMyService"&gt;
            &lt;identity&gt;
              &lt;dns value="127.0.0.1" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="/basic" binding="basicHttpBinding" bindingConfiguration="httpBindingForBasic"
              contract="Namespace.IMyService"&gt;
            &lt;identity&gt;
              &lt;dns value="127.0.0.1" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://127.0.0.1:12000/MyService" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
  </code></pre>
  
  <p>I can generate wsdl in Java. Can you show me sample code, how can I consume basicHttpBinding in Java?</p>