Dws.DeleteDws - Méthode
Supprime le site espace de travail de Document en cours et son contenu.
Espace de noms : WebSvcDWS
Assembly : STSSOAP (dans STSSOAP.dll)
Syntaxe
'Déclaration
<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
'Utilisation
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()
Valeur renvoyée
Type : System.String
Chaîne qui retourne vide < résultat / > lors de la réussite de la balise.
Exceptions
Exception | Condition |
---|---|
[DWSError.NoAccess(3)] | L'utilisateur ne dispose pas de droits suffisants. |
[DWSError.WebContainsSubwebs(11)] | L'espace de travail de document contient des sous-sites. |
Remarques
La méthode DeleteDws supprime le site espace de travail de Document en cours et son contenu sans avertissement, sauf si le site contient des sous-sites.
Exemples
L'exemple de code suivant supprime le site espace de travail de Document en cours et son contenu. Pour plus d'informations sur le texte intégral des fonctions d'assistance utilisées dans cet exemple, consultez la méthode 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);
}