I am running SPServices' GetListItems from a subsite (https://something.sharepoint.com/sites/intranet/op1/) querying a document library in the root (https://something.sharepoint.com/sites/intranet). This is my SPServices code.
$().SPServices(
{
webUrl : 'https://something.sharepoint.com/sites/intranet/',
operation : "GetListItems",
async : true,
listName : 'Documents',
CAMLViewFields : "<ViewFields><FieldRef Name='Title' /><FieldRef Name='EncodedAbsUrl'/></ViewFields>",
// CAMLQuery : camlQuery,
completefunc : function (xData, Status)
{
console.log('doclib_getListItems [xData]', xData);
console.log('doclib_getListItems [Status]', Status);
}
});
However I am getting an error "POST https://something.sharepoint.com/sites/intranet/op1/_vti_bin/Lists.asmx 500 (Internal Server Error)". I think it is trying to find the "Documents" list in the subsite but not in the site indicated by the webUrl. Is there a way to force SPServices webUrl to query the root _vti_bin (https://something.sharepoint.com/sites/intranet/_vti_bin/Lists.asmx) ?