Meetings.AddMeeting Method

Associates a meeting with the Meeting Workspace site on the specified server running Windows SharePoint Services.

Web Service: MeetingsWeb Reference: http://<Site>/_vti_bin/Meetings.asmx

Syntax

<SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/meetings/AddMeeting", RequestNamespace:="http://schemas.microsoft.com/sharepoint/soap/meetings/", ResponseNamespace:="http://schemas.microsoft.com/sharepoint/soap/meetings/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function AddMeeting ( _
    organizerEmail As String, _
    uid As String, _
    sequence As UInteger, _
    utcDateStamp As DateTime, _
    title As String, _
    location As String, _
    utcDateStart As DateTime, _
    utcDateEnd As DateTime, _
    nonGregorian As Boolean _
) As XmlNode

Dim instance As Meetings
Dim organizerEmail As String
Dim uid As String
Dim sequence As UInteger
Dim utcDateStamp As DateTime
Dim title As String
Dim location As String
Dim utcDateStart As DateTime
Dim utcDateEnd As DateTime
Dim nonGregorian As Boolean
Dim returnValue As XmlNode

returnValue = instance.AddMeeting(organizerEmail, uid, sequence, utcDateStamp, title, location, utcDateStart, utcDateEnd, nonGregorian)
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/meetings/AddMeeting", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/meetings/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/meetings/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public XmlNode AddMeeting (
    string organizerEmail,
    string uid,
    uint sequence,
    DateTime utcDateStamp,
    string title,
    string location,
    DateTime utcDateStart,
    DateTime utcDateEnd,
    bool nonGregorian
)

Parameters

  • organizerEmail
    The e-mail address, specified as email_address@domain.ext, for the meeting organizer.
  • uid
    A persistent GUID for the calendar component.
  • sequence
    An integer used to determine the ordering of updates in case they arrive out of sequence. Updates with a lower-than-current sequence are discarded. If the sequence is the same as the current sequence, the latest update will be applied.
  • utcDateStamp
    The date and time that the instance of the iCalendar object was created.
  • title
    The title (subject) of the meeting.
  • location
    The location of the meeting.
  • utcDateStart
    The start date and time for the meeting, expressed in UTC.
  • utcDateEnd
    The end date and time for the meeting, expressed in Coordinated Universal Time (UTC).
  • nonGregorian
    true if the calendar is set to a format other than Gregorian; otherwise, false. Setting this parameter to true puts the following message in the summary data of the meeting workspace: "This meeting was created using a calendar and scheduling program that only supports series updates to the Meeting Workspace. Changes you make to individual occurrences of meetings in that program will not appear in the workspace."

Return Value

A Microsoft.SharePoint.SoapServer.SoapXml object that contains 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>

<AddMeetingResponse 
   xmlns="http://schemas.microsoft.com/sharepoint/soap/meetings/">

<AddMeetingResult>

<AddMeeting Url="http://server_name/Test?InstanceID=1" 
   HostTitle="Team Web Site" UniquePermissions="true" MeetingCount="1" 
   AnonymousAccess="false" AllowAuthenticatedUsers="false" />

<AttendeeUpdateStatus Code="12" Detail="Some users could not 
   automatically be granted permissions to the workspace." 
   ManageUserPage="http://spserver1/Test/_layouts/1033/user.aspx" />

</AddMeetingResult>

</AddMeetingResponse>

</soap:Body></soap:Envelope>

Url The URL to the Meeting Workspace site that you added the meeting to. It contains a query string that gives you the InstanceID of the meeting that was added. InstanceID Identifies this meeting instance in the site that contains single instance meetings. If the site contains a recurring meeting, '?InstanceID=' is not appended to the URL. 'AdMode=1' may be appended to the URL as a query string if this site is configured in AdAccountCreation mode. HostTitle The title of the parent site; if the title of the parent is an empty string, this returns the URL of the parent. UniquePermissions 'true' or 'false' indicating whether this site was created with unique permissions. MeetingCount Returns the number of meetings associated with this workspace. If this workspace contains a recurring meeting, this returns -1. AnonymousAccess true or false indicating whether the Allow Anonymous Access feature is enabled on this workspace. AllowAuthentictedUsers true or false indicating whether the Allow Authenticated Users feature is enabled on this workspace.

Exceptions

Exception type Condition

SoapException

This method works only with Meeting Workspace sites. If you call this method against a site that is not a Meeting Workspace site, this method generates 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 add a meeting to a Meeting Workspace

could not be completed. The specified location is not

a Meeting Workspace. Specify a different location or contact

the Web site administrator.</errorstring>

<errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x00000006</errorcode>

</detail>

</soap:Fault>

</soap:Body>

</soap:Envelope>

Remarks

The AddMeeting method is basically the non-iCal version of the AddMeetingFromICal method. As in the AddMeetingFromICal method, the organizerEmail parameter is used to indicate the organizer of the meeting when the organizer is a delegate.

You cannot add attendees to the Meeting Workspace by using this method. Also, you cannot add a recurring meeting by using this method.

To access the Meetings service and its methods, set a Web reference to http://Server_Name/[sites/][Site_Name/]_vti_bin/Meetings.asmx.

Example

The following code creates a Meeting Workspace site and adds a meeting to it. The ServerURLTextBox, MeetingSubjectTextBox, MeetingLocationTextBox, DTSTARTTextBox, DTENDTextBox, and CreateWorkspaceButton are all interface elements that are on a form in the Visual Basic 2005 project.

    Dim ws As New mysts001.Meetings()
    Dim tz As New mysts001.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

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/AddMeeting"

<?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>
    <AddMeeting xmlns=
        "http://schemas.microsoft.com/sharepoint/soap/meetings/">
      <organizerEmail>string</organizerEmail>
      <uid>string</uid>
      <sequence>unsignedInt</sequence>
      <utcDateStamp>dateTime</utcDateStamp>
      <title>string</title>
      <location>string</location>
      <utcDateStart>dateTime</utcDateStart>
      <utcDateEnd>dateTime</utcDateEnd>
      <nonGregorian>boolean</nonGregorian>
    </AddMeeting>
  </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>
    <AddMeetingResponse xmlns=
        "http://schemas.microsoft.com/sharepoint/soap/meetings/">
      <AddMeetingResult>
        <xsd:schema>schema</xsd:schema>xml</AddMeetingResult>
    </AddMeetingResponse>
  </soap:Body>
</soap:Envelope>

See Also

Reference

Meetings Class
Meetings Members
Meetings Web Service