title: .NET Web Service Client - Client found response content type of 'text/plain', but expected 'text/xml'
body: <p>I have an ASP.NET webpage that has a web reference to a SOAP WSDL. If I call the methods associated with this WSDL (the methods live on another server), everything works fine. However, I'd like to be able to dynamically change the endpoint address where the WSDL points. The reason being that we host the same set of web services for different groups and we like to track who's using the web services. So, each set has its own URL.</p>
  
  <p>I tried changing the "Url" property on my soap client object to a different endpoint, but when I do, the methods return this error:</p>
  
  <p>Client found response content type of 'text/plain', but expected 'text/xml'</p>
  
  <p>I'm thinking that the Url property confuses the proxy class into thinking that I'm now using a REST web service? </p>
  
  <p>Here's some of my code:</p>
  
  <hr>
  
  <pre><code>mySoapNamespace.mySoapClient soapClient = new mySoapNamespace.mySoapClient();
  
  //next I try to change the endpoint URL of the WSDL, misguided? ...
  soapClient.Url = "http://a_different_url/my_soap_server.wsdl";
  string result = soapClient.myTestMethod(); 
  Response.Write(result);
  </code></pre>
  
  <hr>
  
  <p>And that's where I get the error. Does anyone know a fix or a different way to dynamically change the endpoint of a SOAP call?</p>