title: WCF error calling Ws2007HttpBinding
body: <p>I am trying to get data from a WCF ws2007HttpBinding service but I am getting the following error every time I run it:</p>
  
  <pre><code>Content Type application/soap+xml; charset=utf-8 was not supported by service 
  http://localhost/GoldInSacks.MutualFunds.local/MutualFunds.svc.  The client
  and service bindings may be mismatched.
  </code></pre>
  
  <p>The InnerException reads this:</p>
  
  <pre><code>The remote server returned an error: (415) Cannot process the message because 
  the content type 'application/soap+xml; charset=utf-8' was not the expected 
  type 'text/xml; charset=utf-8'..
  </code></pre>
  
  <p>The system.ServiceModel section of the web.config looks like this:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;services&gt;
          &lt;service name="GoldInSacks.MutualFunds"&gt;
              &lt;endpoint address="" 
                        binding="ws2007HttpBinding" 
                        contract="GoldInSacks.MutualFunds.Local.IMutualFunds" /&gt;
          &lt;/service&gt;
      &lt;/services&gt;
  
      &lt;bindings&gt;
          &lt;ws2007HttpBinding&gt;
              &lt;binding&gt;
                  &lt;security mode="None" /&gt;
              &lt;/binding&gt;
          &lt;/ws2007HttpBinding&gt;
      &lt;/bindings&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>and the client code which is currently running in a console application looks like this:</p>
  
  <pre><code>        EndpointAddress address = 
              new EndpointAddress("http://localhost/MutualFunds.local/MutualFunds.svc");
  
          var binding = new WS2007HttpBinding();
          binding.Security.Mode = SecurityMode.None;
  
          ChannelFactory&lt;IMutualFundsChannel&gt; channelFactory = 
              new ChannelFactory&lt;IMutualFundsChannel&gt;(binding, address);
          IMutualFundsChannel channel = channelFactory.CreateChannel();
  
          var mf = channel.GetMutualFundsByCustomer(1);
  
          channel.Close();
  
          foreach (var m in mf)
          {
              System.Console.WriteLine(m.Name);
          }
  
          System.Console.ReadLine();
  </code></pre>
  
  <p>The error occurs on the call to GetMutualFundsByCustomer.</p>
  
  <p>I did try wsHttpBinding as well but it gave the same error.</p>
  
  <p>Does anybody know how to make this work?</p>
  
  <p>(I apologize for the terseness of this question but it's late and I need sleep).</p>