when add web reference to http://...vti_bin/Lists.asmx, got error message:
The document at the url http:
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