我正在使用 AJAX 向 Sharepoint 发送 Web 服务调用以检索列表项。
我得到结果的第一页:
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>ListName</listName> \
<rowLimit>10</rowLimit> \
<query> \
<Query> \
<Where> \
<IsNotNull> \
<FieldRef Name='Title'/> \
</IsNotNull> \
</Where> \
<OrderBy> \
<FieldRef Name='Title' Ascending='True' /> \
</OrderBy> \
</Query> \
</query> \
<queryOptions><QueryOptions/></queryOptions> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>"
然后我可以使用结果中的书签转到下一页:
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
<soapenv:Body> \
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<listName>ListName</listName> \
<rowLimit>10</rowLimit> \
<query> \
<Query> \
<Where> \
<IsNotNull> \
<FieldRef Name='Title'/> \
</IsNotNull> \
</Where> \
<OrderBy> \
<FieldRef Name='Title' Ascending='True' /> \
</OrderBy> \
</Query> \
</query> \
<queryOptions><QueryOptions> \
<Paging ListItemCollectionPositionNext='" + bookmark + "'" + " /> \
</QueryOptions></queryOptions> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>"
其中书签是“Paged=TRUE&p_Title=BlahBlah;p_ID=5”
但是我想跳到第 30 页或最后一页,很明显我没有合适的 p_Title 值。我尝试添加具有各种数字的 PageFirstRow 变量,但它不会改变结果。如果我省略 p_Title,我只会再次获得第一页。更改 p_ID 没有任何作用。
有任何想法吗?
谢谢,乔尔