我正在動態構建CAML字符串,然後通過JavaScript向SharePoint Web服務發送請求以從列表中檢索一些(或多個)行。SharePoint dspsts.asmx上的CAML限制vs lists.asmx
當查詢lists.asmx我可以建立龐大的CAML查詢(1000+ OR巢),它工作正常,但查詢dspsts.asmx的時候,我只能累積到25再說了,我得到一個錯誤:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client.Dsp.Syntax</faultcode>
<faultstring>Query syntax error near 'Where'.</faultstring>
<detail>
<queryResponse xmlns="http://schemas.microsoft.com/sharepoint/dsp">
<dsQueryResponse status="failure" />
</queryResponse>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
謝謝。 lists.asmx上的1000多個嵌套只是一個測試,以查看它是否是SharePoint整體存在限制/問題,或者問題是否與dspsts.asmx有關。雖然dspsts.asmx會返回更乾淨的數據,但我只會使用lists.asmx作爲此實例。 現在我們仍然使用SP2007,但很快轉移到SP2010,所以有趣的是看到新的JavaScript函數和REST接口 – Fergal 2012-02-07 13:35:33