Sending to SharePoint List from BizTalk

less than 1 minute read

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:

  1. consume the asmx web service by appending a /_vti_bin/lsists.asmx
  2. 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:

  1. SharePoint Site URL = http://appzone-ste-fts.xxx.co.uk/sites/mvcforms/
  2. Destination Folder URL = Lists/HMORenewal
  3. Namespaces Aliases (reqd because I’m using xpath to resolve the values from the source doc) = “lcc=’http://LCC.Integration.Corporate.Schemas.MvcForms.MvcFormsRequestOrResponse’”
  4. Column 01 = LicenseRefNo
  5. Column 01 Value = “%XPATH=//*[lcc:Name = ‘LicenseRefNo’]/lcc:Value/text()%”
  6. Column 02 = FPPRNO
  7. Column 02 Value = “%XPATH=//*[lcc:Name = ‘FPPRNO’]/lcc:Value/text()%”

And it worked :)

Comments