Share via


Meetings.CreateWorkspace Method

Creates a new Meeting Workspace subsite on 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/CreateWorkspace", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/meetings/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/meetings/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function CreateWorkspace ( _
    title As String, _
    templateName As String, _
    lcid As UInteger, _
    timeZoneInformation As TimeZoneInf _
) As XmlNode
'Usage
Dim instance As Meetings
Dim title As String
Dim templateName As String
Dim lcid As UInteger
Dim timeZoneInformation As TimeZoneInf
Dim returnValue As XmlNode

returnValue = instance.CreateWorkspace(title, _
    templateName, lcid, timeZoneInformation)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/meetings/CreateWorkspace", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/meetings/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/meetings/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public XmlNode CreateWorkspace(
    string title,
    string templateName,
    uint lcid,
    TimeZoneInf timeZoneInformation
)

Parameters

  • title
    Type: System.String

    The title for the Meeting Workspace site that will be created.

  • templateName
    Type: System.String

    The name of the template to use when the site is created. See Windows SharePoint Services template naming guidelines for specifying a configuration within a template.

  • lcid
    Type: System.UInt32

    The LCID (locale identifier) to use when the site is created.

Return Value

Type: System.Xml.XmlNode
A Microsoft.SharePoint.SoapServer.SoapXml object that contains 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>

<CreateWorkspaceResponse xmlns=
   "https://schemas.microsoft.com/sharepoint/soap/meetings/">

<CreateWorkspaceResult>

<CreateWorkspace Url="http://server_name/test/myworkspace" />

</CreateWorkspaceResult>

</CreateWorkspaceResponse>

</soap:Body>

</soap:Envelope>

Url  The URL of the subsite that was created. If the server is an ADMode server, the query string is appended to the URL, so the URL would look like http://spserver1/test/myworkspace?AdMode=1.

Remarks

The CreateWorkspace method creates a subsite that is used to manage meetings, on the site the request is posted to.

The subsite that is created is always given a unique name, and the title parameter may be truncated to fit within the limitations of maximum Web URL (236 characters). If the title provided in the call is an empty string, the title will be substituted with the localized version of the string "Untitled". The string is localized based on the site you have posted to. For example, if you post to http://spserver1/test and "test" is a German subsite, the title of the new subsite will be the German string for "Untitled".

If no template is provided, the MPS template is used by default; if the LCID is specified as 0 (zero), the LCID of the site you have posted the request to is used for the new subsite.

If the title parameter is not specified, the name of the site and the title are set to "Untitled". If a Meeting Workspace site already exists with the same name that is specified for this parameter, the title you specify is appended with (1), (2), and so on.

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 Microsoft Visual Basic 2005 code creates a Meeting Workspace site and adds a meeting to it. 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 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

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

<?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>
    <CreateWorkspace xmlns="https://schemas.microsoft.com/sharepoint/
        soap/meetings/">
      <title>string</title>
      <templateName>string</templateName>
      <lcid>unsignedInt</lcid>
      <timeZoneInformation>
        <bias>int</bias>
        <standardDate>
          <year>unsignedShort</year>
          <month>unsignedShort</month>
          <dayOfWeek>unsignedShort</dayOfWeek>
          <day>unsignedShort</day>
          <hour>unsignedShort</hour>
          <minute>unsignedShort</minute>
          <second>unsignedShort</second>
          <milliseconds>unsignedShort</milliseconds>
        </standardDate>
        <standardBias>int</standardBias>
        <daylightDate>
          <year>unsignedShort</year>
          <month>unsignedShort</month>
          <dayOfWeek>unsignedShort</dayOfWeek>
          <day>unsignedShort</day>
          <hour>unsignedShort</hour>
          <minute>unsignedShort</minute>
          <second>unsignedShort</second>
          <milliseconds>unsignedShort</milliseconds>
        </daylightDate>
        <daylightBias>int</daylightBias>
      </timeZoneInformation>
    </CreateWorkspace>
  </soap:Body>
</soap:Envelope>

SOAP Response Format   Following is a sample SOAP response. Replace the placeholders shown with actual return 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>
    <CreateWorkspaceResponse xmlns=
        "https://schemas.microsoft.com/sharepoint/soap/meetings/">
      <CreateWorkspaceResult>
        <xsd:schema>schema</xsd:schema>xml</CreateWorkspaceResult>
    </CreateWorkspaceResponse>
  </soap:Body>
</soap:Envelope>

See Also

Reference

Meetings Class

Meetings Members

Meetings Web Service