Currently I am using the lists.asmx webservice to POST a soap envelope and return specific list items. I really want the whole contents of the list. I realize how large that might get, but if this works the way I think it will, I'll be able to narrow that down.
Current code:
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>Produce</listName> \
<ViewFields> \
<FieldRef Name='Quantity' /> \
<FieldRef Name='Quantity2' /> \
</ViewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>";
$.ajax({
url: "https://mydomain.com/Sandbox/bitest/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
success: function(xData, status) { /*DO STUFF*/ }
});
Now I'm a bit of a greenhorn and I've just learned about the ListData.svc RESTful stuff that SharePoint 2010 will do. Let's say that I want to load the XML response from the ListData.svc service directly into a string. How do I do that?
https://mydomain.com/Sandbox/bitest/_vti_bin/ListData.svc/Produce
Seems like that will be the better way to go!
testXMLstring = <subsite_URL>/_vti_bin/owssvr.dll?Cmd=Display&List={List_GUID}&XMLDATA=TRUE&noredirect=true
? It didn't seem to work. – Chris Sep 4 '12 at 16:59