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.

    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) ?

1 Answer 1


The documentation says the parameter is webURL, not webUrl.

GetListItems: [webURL], listName, viewName, CAMLViewFields, CAMLQuery, CAMLRowLimit, CAMLQueryOptions

Give that a try and see if it helps.

  • this is what happens when one copies code from the internet without double checking. thank you, it was driving me crazy.
    – dinnouti
    Commented Jan 6, 2017 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.