【问题标题】:Location of ViewFields tag in GetListItems method + sharepoint web-servicesGetListItems 方法中 ViewFields 标记的位置 + sharepoint web-services
【发布时间】:2012-12-05 05:36:55
【问题描述】:

我想检索共享点列表的所有列和行的数据。因此,我试图发送一个“ViewFields”参数,指定要检索的所有字段到 Web 服务函数 getListItems()。请求xml如下:

<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">  
              <listName>'.$list.'</listName> 

              <rowLimit>'.$limit.'</rowLimit>

              <queryOptions xmlns:SOAPSDK9="http://schemas.microsoft.com/sharepoint/soap/" > 
                  <QueryOptions/> 
              </queryOptions> 
</GetListItems>

“ViewFields”标签如下:

<ViewFields>
   <FieldRef Name="ID" />
   <FieldRef Name="Title" />...
</ViewFields>

我尝试插入,但它没有覆盖默认视图中的字段。所以,我想可能是我没有把它放在正确的地方。所以我的问题是标签应该在请求 xml 中出现在哪里,以便它覆盖默认视图中的字段。提前致谢。

【问题讨论】:

  • 指定你要使用的具体视图

标签: xml web-services sharepoint sharepoint-2007


【解决方案1】:
<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">  
       <listName>...</listName>  
       <viewName>....</viewName>  
      <Query> 
           <Where> 
               .
               .
            </Where> 
       </Query> 
      <ViewFields>
          <FieldRef Name="ID" /> 
          .
          .
          .
      </ViewFields> 
      <rowLimit>...</rowLimit> 
      <queryOptions xmlns:SOAPSDK9="http://schemas.microsoft.com/sharepoint/soap/" > 
          <QueryOptions/> 
      </queryOptions> 
</GetListItems>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多