Using the Meetings Web Service

The Meetings Web service helps you to create and manage Meeting Workspace sites. This topic describes how you can use the Web services to perform the following tasks:

  • Identify existing Meeting Workspace sites
  • Create new Meeting Workspace sites and add meetings
  • Delete Meeting Workspace sites
  • Update meeting information on a Meeting Workspace site

Identifying existing Meeting Workspace sites

The following Microsoft Visual Basic. NET code example lists the Meeting Workspace sites that exist on the server.

Note  ServerURLTextBox is an interface element that is on a form in the Visual Basic .NET project.

[Visual Basic .NET]

Dim ws As New mywss001.Meetings()
Dim myCache As New System.Net.CredentialCache()

Private Sub ListMWS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListMWS.Click
 ws.Credentials = myCache.DefaultCredentials()
 ws.Url = ServerURLTextBox.Text
 If (ws.Url.EndsWith("/")) Then
  ws.Url = ws.Url.Remove(ws.Url.Length - 1, 1)
 End If
 ws.Url = ws.Url + "/_vti_bin/meetings.asmx"
 Dim GetMeetingWorkspacesResponse As System.Xml.XmlNode
 If (ws.Url <> "") Then
  GetMeetingWorkspacesResponse = ws.GetMeetingWorkspaces(True)
 End If
 Dim OuterXml As String
 OuterXml = GetMeetingWorkspacesResponse.OuterXml()
 MsgBox("OuterXml")
End Sub

Creating a new Meeting Workspace site and Adding a meeting to the site

The following Visual Basic .NET code example creates a Meeting Workspace site and adds a meeting to it.

Note  ServerURLTextBox, MeetingSubjectTextBox, MeetingLocationTextBox, DTSTARTTextBox, DTENDTextBox, and CreateWorkspaceButton are all interface elements that are on a form in the Visual Basic .NET project.

[Visual Basic .NET]

Dim ws As New mywss001.Meetings()
Dim tz As New mywss001.TimeZoneInf()
Dim myCache As New System.Net.CredentialCache()
Dim UID As Integer
Dim Sequence As UInt32

Private Sub CreateWorkspaceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateWorkspaceButton.Click
 ws.Credentials = myCache.DefaultCredentials()
 ws.Url = ServerURLTextBox.Text
 If (ws.Url.EndsWith("/")) Then
  ws.Url = ws.Url.Remove(ws.Url.Length - 1, 1)
 End If
 ws.Url = ws.Url + "/_vti_bin/meetings.asmx"
 Dim CreateWorkspaceResponse As System.Xml.XmlNode
 If (ws.Url <> "") Then
  CreateWorkspaceResponse = ws.CreateWorkspace(MeetingSubjectTextBox.Text, "MPS#0", System.UInt32.Parse("1033"), tz)
 End If
 Dim OuterXml As String
 OuterXml = CreateWorkspaceResponse.OuterXml()
 Dim MWSURL As String
 Dim Start As Integer
 Dim Finish As Integer
 Start = OuterXml.IndexOf("""")
 Finish = OuterXml.IndexOf("""", Start + 1)
 MWSURL = OuterXml.Substring(Start + 1, Finish - Start - 1)
 Dim MyRand As New System.Random()
 UID = MyRand.Next(100, 10000)
 Sequence.ToString("0")
 ws.Url = MWSURL + "/_vti_bin/meetings.asmx"
 ws.AddMeeting("", UID.ToString, Sequence, "2003-03-27T15:00:00-08:00", MeetingSubjectTextBox.Text, MeetingLocationTextBox.Text, DTSTARTTextBox.Text, DTENDTextBox.Text, False)
 MWSURLLink.Text = MWSURL
End Sub

Deleting a Meeting Workspace site

The following Visual Basic .NET code example deletes a specified Meeting Workspace site.

Note  MWSURLLink contains the URL of the Meeting Workspace site.

[Visual Basic .NET]

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

Updating meeting information on a Meeting Workspace site

The following Visual Basic .NET code example updates a meeting that exists on a Meeting Workspace site.

Note  MWSURLLink, MeetingSubjectTextBox, MeetingLocationTextBox, DTSTARTTextBox, DTENDTextBox, and CreateWorkspaceButton are all interface elements that are on a form in the Visual Basic .NET project.

[Visual Basic .NET]

Private Sub UpdateMeetingButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateMeetingButton.Click
 ws.Credentials = myCache.DefaultCredentials()
 ws.Url = MWSURLLink.Text + "/_vti_bin/meetings.asmx"
 Sequence.ToString("0")
 ws.UpdateMeeting(UID, Sequence, "2003-03-27T15:00:00-08:00", MeetingSubjectTextBox.Text, MeetingLocationTextBox.Text, DTSTARTTextBox.Text, DTENDTextBox.Text, False)
End Sub