我不得不使用SharePoint Web服務。我需要一個可以讓我刪除SharePoint子站點的Web服務。我試圖使用DeleteWorkspace方法(Meetings.asmx web服務),但它只能刪除滿足工作區的子站點(我使用從團隊站點派生的自定義模板)。任何幫助將不勝感激,謝謝。如何使用SharePoint Web服務刪除SharePoint子站點?
0
A
回答
1
令人驚訝!不,你不能這樣做......我知道!奇怪它會被遺漏。我敢肯定,如果我知道爲什麼會做出一些決定,但會打敗我。
唯一的選擇是部署自定義代碼 - 事件接收器或Web服務。
1
不幸的是,對於開箱即用的Web服務,這是不可能的。 (它們只具有在網站集級別刪除的功能。)
您需要開發custom web service並將其部署到您的SharePoint場。
+0
謝謝您的回答。到目前爲止,SharePoint Web服務吸引了大量時間。 – Boris 2009-09-22 15:31:54
0
如果你想刪除一個網站嘗試使用dws web服務。
我用DWS.DeleteDWS()
,其中functoins get_constant
等簡單找回常數登錄和web服務像_vti_bin/dws.asmx
Public Function RemoveWSSSite(ByVal sPath As String, ByVal sSubSiteName As String) As Boolean
Dim DTConstant As New DTFrameWork.DTConstant
Dim SPDWS1 As New SPDws.Dws
Dim sSubsiteURL As String = ""
If (sSubSiteName = "") Then
sSubsiteURL = ""
Else
sSubsiteURL = sSubSiteName & "/"
End If
SPDWS1.PreAuthenticate = True
SPDWS1.Credentials = New System.Net.NetworkCredential(DTconst.Get_Constant_String_Value("SP_m_AdminUser"), DTconst.Get_Constant_String_Value("SP_m_AdminPassword"), DTconst.Get_Constant_String_Value("SP_m_SiteDomain"))
SPDWS1.Url = DTconst.Get_Constant_String_Value("SP_m_SiteServerName") & IIf(sPath.StartsWith("/"), "", "/") & sPath & IIf(sPath.EndsWith("/"), "", "/") & sSubsiteURL & DTconst.Get_Constant_String_Value("SP_m_dws_asmx")
Try
SPDWS1.DeleteDws()
Return True
Catch ex As Exception
Return False
End Try
End Function
0
像本說,使用/_vti_bin/Dws.asmx應該是作品。再舉一例
public bool DeleteSubSite(string urlSubSite, string user, string passw, string domain)
{
bool retValue = true;
Dws docWS = new Dws();
docWS.Url = urlSubSite + "/_vti_bin/Dws.asmx"; ;
docWS.Credentials = new System.Net.NetworkCredential(user, passw, domain);
try
{
docWS.DeleteDws();
}
catch (SoapException soex)
{
retValue = false;
}
return retValue;
}
1
相關問題
- 1. sharepoint web服務在子站
- 2. 使用Sharepoint Web服務從特定SharePoint站點獲取userinfo
- 3. 如何使用Web服務在SharePoint 2010中創建新的子站點?
- 4. 如何使用Web服務訪問Sharepoint中的子站點列表?
- 5. sharepoint web服務
- 6. SharePoint Web服務:需要在子站點獲取列表
- 7. 使用Sharepoint Web服務獲取站點ID
- 8. 使用Web服務在SharePoint中ContentTypes和站點列遷移
- 9. SharePoint Web部件和SharePoint Web服務
- 10. 使用PowerShell在特定日期從SharePoint刪除子站點
- 11. 使用JQuery通過Sharepoint Web服務刪除文檔
- 12. SharePoint Web服務 - GetListItems
- 13. 如何使用SharePoint Web服務創建SharePoint 2010 Web應用程序?
- 14. 存檔SharePoint站點而不是刪除
- 15. Sharepoint站點的Web幫助
- 16. LINQ to SharePoint問題與SharePoint Web服務
- 17. 刪除SharePoint網站使用PowerShell
- 18. 如何防止刪除SharePoint網站集?
- 19. 無法刪除Sharepoint網站
- 20. SharePoint 2010 - 使用SOAP Web服務
- 21. 在Sharepoint 2013站點中恢復Sharepoint 2010子站點備份
- 22. 如何測試SharePoint 2010 Web服務
- 23. 使用Sharepoint Web服務從Sharepoint文檔庫下載文件
- 24. 使用Sharepoint Web服務獲取一行SharePoint列表
- 25. 從clearQuest Web服務器創建SharePoint站點
- 26. 如何編寫SharePoint列表Web服務(Sharepoint 2007)
- 27. SharePoint自定義Web服務
- 28. 訪問Sharepoint Web服務
- 29. SharePoint UserProfileService Web服務權限
- 30. VBA UpdateListItems SharePoint Web服務
@DJ:這並不奇怪。這些Web服務中缺少大量的功能。預計這將在SharePoint 2010中得到解決! – 2009-09-22 13:01:47
來吧亞歷克斯,DeleteSite是否存在DeleteList等,但網絡對象是錯過?這在我的書中很奇怪。 – 2009-09-22 13:47:15
@DJ:我想我們在這裏同意。你的觀點是,Web服務提供了不一致的功能。我的觀點是他們完全錯過了功能。最終結果:他們吮吸。 – 2009-09-22 14:02:25