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.
 
Add the following line in the Adapter Providers section:
<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" />

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 
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.
 
Add Extra properties in the Endpoint Configuration:

    • 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.
<ConfigPropertiesXml>
  <PropertyName2>Naam</PropertyName2>
  <PropertySource2>DespatchAdvice_%XPATH=//ns0:DespatchAdvice/ns0:ID%.xml</PropertySource2>
</ConfigPropertiesXml>

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 

 

Testing

Once the itinerary is deployed to the Itinerary Store database, the solution is ready to be tested.

Run DebugView to watch the trace output.
 
Open the List in SharePoint.
 

 

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