深入浅出Nintex——使用Call WebService来查询Item ID

基本思路:调用lists web service (web Url/_vti_bin/lists.asmx)中的方法GetListItems。

如下图所示:

 

代码
<?xml version="1.0" encoding="utf-8"?>
<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>Report for Manager</listName>
<viewName></viewName>
<query>
<Query>
<Where>
<Eq>
<FieldRef Name="Employee_x0020_Name" />
<Value Type="Text">{ItemProperty:User_x0020_Name}</Value>
</Eq>
</Where>
</Query>
</query>
<viewFields>
</viewFields>
<rowLimit></rowLimit>
<queryOptions xmlns:SOAPSDK9= "http://schemas.microsoft.com/sharepoint/soap/">
<QueryOptions/>
</queryOptions>
<webID></webID>
</GetListItems>
</soap:Body>
</soap:Envelope>

 

 

 

代码
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl
="http://www.w3.org/1999/XSL/Transform" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt
="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs
="urn:schemas-microsoft-com:rowset"
xmlns:z
="#RowsetSchema"
xmlns:hh
="http://schemas.microsoft.com/sharepoint/soap/">

<xsl:template match="/">
<xsl:value-of select="xml/hh:listitems/rs:data/z:row/@ows_ID"/>
</xsl:template>
</xsl:stylesheet>

 

posted @ 2010-12-06 21:25  风影极光  阅读(908)  评论(0编辑  收藏  举报