title: Soap webservice returns "The content type application/soap+xml; charset=UTF-8"
body: <p>I'am trying to communicate with some SOAP webservice (which is from Joomla)
  I keep getting this error:</p>
  
  <pre><code>The content type application/soap+xml; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 330 bytes of the response were: '&lt;?xml version="1.0" encoding="UTF-8"?&gt;
                      &lt;SOAP-ENV:Envelope
                          xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt;
                          &lt;SOAP-ENV:Body&gt;
                              &lt;SOAP-ENV:Fault&gt;
                                  &lt;faultcode&gt;SOAP-ENV:Server&lt;/faultcode&gt;
                                  &lt;faultstring&gt;401 Unauthorized&lt;/faultstring&gt;
                              &lt;/SOAP-ENV:Fault&gt;
                          &lt;/'.
  </code></pre>
  
  <p>I have tried every binding I can think of but I am yet to figure out what is causing my problems</p>
  
  <p>Code:</p>
  
  <pre><code>            using (NewPconradesenTest.Tag.siteredshopbtag100Client client = new Tag.siteredshopbtag100Client())
          {
              client.ClientCredentials.UserName.UserName = username;
              client.ClientCredentials.UserName.Password = password;
              client.Open();
              Console.WriteLine("\nClient State: " + client.State.ToString());
  
              try
              {
                  Tag.readList_filters filter = new Tag.readList_filters();
                  var result = client.readList(0, 99, emptyString, filter, emptyString, emptyString, language);
  
              }
              catch(Exception e)
              {
                  Console.WriteLine(e.Message.ToString());
                  Console.WriteLine(e.InnerException.ToString());
                  Console.WriteLine(e.Source.ToString());
                  //Console.WriteLine(e.HResult.ToString());
                  //Console.WriteLine(e.StackTrace.ToString());
              }
          }
  </code></pre>
  
  <p>App.config:</p>
  
  <pre><code>&lt;bindings&gt;
      &lt;customBinding&gt;
          &lt;binding name="site.redshopb-tag.1.0.0"&gt;
              &lt;textMessageEncoding messageVersion="Soap11" /&gt;
              &lt;httpTransport/&gt;
          &lt;/binding&gt;
      &lt;/customBinding&gt;
  &lt;/bindings&gt;
  &lt;client&gt;
      &lt;endpoint address="XXXXXXXXXXXXXXXXXXXXXXX;view=tag&amp;amp;api=soap"
          binding="customBinding" bindingConfiguration="site.redshopb-tag.1.0.0"
          contract="Tag.siteredshopbtag100" name="site.redshopb-tag.1.0.0_Soap" /&gt;
  &lt;/client&gt;
  </code></pre>
  
  <p>I hope somebody can help me, Thanks for your time</p>