我是SharePoint网络服务的新手。我正在使用PHP将此请求发送到我的SharePoint服务器,但我的查询部分完全被忽略
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/">
<SOAP-ENV:Body>
<ns1:GetListItems>
<ns1:listName>Customers</ns1:listName>
<ns1:query>
<Query>
<Where>
<Eq>
<FieldRef Name="ows_EMail" />
<Value Type="Text">aaa@ddd.com</Value>
</Eq>
</Where>
</Query>
</ns1:query>
<ns1:rowLimit>150</ns1:rowLimit>
</ns1:GetListItems>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我在论坛上尝试了很多建议,但没有任何效果。有人可以帮忙。
答案 0 :(得分:1)
您似乎错过了查询节点(请注意小写),该节点是查询节点的父节点。这是一个例子:
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<soap:Body>
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
<listName>OpportunitiesAdmins</listName>
<viewName></viewName>
<query>
<Query>
<Where>
<Eq>
<FieldRef Name='AdminName' />
<Value Type='User'>Welch, Jeff (UBC)</Value>
</Eq>
</Where>
</Query>
</query>
<viewFields></viewFields>
<rowLimit>0</rowLimit>
<queryOptions>
<QueryOptions></QueryOptions>
</queryOptions>
</GetListItems>
</soap:Body>
</soap:Envelope>