Meetings.CreateWorkspace - Méthode
Crée un nouveau sous-site d'espace de travail de réunion sur le serveur spécifié exécutant Windows SharePoint Services.
Espace de noms : WebSvcMeetings
Assembly : STSSOAP (dans STSSOAP.dll)
Syntaxe
'Déclaration
<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
'Utilisation
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
)
Paramètres
title
Type : System.StringLe titre du site espace de travail de réunion qui va être créé.
templateName
Type : System.StringLe nom du modèle à utiliser lors de la création du site. Consultez les instructions d'affectation de noms de modèle Windows SharePoint Services pour spécifier une configuration dans un modèle.
lcid
Type : System.UInt32Le LCID (identificateur de paramètres régionaux) à utiliser lors de la création du site.
timeZoneInformation
Type : WebSvcMeetings.TimeZoneInfLes informations de fuseau horaire à utiliser lors de la création du site.
Valeur renvoyée
Type : System.Xml.XmlNode
Un objet Microsoft.SharePoint.SoapServer.SoapXml qui contient les éléments suivants :
<?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 L'URL du sous-site qui a été créé. Si le serveur est un serveur de ADMode, la chaîne de requête est ajoutée à l'URL, afin que l'URL ressemblerait à http://spserver1/test/myworkspace?AdMode=1.
Remarques
La méthode CreateWorkspace crée un sous-site qui sert à gérer les réunions, sur le site de que la demande est validée.
Le sous-site est créé est toujours attribué un nom unique, et le paramètre title peut être tronqué pour tenir dans les limites de maximale d'une URL Web (236 caractères). Si le titre fourni dans l'appel est une chaîne vide, le titre est remplacé par la version localisée de la chaîne « Sans titre ». La chaîne est localisée en fonction du site que vous avez publiées sur. Par exemple, si vous validez dans http://spserver1/test et « test » est un sous-site allemand, le titre du nouveau sous-site sera la chaîne allemande « Sans titre ».
Si aucun modèle n'est fourni, le modèle de packs de gestion est utilisé par défaut. Si l'identificateur LCID est spécifié avec la valeur 0 (zéro), le LCID du site vous avez validé la demande est utilisée pour le nouveau sous-site.
Si le paramètre title n'est pas spécifié, le nom du site et le titre sont définies à « Sans titre ». Si un site espace de travail de réunion existe déjà avec le même nom que celle qui est spécifié pour ce paramètre, le titre que vous spécifiez est ajouté (1), (2), et ainsi de suite.
Pour accéder à ses méthodes et le service Meetings , définissez une référence Web à https://Server_Name/[sites/][Site_Name/]_vti_bin/Meetings.asmx.
Exemples
Le code suivant de Microsoft Visual Basic 2005 permet de créer un site espace de travail de réunion et lui ajoute une réunion. ServerURLTextBox, MeetingSubjectTextBox, MeetingLocationTextBox, DTSTARTTextBox, DTENDTextBox et CreateWorkspaceButton sont tous les éléments de l'interface qui se trouvent sur un formulaire dans le projet Visual Basic 2005.
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
Format de la demande SOAP Voici un exemple de demande SOAP. Remplacez les espaces réservés illustrés par des valeurs réelles.
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>
Format de la réponse SOAP Voici un exemple de réponse SOAP. Remplacez les espaces réservés avec les valeurs de retour réelles.
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>