var arr = new Array();
var a = new ActiveXObject("Microsoft.XMLHTTP");
var id="dwt";
var listName="testlist";
var query="<query><where><gt><fieldref name="ID"><value type="Counter">0</value></fieldref></gt></where></query>";
if (a == null) return null;
var getListRequest = "<!--?xml version=\"1.0\" encoding=\"utf-8\"?-->"
+ "<soap:envelope xmlns:xsi="\"http://www.w3.org/2001/XMLSchema-instance\"" xmlns:xsd="\"http://www.w3.org/2001/XMLSchema\"" xmlns:soap="\"http://schemas.xmlsoap.org/soap/envelope/\"">"
+ "<soap:body>"
+ "<getlistitems xmlns="\"http://schemas.microsoft.com/sharepoint/soap/\"">"
+ "<listname>" + listName + "</listname>"
+ "<query>" + query + "</query>"
+ "</getlistitems>"
+ "</soap:body>"
+ "</soap:envelope>";
a.Open("Post", http://servername:100/sites/Test/_vti_bin/Lists.asmx?op=GetListItems", false);
a.setRequestHeader("Content-Type:", "text/xml; charset=utf-8");
a.setRequestHeader("SOAPAction:", "http://schemas.microsoft.com/sharepoint/soap/GetListItems");
a.Send(getListRequest);
var xmlDoc = a.responseXML;This code snippet for Select All data from List Using Caml Query and sharepoint web services.this use for out of box application.
