Thanks to user in.the.dark on MSDN forums (http://forums.msdn.microsoft.com/en-US/sharepointdevelopment/thread/80be9abc-f9e0-49b6-8ebc-8f90ddbf27a2/), a workaround is to set the URL programmatically, like so:
using (com.company.Lists lists = new com.company.Lists())
{
lists.Url = "http://company.com/Clients/_vti_bin/Lists.asmx";
XmlNode listColl = lists.GetListCollection();
}
listColl now contains the subsite's lists, rather than the root site's lists.
2 comments:
Adding this line that sets the URL creates a new error -
Possible SOAP version mismatch: Envelope namespace [url] was unexpected. Expecting [url].
For me, the signature for GetListItems method is
public System.Xml.Linq.XElement GetListItems(string listName, string viewName, System.Xml.Linq.XElement query, System.Xml.Linq.XElement viewFields, string rowLimit, System.Xml.Linq.XElement queryOptions, string webID)
It use XElement, not XmlElement neither XmlNOde.
And I get the same error about it.
Post a Comment