SharePoint 2010 SOAP Service Error (The top XML element 'string'...)


Today we were experimenting with SharePoint 2010 CSOM (Client Side Object Model) and we noticed strange errors such as HTTP ERROR 417 were returned. When browsing to Lists.asmx and Sites.asmx we got the following error:

SOAP Error

The top XML element 'string' from namespace 'http://schemas.microsoft.com/sharepoint/soap/' references distinct types System.String and Microsoft.SharePoint.SoapServer.SoapXml.SoapXmlElement. Use XML attributes to specify another XML name or namespace for the element or types.

One of the MSDN Forums’ answers stated that you could use direct WSDL link (http://url/_vti_bin/sites.asmx?wsdl) and that would work, which it does in the browser but not for CSOM. And besides, I don’t like these kind of errors on one of my environments while other environments work fine.

Turned out someone had disabled HttpGet, HttpPost and HttpPostLocalhost protocols in the web.config of the ISAPI folder (maps to _vti_bin).

web.config

Uncomment those lines and your Web Services should be fine again.

 


Links to this post

Comments

Tuesday, 7 Jan 2014 10:41 by Sadia
Worked for me thanks for the post

CAPTCHA Image Validation