Meetings.DeleteWorkspace Method
Deletes the Meeting Workspace site from the specified server running Windows SharePoint Services.
Namespace: [Meetings Web service]
Web service reference: http://Site/_vti_bin/Meetings.asmx
Syntax
'Declaration
<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
'Usage
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 | If you attempt to call this method against a non-Meeting Workspace site, it returns a SOAP exception that looks like the following:
<?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> |
Remarks
The DeleteWorkspace method fails if the Web site you are trying to delete is not a Meeting Workspace site.
To access the Meetings service and its methods, set a Web reference to https://Server_Name/[sites/][Site_Name/]_vti_bin/Meetings.asmx.
Examples
The following code deletes a specified Meeting Workspace site. MWSURLLink contains the Meeting Workspace site URL.
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
SOAP Request Format Following is a sample SOAP request. Replace the placeholders shown with actual values.
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>
SOAP Response Format Following is a sample SOAP response. Replace the placeholders shown with actual values.
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>