Sunday, October 11, 2009

ShareTalk Integration (SharePoint/BizTalk) – Part 3 Posting Documents to SharePoint Document Library

In Posts 1 and 2, we covered installing Windows SharePoint Services(WSS) 3.0 and installing the BizTalk – WSS Adapter web service. In this post I will walk through a simple integration scenario that will cover posting a document to a SharePoint document library.

Sending documents to a SharePoint library

  • First thing we will need to do is create a document library where we can post documents to. From the Web Application that you created in Post 1, click on the “Site Actions” tab in the top right corner and click “Create”

image

  • Click on “Document Library”

image

  • Give your document library a name and make a note as you will need the name of this library when populating the send port in BizTalk.

image

image

  • You will now need to add the BizTalk host instance user to this site so that you can write to this particular document library. To do this click on the “Site Actions” dropdown and select “Site Settings”

image

  • Click on “People and Groups”

image

  • Click on “Add Users”

image

  • Provide your Host Instance with “Contribute” permissions and restart your BizTalk Host Instance.

image

  • In the BizTalk Admin console, create a new application - I called mine “SharePointPOC”. I then created a Receive Port and Receive Location that looks for xml documents via the FILE Adapter.

image

  • Create a Send Port and specify the “Windows SharePoint Service” as the transport type.

image

  • If you provided your Web Application with a non-standard port (anything other than 80) then you will want to make this change here. You will also need to provide the name of the document library that we created in a previous step. In my sample, my document library is called “Inbound Documents”. Finally, you will need to provide the base URL to your site. In my example, this equates to http://MyServer:99/sites/BizTalk%20Repository/

image

  • You will now need to create a filter that will ensure any documents that are processed from the Receive Port, that you created, will now get sent to SharePoint.

image

  • Ensure your application is started and drop a file into the file drop folder that will match your file mask

image

  • If everything is configured correctly, you should now find a file in your document library in SharePoint

image

Check out Post 4 where I describe how to pull documents from SharePoint.

4 comments:

Coz said...

Kent - Thanks for the work!
It appears the comments for the Send Port Filter expression has a small typo that may be misleading...

. You will now need to create a filter that will ensure any documents that are processed from the Receive Port that you created will "NOT" get sent to SharePoint.

Thanks,
Cosmas Kange

Kent Weare said...

Thanks Cosmas...I have made the change.

Dipesh said...

Hi Kent,

Very good post!

Is there a way to resubmit these document back to BizTalk? A infopath form perhaps? are you able to provide me with some pointers please?

Basically I send a message to SP with the exception details within the message. I then would like to vew these details and edit the message and resumbit it back to BT.

Thanks,

Dipesh

Kent Weare said...

Hi Dipesh...check out this post http://kentweare.blogspot.com/2009/10/sharetalk-integration-sharepointbiztalk_27.html and go down towards the bottom to "Switch Request Failures" I am able to resumbit the form back to the original document library after I fixed my error.