How to use the GetChanges method of SiteData WebService

那年仲夏 提交于 2019-12-11 02:04:09

问题


Can anyone elaborate on the parameter values to be supplied for GetChanges method of SiteData Web Service?

Basically I am not able to understand what value should we supply for startChangeID and EndChangeID and from where can we get these values?

Any help on this would be greatly appreciated.

Thanks.


回答1:


Try calling GetContent first with

string result = mysiteDataServiceInstance.GetContent(SiteDataService.ObjectType.ContentDatabase, 
myContentDbGuid.ToString(), "", "", false, false, ref lastChangeID);

Where lastChangeID is an empty string. This should give back results like

<ContentDatabase><Metadata ChangeId="1;0;146b129e-4f56-4701-ada2-b370744f2ca3;633896405160170000;168811216" ID="{146b129e-4f56-4701-ada2-b370744f2ca3}" /></ContentDatabase>

Where 146b129e-4f56-4701-ada2-b370744f2ca3 is the guid of my ContentDb The ChangeId mentioned here can be used in place of the lastChangeId and currentChangeId. My results appeared like

<SPContentDatabase Change="Unchanged" ItemCount="0">
<ContentDatabase><Metadata ChangeId="1;0;146b129e-4f56-4701-ada2-b370744f2ca3;633896953296070000;30349699" ID="{146b129e-4f56-4701-ada2-b370744f2ca3}" /></ContentDatabase></SPContentDatabase>

The process is exactly the same when using SiteDataService.ObjectType.Site



来源:https://stackoverflow.com/questions/1471028/how-to-use-the-getchanges-method-of-sitedata-webservice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!