Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when add web reference to http://...vti_bin/Lists.asmx, got error message:

The document at the url http://.../_vti_bin/Lists.asmx was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text

re-try, add ?wsdl at the end of url, looks like it could add the web reference.

then start consuming the web services, it may not work for all the items.

for example: it works well for GetListCollection()
but I got problems with GetListItems

it works when using query for GetListItems
System.Xml.XmlElement query = xmlDoc.CreateElement("Query");
query.InnerXml = "<Where><Eq><FieldRef Name='ID' /><Value Type='Counter'>3</Value></Eq></Where>";

if I update the query.InnerXml to: (I'm pretty sure the list has a column 'Title')
query.InnerXml = "<Where><IsNotNull><FieldRef Name='Title'></FieldRef></IsNotNull></Where>";

got an exception,
{"Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown."}

whatever other queries (other than Name = 'ID') I tries, got the same exception.

Could please someone let me know how to troubleshooting this issue. Thanks!

What I have tried:

please see problem description
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900