
Sending to a Windows SharePoint Services 3.0 Blog Site
In a Windows SharePoint Services 3.0 blog site, posts are stored in the Posts list and post categories are defined in the Categories list.
To post a message to a Windows SharePoint Services 3.0 blog site, enter the following values in the adapter Transport Properties dialog box when configuring a send port that uses the Windows SharePoint Services adapter:
|
Property
|
Value
|
|---|
|
Destination Folder URL
|
Destination folder URL of the Posts list, relative to the SharePoint site, for example "Lists/Posts".
|
|
SharePoint Site URL
|
URL of the Windows SharePoint Services 3.0 blog site, for example http://<servername>/sites/blog/ where <servername> is a placeholder for the actual name of the Web server.
|
Then set the values for the Category, Published, Title, and Body properties for the blog posting by setting corresponding values in the WSS.ConfigPropertiesXml context property of the message. This can be done with a custom pipeline or in an orchestration. For example, the following expression in an orchestration would set values in the WSS.ConfigPropertiesXml context property of the Message_Out message.
int_Category = 1;
str_Published = Microsoft.SharePoint.Utilities.SPUtility.CreateISO8601DateTimeFromSystemDateTime(System.DateTime.Now);
// requires a reference to Microsoft.SharePoint.dll
str_Title = "This is the title of the post from the WSS adapter";
str_Body = "This is the body of the post from the WSS adapter";
Message_Out(WSS.ConfigPropertiesXml) = “<ConfigPropertiesXml>
<PropertyName1>Category</PropertyName1>
<PropertySource1>” + int_Category + “</PropertySource1>
<PropertyName2>Published</PropertyName2>
<PropertySource2>” + str_Published + “</PropertySource2>
<PropertyName3>Title</PropertyName3>
<PropertySource3>” + str_Title + “</PropertySource3>
<PropertyName4>Body</PropertyName4>
<PropertySource4>” + str_Body + “</PropertySource4>
</ConfigPropertiesXml>”;
The variables in this expression would use the following types:
|
Variable name
|
Type
|
|---|
|
int_Category
|
System.Int32
|
|
str_Published
|
System.String
|
|
str_Title
|
System.String
|
|
str_Body
|
System.String
|
A post created this way will be set to a state of not approved, which will require approval by the blog owner before it is visible on the site.
The supported column types for the list can be viewed on the settings page for the list. For more information about the Windows SharePoint Services column types that are supported by the Windows SharePoint Services adapter, see Windows SharePoint Services Adapter Properties Reference.