Take the 2-minute tour ×

I'm dynamically building a CAML string then sending a request to SharePoint web services via JavaScript to retrieve some (or lots of) rows from a list.

When querying lists.asmx I can build huge CAML queries (1000+ OR nests) and it works fine but when querying dspsts.asmx I can only build up to 25. Anything more and I get an error:

      <faultstring>Query syntax error near 'Where'.</faultstring>
        <queryResponse xmlns="http://schemas.microsoft.com/sharepoint/dsp">
          <dsQueryResponse status="failure" />
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Not sure what the question is, but an obvious answer to anything having to do with dspsts.asmx is that it is obsolete. This web service was introduced in Sharepoint 2.0 almost 10 years ago and has a lot of limitations that were resolved in SP 2007 with lists.asmx. No matter what the question or the problem is, it won't get fixed.

In SharePoint 2010 it is preferable to use the REST interface or the various client libraries (for .NET, Silverlight, Javascript) wherever possible. These queries and updates a lot easier than using the web services. You can even use LINQ queries in .NET clients or similar functions in Javascript to make coding a lot easier.

Besides, using a 1000 nests is far, far too much. I suspect you are trying to execute something similar to the SQL operator IN (a,b,c,,,). In SharePoint 2010 you can use the operator to do exactly that.

share|improve this answer
Thanks. 1000+ nests on lists.asmx was only a test, to see if it was SharePoint integrally had a limit/issue or if the issue was with dspsts.asmx. I will just use lists.asmx for this instance, although dspsts.asmx returns much cleaner data. For now we still use SP2007 but moving to SP2010 soon, so it's interesting to see the new built in Javascript functions and REST interface –  Fergal Feb 7 '12 at 13:35

Your Answer


