Sending to SharePoint List from BizTalk
Sending to SharePoint List from BizTalk
I have a BizTalk 2013r2 solution from which I needed to send to a SharePoint 2010 list. It seems there are two options for this:
- consume the asmx web service by appending a /_vti_bin/lsists.asmx
- use the Windows SharePoint Services adapter
I went for the second option.
My target list contained columns matching to the pairs in the xml doc being processed by BizTalk, example below:
<lcc:Request Version="1" xmlns:lcc="http://LCC.Integration.Corporate.Schemas.MvcForms.MvcFormsRequestOrResponse">
<lcc:FormType>HMORenewal</lcc:FormType>
<lcc:Data>
<lcc:Pair>
<lcc:Name>LicenseRefNo</lcc:Name>
<lcc:Value>16/00031/XXX</lcc:Value>
</lcc:Pair>
<lcc:Pair>
<lcc:Name>FPPRNO</lcc:Name>
<lcc:Value>XXX146</lcc:Value>
</lcc:Pair>
<lcc:Pair>
<lcc:Name>ApplyAccreditationDiscount</lcc:Name>
<lcc:Value>False</lcc:Value>
</lcc:Pair>
<lcc:Pair>
<lcc:Name>NumberOfTenants</lcc:Name>
<lcc:Value>5</lcc:Value>
</lcc:Pair>
</lcc:Data>
</lcc:Request>
Steps involved: The account of the host instance of the BizTalk send port must be at least a “Contributor” for the target SharePoint site I configured the send port to use the “Windows SharePoint Services Adapter” with the following properties:
- SharePoint Site URL = http://appzone-ste-fts.xxx.co.uk/sites/mvcforms/
- Destination Folder URL = Lists/HMORenewal
- Namespaces Aliases (reqd because I’m using xpath to resolve the values from the source doc) = “lcc=’http://LCC.Integration.Corporate.Schemas.MvcForms.MvcFormsRequestOrResponse’”
- Column 01 = LicenseRefNo
- Column 01 Value = “%XPATH=//*[lcc:Name = ‘LicenseRefNo’]/lcc:Value/text()%”
- Column 02 = FPPRNO
- Column 02 Value = “%XPATH=//*[lcc:Name = ‘FPPRNO’]/lcc:Value/text()%”
And it worked :)
Comments