0

I am consuming a web services using Service Reference.

I converted the result return using ToString().

using (ConnectClient client = new ConnectClient("ESConnect"))
                {
                    result = client.actiService("ssss", "sss", "sss").ToString();

The I use xml.linq to read the xml.

using (XmlReader reader = XmlReader.Create(new StringReader(result)))

I get the following error:

The content type text/plain 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.    

EDITED:

The web service is created using Apache Axis SOAP.

Alvin
  • 8,219
  • 25
  • 96
  • 177

1 Answers1

0

If you're just parsing an XML string you could try XDocument.Load

Echilon
  • 10,064
  • 33
  • 131
  • 217
  • Yes I am using it XDocument doc = XDocument.Load(reader, LoadOptions.SetLineInfo); – Alvin Sep 06 '12 at 07:56
  • The XDocument and XmlDocument classes are not the same. What's the error you see with XDocument.Load? – Echilon Sep 08 '12 at 09:55