Soapclient query a Sharepoint web service

后端 未结 1 1634
暖寄归人
暖寄归人 2020-12-17 05:21

I successfully query a service with the following code from here

 \"username\", \"password\" => \"password\");         


        
相关标签:
1条回答
  • 2020-12-17 06:04

    Try adding a ViewFields parameter to your query. This allows you to specify which fields to return in the query and in what order.

    viewFields is a child of the GetListItems element:

    <viewFields>
       <ViewFields>
         <FieldRef Name="LinkTitle" />
         <FieldRef Name="Body" />
       </ViewFields>
    </viewFields>
    

    Based on the example you gave, I'm guessing at the column names you'd be after; you may need to adjust to whatever SharePoint is actually calling those columns internally.

    The ows_ prefix is added to the column name, so you wouldn't address them in that format except when retrieving from the result XML.

    0 讨论(0)
提交回复
热议问题