By default the Microsoft BizTalk ESB Toolkit does not provide the functionality to send a message to Windows SharePoint Services. Luckily you do not have to create a custom Adapter Provider for this but is there already one available in the ESB Toolkit Extensions Library. The WSS Adapter Provider provides the functionality to promote various Windows SharePoint Services Adapter property values.
Installation Prerequisites
To use the WSS Adapter Provider in an Itinerary, you must install the ESB Toolkit Extensions. Follow this sequence to install the prerequisites and to configure your system.
Download the latest source code from the ESB Toolkit Extensions Library. |
 |
|
Unzip the downloaded file. |
|
Create a new Project in Visual Studio and select the Project Type: Blank Solution. |
|
Add the extracted “Esb.Extensions.Library.csproj” Project to the Solution. |
 |
|
Rebuild and GAC this project. - Use the Deployment Framework for BizTalk or the GacUtil tool. |
 |
|
Add the following line in the Adapter Providers section of the esb.config: |
<adapterProvider name="Windows SharePoint Services" type="WhiteCase.MW.Foundation.ESB.Extensions. Library.AdapterProviders.SharePoint.WSSAdapterProvider, WhiteCase.MW.Foundation.ESB.Extensions.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=aeb660468fddc5d9" moniker="wss" />
|
C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\esb.config |
|
Copy the Property manifest xml files into the %ESB Install Folder%\Tools\Itinerary Designer\ folder. |
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft.Practices.Services.Itinerary.DslPackage |
|
Using the WSS Adapter Provider
How to use the WSS Adapter Provider in an Itinerary:
In the Resolver select “Windows SharePoint Services” for the Transport Name. |
 |
|
In the Endpoint Configuration property are extra properties available that are specific for the
SharePoint Adapter:
- Define the namespace aliases used by the XPATH queries.
- The SharePoint columns and values to be set for this message.
- The Username and Password for the SharePoint online account.
- Use the SharePoint Client Side Object Model (CSOM) or the Service Side Object Model (SSOM)
|
 |
|
Use the ConfigPropertiesXml property to set the SharePoint columns and values.
- Expressions can include any mix of literals, macros, and XPATH queries.
|
<ConfigPropertiesXml>
<PropertyName2>Naam</PropertyName2>
<PropertySource2>DespatchAdvice_%XPATH=//ns0:DespatchAdvice/ns0:ID%.xml</PropertySource2>
</ConfigPropertiesXml>
|
|
Testing
Once the itinerary is deployed to the Itinerary Store database and a Receive Location in BizTalk is created that uses the Itinerary, the solution is ready to be tested.
Put a message in the Receive Location of BizTalk. |
 |
|
Run DebugView to watch the trace output. |
 |
|
Open the List in SharePoint.
Notice that the value of the ID element from the message is now also part of the file name. |
 |
|
Conclusion
The ESB Toolkit Extensions Library makes it very easy to send messages to SharePoint with an Itinerary. Now you do not have to create a custom Adapter Provider anymore for SharePoint. In the Library are also AdapterProviders for HTTP and MSMQ. further, there is a BRE Resolvers included.
Download the latest Source Code here:
https://esbextlibrary.codeplex.com/SourceControl/latest