This topic has not yet been rated - Rate this topic

Meetings.DeleteWorkspace Method

Windows SharePoint Services 3
Deletes the Meeting Workspace site from the specified server running Windows SharePoint Services.

Web Service: MeetingsWeb Reference: http://<Site>/_vti_bin/Meetings.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/meetings/DeleteWorkspace", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/meetings/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/meetings/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public void DeleteWorkspace ()
Exception type 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="http://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="http://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="http://schemas.microsoft.com/sharepoint/soap/">0x00000004</errorcode>

</detail>

</soap:Fault>

</soap:Body>

</soap:Envelope>

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 http://Server_Name/[sites/][Site_Name/]_vti_bin/Meetings.asmx.

The following code deletes a specified Meeting Workspace site. MWSURLLink contains the Meeting Workspace site URL.

    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: "http://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="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <DeleteWorkspace xmlns=
        "http://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="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <DeleteWorkspaceResponse xmlns=
        "http://schemas.microsoft.com/sharepoint/soap/meetings/" />
  </soap:Body>
</soap:Envelope>

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ