Walkthrough: Module 1 - Sending and Receiving Messages with the Windows SharePoint Services Adapter
This walkthrough shows you how to configure Windows SharePoint Services and BizTalk Server so you can send and receive a message using the Windows SharePoint Services Adapter and content-based routing (CBR). Content-based routing eliminates the need for message subscription for messages that are deterministically bound to specific ports. It also provides additional flexibility for users who want to route messages based on envelope properties or simply based on receive port configuration properties. For an introduction to the Windows SharePoint Services adapter, see What Is the Windows SharePoint Services Adapter?.
Prerequisites
The following are prerequisites for performing the procedures in this topic:
You must have a single-server deployment with a complete installation of BizTalk Server running on Windows Server 2008 SP2 or Windows Server 2008 R2.
For information about using the Windows SharePoint Services adapter in a multiserver deployment, see Setting Up and Deploying the Windows SharePoint Services Adapter.
Configure Windows SharePoint Services
In this procedure you create a SharePoint top-level Web site that contains three document libraries. The Windows SharePoint Services adapter uses these libraries to move a message from a source library to a destination library. This message is also archived in a document library. This procedure must be done to provide the Windows Sharepoint Services site that is accessed by the Windows Sharepoint Services adapter in this walkthrough and to set user rights to enable access to this site.
Create a Windows SharePoint Services site
Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
Under Virtual Server Configuration, click Create a top-level Web site.
Under Virtual Server List, select the Web site that you installed the Windows SharePoint Services Adapter on. For example,
Default Web Site
.In the Web Site Address section, in the URL name field, type
WSSAdapterWalkthrough
.In the Site Collection Owner section, in the User name field, type a user name. This user will be the owner for the Web site and does not need special permissions in BizTalk Server.
In the Site Collection Owner section, in the E-mail field, type in an e-mail address.
Click OK.
On the Top-Level Site Successfully Created page, click the new top-level Web site you just created. For example,
http://<server_name>/sites/WSSAdapterWalkthrough
.Select the Team Site template from the list of templates, and then click OK. This will open the Team Web Site Home page.
Create a "Source" document library
On the Team Web Site Home page, on the top navigation bar, click Create.
Under Document Libraries, click Document Library.
In the Name and Description section, in the Name field, type
Source
.In the Navigation section, select Yes to display this form library on the Quick Launch bar.
In the Document Template section, in the Document Template drop-down list, select
None
.Click Create. The document library will be created and you will be redirected to the empty library.
Create a "Destination" document library
On the Team Web Site Home page, on the top navigation bar, click Create.
Under Document Libraries, click Document Library.
In the Name and Description section, in the Name field, type
Destination
.In the Navigation section, select Yes to display this form library on the Quick Launch bar.
In the Document Template section, in the Document Template drop-down list, select
None
.Click Create. The document library will be created and you will be redirected to the empty library.
Create an "Archive" document library
On the Team Web Site Home page, on the top navigation bar, click Create.
Under Document Libraries, click Document Library.
In the Name and Description section, in the Name field, type
Archive
.In the Navigation section, select Yes to display this form library on the Quick Launch bar.
In the Document Template section, in the Document Template drop-down list, select
None
.Click Create. The document library will be created and you will be redirected to the empty library.
Close the
WSSAdapterWalkthrough
Web site.Close the SharePoint Central Administration Web site.
Configure Windows security
Click Start, point to All Programs, point to Administrative Tools, and then click Computer Management.
In the console tree, expand Local Users and Groups, and then click Groups.
Right-click the SharePoint Enabled Hosts group, click Add to Group, and then click Add.
In the Select Users, Computers, or Groups dialog box, under Enter the object names to select, type the name of the account that you configured the BizTalk Server Host Instance to run under, and then click OK.
In the console tree, expand Services and Applications, and then click Services.
Right-click BizTalk Service BizTalk Group: <BizTalk_Host_Name>, and then click Restart.
Note
<BizTalk_Host_Name> is the name of your host. By Default, this is
BizTalkServerApplication
.Note
Membership does not take effect until the service is restarted.
Close Computer Management.
Configure SharePoint security
Open a Web browser and navigate to the URL of the site you created. For example,
http://<server_name>/sites/WSSAdapterWalkthrough
.On the Team Web Site Home page, on the top navigation bar, click Site Settings.
Under Administration, click Manage users.
Click Add Users.
In Step 1: Choose Users, type the name of the account that the BizTalk Server Host Instance is running under.
In Step 2: Choose Site Groups, select the Reader and Contributor check boxes.
Click Next.
Clear the Send the following e-mail to let these users now they've been added check box, and then click Finish.
Close the
WSSAdapterWalkthrough
Web site.
Create and configure the BizTalk Server ports
In this procedure you will create and configure the BizTalk Server receive ports, receive locations, and send ports for the Windows SharePoint Services adapter. These ports are points of entry into and out of BizTalk Server for documents received and sent by the Windows Sharepoint Services adapter.
Create the receive port
Click Start, All Programs, Microsoft BizTalk Server 20xx, and then click BizTalk Server Administration.
Expand BizTalk Server Administration, expand BizTalk Group, expand Applications, expand BizTalk Application 1, right-click Receive Ports, click New, and then click One-way Receive Port…
In the Receive Port Properties dialog box, under General, type
FromSource
in the Name field.Click OK.
Create the receive location
In the BizTalk Administration Console, right-click the Receive Locations node, click New, and then click One-way Receive Location.
In the Select a Receive Port dialog box, select
FromSource
, and then click OK.In the Receive Location Properties dialog box, under General, type
SourceLocation
in the Name field.In the Transport section, in the Type drop-down list, select
Windows``SharePoint``Services
.Click Configure to configure the Windows SharePoint Services adapter properties.
In the Adapter Web Service Port property, type the port number of the virtual server where the Windows SharePoint Services adapter Web service was installed. By default, this is port 80.
Type
Archive
in the Archive Location property.Type
10
in the Polling Interval property.Type the URL to your SharePoint site in the SharePoint Site Url property. For example,
http://<server_name>/sites/WSSAdapterWalkthrough
.Type
Source
for the Source Document Library property.Click OK.
In the Receive Location Properties dialog box, select
BizTalkServerApplication
as the Receive handler.In the Receive pipeline drop-down list, select
PassThruReceive
.Click OK.
Create the send port
In the BizTalk Administration Console, right-click the Send Ports node, click New, and then click Static One-way Send Port.
In the Send Port Properties dialog box, under General, type
SendToDestination
in the Name field.In the Transport section, select
Windows SharePoint Services
for the type.Click Configure to configure the Windows SharePoint Services adapter properties.
In the Adapter Web Service Port property, type the port number of the virtual server where the Windows SharePoint Services adapter Web service was installed. By default, this is port 80.
Type in
Destination
for the Destination Folder property.Type in
PurchaseOrder1-%MessageID%.xml
for the Filename property.Set the Overwrite property to
Yes
.Type in the URL to your SharePoint site in the SharePoint Site Url property. For example,
http://<server_name>/sites/WSSAdapterWalkthrough
.Set the Microsoft Office Integration property to
No
.Click OK.
In the Send Port Properties dialog box, in the Send handler drop-down list, select
BizTalkServerApplication
.In the Send pipeline drop-down list, select
PassThruTransmit
.Click the Filters tab.
Select
WSS.InListName
in the Property field.Select
==
in the Operator field.Type
Source
in the Value field.Click OK.
Enable and start the receive location and receive port
In these procedures you enable the receive location and start the receive port. This procedure must be completed to allow the Windows Sharepoint Services adapter to send and receive messages through the specified send port and receive location.
Enable the receive location
In the BizTalk Administration Console, click the Receive Locations node.
Right-click
SourceLocation
, and then click Enable.
Start the send port
In the BizTalk Administration Console, click the Send Ports node.
Right-click
SendToDestination
, and then click Start.Close the BizTalk Administration Console.
Sending a message through the system
In this procedure you create an XML document and upload it to the Windows SharePoint Services Web site. The Windows SharePoint Services adapter will take that message, archive it in the Archive document library, and then send it to the Destination document library. This procedure demonstrates how a document flows from a Sharepoint web site, through BizTalk Server, and to a Sharepoint Services Web site using the Windows Sharepoint Services adapter.
Create a working directory
- Create a directory on your computer called WSSAdapterWalkthrough. For example,
C:\WSSAdapterWalkthrough
.
Create an XML file
Click Start, point to All Programs, point to Accessories, and then click Notepad.
Type the following:
<?xml version="1.0"?> <PurchaseOrder> <ID>1001</ID> <FirstName>John</FirstName> <LastName>Doe</LastName> <Amount>750</Amount> </PurchaseOrder>
Save the file in your working directory as
PurchaseOrder1.xml
. For example,C:\WSSAdapterWalkthrough\PurchaseOrder1.xml
.
Upload the XML file
Open a Web browser and navigate to the URL of the site you created in the last task. For example,
http://<server_name>/sites/WSSAdapterWalkthrough
.On the left side, under Documents, click Source.
Click Upload Document.
In the Name box, type or browse to the XML file you created above. For example,
C:\WSSAdapterWalkthrough\PurchaseOrder1.xml
, and then click Save and Close. You should now be able to see the file in the list.Refresh the browser window. The
PurchaseOrder1.xml
file will no longer be listed in this library.Note
You may have to refresh the browser a few times since the polling interval is set at 10 seconds.
On the top navigation bar, click Documents and Lists.
Under Document Libraries, click Destination.
In the Destination Document Library, you will now see your message listed. You will also find a copy archived in the Archive Document Library.
Note
If the message does not appear in the Destination Document Library, refer to "Troubleshooting the Windows SharePoint Services Adapter" in BizTalk Server Help.
Summary
In this walkthrough you have seen how to configure Windows SharePoint Services and BizTalk Server so you can send and receive a message using the Windows SharePoint Services adapter and content-based routing (CBR).
Next Steps
Now that you have completed this walkthrough, perform the Walkthrough: Module 2 - Integrating Office with the Windows SharePoint Services Adapter walkthrough, which expands on the work you have done with this walkthrough and shows you how to integrate Office with the Windows SharePoint Services adapter.
See Also
What Is the Windows SharePoint Services Adapter?
Windows SharePoint Services Adapter Walkthroughs