Test environment
I have installed BizTalk 2006 R2 and WSS 2.0 and WSS 3.0 side by side on one VPC.
The goal is to test the default behavior of the adapter. With the help of some custom orchestrations/pipelines/etc a lot more is possible.
WSS Adapter as send port
This is for sending messages from BizTalk into SharePoint.
Send a Word document (or binary file) to a document library
Configuration: FILE receive port with pass trough pipeline. WSS send port with pass trough pipeline and a filter on the receive port.
When a document is put in the receive location it is send to the document library in WSS 3.0. So far so good. Now I want to give it a nice filename instead of something like Msg-534d8936-34d3-40ac-8541-6b35457cbbb0. In BizTalk it is possible to use several macros and XPATH queries to generate a filename. But this is a Word document so XPATH queries won’t work here. So were bound to using macros. Out of the box there are the following macros: MessageID (GUID), SendingOrchestrationID (GUID), SendingOrchestrationType, Filename. The macros aren’t very helpful because they all end up with not human friendly names. The Filename macro creates by default something like Msg-534d8936-34d3-40ac-8541-6b35457cbbb0.
But the filename doesn’t have to be a real issue. SharePoint can automatically map document properties to list columns. If for example there is a document property Title and a document property Keywords and a list column Title and a list column Keywords then SharePoint fill them in with the correct values:
Or with custom properties like this Excel document (TotalCosts):
But with generated filenames with GUID’s it isn’t possible to overwrite (or update) documents:
Possible solutions are to create some additional BizTalk artifacts which set the WSS.Filename property. For example this can be done from an orchestration or a pipeline. Or this can be resolved by creating a SharePoint workflow which will be activated for each new document and rename the document to for example %title%.doc.
Create list item in custom list
Configuration: File receive port with XML pipeline. WSS send port with XML pipeline and a filter on the receive port and some values of the XML are mapped with the XPATH macro to the columns in the SharePoint custom list. Create and deploy a BizTalk assembly with the schema of the XML.
When an XML is put in the receive location a new list item is created in the custom list with the mapped values. The XML message itself is gone. A maximum of 16 columns can be mapped to the XML message.
It’s not possible to perform updates. A possible solution for updating items is described in the next test.
Create list item in document library
Configuration: File receive port with XML pipeline. WSS send port with XML pipeline and a filter on the receive port and some values of the XML are mapped with the XPATH macro to the columns in the SharePoint document library. Create and deploy a BizTalk assembly with the schema of the XML.
When an XML is put in the receive location a new list item is created in the document library with the mapped values. The XML message itself is also saved in the document library. A maximum of 16 columns can be mapped to the XML message. Because we are using xml we can do some nice stuff for generating filenames. For example the information inside the XML can be used. This way the filenames are predictable and BizTalk can overwrite list items.
And after an update (overwrite):
Document library settings
What is the influence of some document library settings which can potentially block BizTalk from creating or updating list items?
User has checked out a list item: BizTalk can’t update the list item. The message will be suspended (resumable) in BizTalk. After the user checks in the document the message can be resumed in BizTalk and the list item will be updated.
List setting -Require content approval for submitted items: BizTalk will create a new list item with the status pending.
List setting -Require documents to be checked out before they can be edited: Hmm… nothing happens! Apparently BizTalk can’t deliver the Message. But the message doesn’t appear in BizTalk as suspended. So the message is lost… Or not! BizTalk does send the document to the document library. But BizTalk hasn’t checked the document in. When I logon to the SharePoint site with the BizTalk service account the document is shown but checked out to the BizTalk service account.
List setting -Create major and minor (draft) versions: BizTalk creates a minor version. Or to be more specific two minor versions. The 1st version only contains the message. The second version adds the metadata to the columns:
List setting -Create major versions: Same as the previous one. But now with major versions:
Now let’s update a list item and then check the version history:
The list item is updated. But there is no version history! Also interesting is that the title field is a generated name instead of the friendly name we have specified.
WSS Adapter as receive port
This is for reading messages from SharePoint.
Read from a document library
Configuration: WSS Receive port with pass through pipeline. FILE Send port with pass through pipeline and filter on receive port.
BizTalk polls the document library at a specified interval. When a document is uploaded to the document library BizTalk reads it from the document library and deletes it.
There are some configuration settings for the read port:
Archive: BizTalk always deletes the file from the document library after it is processed. But there is an option to archive the document. With these settings BizTalk can copy the document an archive document library.
View name: BizTalk can be configured to read all documents from the document library or only the documents in a specific view. In SharePoint a view can be created to show only documents based on some metadata properties. For example a view that shows only approved documents. If this view is configured then BizTalk will only process approved documents.
Read from a custom list
This is not supported:


Hello,
I have tried to configure WSS: @ recieve end.. seeems weired error frm sharepoint. anyone know this??
The receive location “SourceLocatioon” with URL “wss://igtewfl2018:80/TeamSite/Source?ViewName=All+Document” is shutting down. Details:”The error threshold has been exceeded. The receive location “wss://igtewfl2018:80/TeamSite/Source?ViewName=All+Document” will be shutdown.”.
wss://igtewfl2018:80/TeamSite/Source?ViewName=All+Document
The adapter “Windows SharePoint Services” raised an error message. Details “Client found response content type of ‘text/html; charset=utf-8′, but expected ‘text/xml’.
The request failed with the error message:
–
looks like its reading html and not the files in the doclib. It can be an error page from iis.
Have you correctly configured the properties SharePoint site url, Source document library url and view name? They should be something like:
SharePoint site url: http://igtewfl2018:80/TeamSite
Source document library url:Source
view name: All documents (perhaps forgot an ‘s’ at the end?)
You can also check with fiddler what BizTalk is reading. This can be helpfull if wss is returning an errorpage.
Regards,
Harold
We had a strange error similar to this, but it was due to the WSS adapter formatting the message as XML and not retaining the file name and type. Our adapter implementation would not allow us to use %SourceFileName% so we are going to have to build an Orchs to handle it.
[...] Some tests with BizTalk 2006R2 WSS adapter April [...]