Recently I found myself taking a deep dive into BizTalk. The main reason was to fix a little architectural challenge I faced when using the out of the box WCF-BasicHttp adapter. This adapter provide you with the capability receiving WCF requests and porting them to the BizTalk MessageBox. All good so far, I used the out of the box “BizTalk WCF Service Publishing Wizard”.
The problem
Create a WCF-BasicHttp service that accept messages and delivers them to the BizTalk MessageBox. Send back a “receive acknowledgement” to the requesting client (using Context Based Routing, without the use of Orchestations).
The solution
Step 1 – Create new Empty BizTalk Server Project
Name: Custom Pipeline
Solution Name: XMLReceiveCBR
Add new “Receive Pipeline” item.
Add “XML disassemble” Pipeline Component to the pipeline
Create a new “custom pipeline component”.
To do this first add a new “Class Library”.
Create new class PromotePropertiesCBR.cs
Add references
Add the following references this way:
– BizTalk Pipepine Interop
– System.Drawing
Make class public and implement the following interfaces:
Let Visual Studio create the code snippets for the interfaces automatically:
This will create the following members:
Next we will code the interface implementations.
“IBaseComponent” Implementation:
“IComponentUI” Implementation:
ATTENTION: Don’t forget to declare your static “ResourceManager”
Select “images” in your resource file.
Add the following “Component Category Attributes” to the code:
Build your project and copy your custom “Custom Pipeline Components.dll” to the biztalk Pipeline Components directory.
“C:Program Files (x86)Microsoft BizTalk Server 2009Pipeline Components”
Open XMLReceiveCBR.btp
Add the newly created Custom Pipeline Component to the Toolbox
Select “PromotePropertiesCBR Component”
Add the new component to the pipeline
Deploy your solution!