次の方法で共有


Dws.DeleteDws メソッド (websvcDocumentWorkspace)

現在のドキュメント ワークスペース サイトとその内容を削除します。

名前空間: websvcDocumentWorkspace
アセンブリ: STSSOAP (stssoap.dll 内)

構文

'宣言
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/dws/DeleteDws", RequestNamespace:="https://schemas.microsoft.com/sharepoint/soap/dws/", ResponseNamespace:="https://schemas.microsoft.com/sharepoint/soap/dws/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function DeleteDws As String
'使用
Dim instance As Dws
Dim returnValue As String

returnValue = instance.DeleteDws
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/dws/DeleteDws", RequestNamespace="https://schemas.microsoft.com/sharepoint/soap/dws/", ResponseNamespace="https://schemas.microsoft.com/sharepoint/soap/dws/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public string DeleteDws ()

戻り値

成功した場合は、空の <Result/> タグを返す文字列。

例外

例外の種類 条件

DWSError.NoAccess (3)

ユーザーは適切な権限を持っていません。

DWSError.WebContainsSubwebs (11)

ドキュメント ワークスペースにサブサイトがあります。

備考

サイトにサブサイトが含まれていない場合、DeleteDws メソッドは、現在のドキュメント ワークスペース サイトとその内容を警告せずに削除します。

以下のコード例では、現在のドキュメント ワークスペース サイトとその内容を削除します。この例で使用されているヘルパ関数の全文の詳細については、CanCreateDwsUrl メソッドを参照してください。

Try
    Dim strResult As String
    strResult = dwsWebService.DeleteDws()
    If IsDwsErrorResult(strResult) Then
        Dim intErrorID As Integer
        Dim strErrorMsg As String
        Call ParseDwsErrorResult(strResult, intErrorID, strErrorMsg)
        MessageBox.Show _
            ("A document workspace error occurred." & vbCrLf & _
            "Error number: " & intErrorID.ToString & vbCrLf & _
            "Error description:" & strErrorMsg, _
            "DWS Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    Else
        MessageBox.Show _
            ("The document workspace was successfully deleted.", _
            "Delete DWS", MessageBoxButtons.OK, _
            MessageBoxIcon.Information)
    End If
Catch exc As Exception
    MessageBox.Show("An exception occurred." & vbCrLf & _
        "Description: " & exc.Message, _
        "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
try
{
    string strResult = "";
    strResult = dwsWebService.DeleteDws();
    if (IsDwsErrorResult(strResult))
    {
        int intErrorID  = 0;
        string strErrorMsg = "";
        ParseDwsErrorResult(strResult, out intErrorID, out strErrorMsg);
        MessageBox.Show
            ("A document workspace error occurred.\r\n" +
            "Error number: " + intErrorID.ToString() + "\r\n" +
            "Error description: " + strErrorMsg,
            "DWS Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    else
    {
        MessageBox.Show
            ("The document workspace was successfully deleted.",
            "Delete DWS", MessageBoxButtons.OK,
            MessageBoxIcon.Information);
    }
}
catch (Exception exc)
{
    MessageBox.Show("An exception occurred.\r\n" +
        "Description: " + exc.Message,
        "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

関連項目

参照

Dws クラス
Dws メンバ
websvcDocumentWorkspace 名前空間