Meetings.DeleteWorkspace - Méthode
Supprime le site espace de travail de réunion à partir du serveur spécifié exécutant Windows SharePoint Services.
Espace de noms : WebSvcMeetings
Assembly : STSSOAP (dans STSSOAP.dll)
Syntaxe
'Déclaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/meetings/DeleteWorkspace", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/meetings/", _
ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/meetings/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub DeleteWorkspace
'Utilisation
Dim instance As Meetings
instance.DeleteWorkspace()
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/meetings/DeleteWorkspace", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/meetings/",
ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/meetings/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void DeleteWorkspace()
Exceptions
Exception | Condition |
---|---|
SoapException | Si vous essayez d'appeler cette méthode par rapport à un site non - espace de travail, elle retourne une exception SOAP qui ressemble à ceci :
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown.</faultstring> <detail> <errorstring xmlns="https://schemas.microsoft.com/sharepoint/soap/"> Your attempt to delete a Meeting Workspace site could not be completed. The specified location is not a Meeting Workspace site..</errorstring> <errorcode xmlns="https://schemas.microsoft.com/sharepoint/soap/">0x00000004</errorcode> </detail> </soap:Fault> </soap:Body> </soap:Envelope> |
Remarques
La méthode DeleteWorkspace échoue si le site Web que vous essayez de supprimer n'est pas un site d'espace de travail de réunion.
Pour accéder à ses méthodes et le service Meetings , définissez une référence Web à https://Server_Name/[sites/][Site_Name/]_vti_bin/Meetings.asmx.
Exemples
Le code suivant supprime un site espace de travail spécifié. MWSURLLink contient l'URL de site espace de travail de réunion.
private void DeleteWorkspaceButton_Click(System.Object sender, System.EventArgs e)
{
ws.Credentials = myCache.DefaultCredentials();
ws.Url = MWSURLLink.Text + "/_vti_bin/meetings.asmx";
ws.DeleteWorkspace();
}
Private Sub DeleteWorkspaceButton_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DeleteWorkspaceButton.Click
ws.Credentials = myCache.DefaultCredentials()
ws.Url = MWSURLLink.Text + "/_vti_bin/meetings.asmx"
ws.DeleteWorkspace()
End Sub
Format de la demande SOAP Voici un exemple de demande SOAP. Remplacez les espaces réservés illustrés par des valeurs réelles.
POST /_vti_bin/meetings.asmx HTTP/1.1
Host: server_name
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://schemas.microsoft.com/sharepoint/soap/
meetings/DeleteWorkspace"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<DeleteWorkspace xmlns=
"https://schemas.microsoft.com/sharepoint/soap/meetings/" />
</soap:Body>
</soap:Envelope>
Format de la réponse SOAP Voici un exemple de réponse SOAP. Remplacez les espaces réservés illustrés par des valeurs réelles.
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<DeleteWorkspaceResponse xmlns=
"https://schemas.microsoft.com/sharepoint/soap/meetings/" />
</soap:Body>
</soap:Envelope>