title: WCF client errors when consuming Java services
body: <p>I'm currently working on a project where I need to consume a Java webservice. If I connect  to the service using old webservices (asmx) it works fine. However, If I try to do the same thing with a WCF client I get the following error:</p>
  
  <p>The content type text/xml; charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.</p>
  
  <p>My is very simple and it looks like the following:</p>
  
  <pre><code>//classic web service
  OldSkoolService.HelloService serviceCall = new esb_wsdlsample.OldSkoolService.HelloService();
  Console.WriteLine(serviceCall.SoapVersion);
  Console.WriteLine(serviceCall.sayHello("something"));
  
  HelloServiceClient prototypeClient = new HelloServiceClient();
  var serviceChannel = prototypeClient.ChannelFactory;
  
  Console.WriteLine(serviceChannel.Endpoint.Binding.MessageVersion);
  Console.WriteLine(prototypeClient.sayHello("somethinge")); //&lt;-- Error occurs here       
  </code></pre>
  
  <p>The the binding/endpoint config file is quite simple as well:</p>
  
  <pre><code>&lt;bindings&gt;
    &lt;customBinding&gt;
      &lt;binding name="Soap12Binding"&gt;
        &lt;textMessageEncoding messageVersion="Soap12"/&gt;
        &lt;httpTransport /&gt;              
      &lt;/binding&gt;
    &lt;/customBinding&gt;        
  &lt;/bindings&gt;
  &lt;client&gt;
      &lt;endpoint address="http://10.10.6.51:7001/esb/HelloService" behaviorConfiguration=""
          binding="customBinding" bindingConfiguration="Soap12Binding" contract="Prototype.ESB.HelloService"
          name="HelloServicePort" /&gt;          
  &lt;/client&gt;
  </code></pre>
  
  <p>As a side note I'm trying to use soap 1.2, because I need to be able to catch exceptions from the service.</p>