尝试通过SOAP将Python与Sharepoint交谈。Sharepoint/SOAP - GetListItems忽略查询
我试图查询的其中一个列表包含'ID'作为主键字段。
(Field){
_RowOrdinal = "0"
_FromBaseType = "TRUE"
_DisplayName = "ID"
_Name = "ID"
_SourceID = "http://schemas.microsoft.com/sharepoint/v3"
_ColName = "tp_ID"
_StaticName = "ID"
_PrimaryKey = "TRUE"
_ReadOnly = "TRUE"
_Type = "Counter"
_ID = "{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}"
},
我们发送以下请求与ID = 77
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns1:GetListItems>
<ns1:listName>60e3f442-6faa-4b49-814d-2ce2ec88b8d5</ns1:listName>
<query><Query><Where>
<Eq>
<FieldRef Name="ID"/>
<Value Type="Counter">77</Value>
</Eq>
</Where></Query></query>
</ns1:GetListItems>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
不过的Sharepoint返回的所有项目从列表中完全无视查询来查询列表项。
有什么想法?
也不会影响以下代码:http://pastie.org/1570201 – 2011-02-16 12:00:17
如果您使用类似U2U CAML查询生成器(http://www.u2u.net/Tools/wincamlquerybuilder)会发生什么情况/CamlQueryBuilder.aspx)执行相同的查询? – 2011-02-16 12:21:49