BizTalk Server Tutorial

BizTalk Server Concepts and Common Errors

Part 2: Itineraries with Two way Calls

This is a follow up from the previous post Part 1: ESB ToolKit Itineraries. In this post, I will extend the previous one way Itinerary and expose it as a two way service. Below is the scenario.

Rcv Msg -> Transform it into external WCF Service Call -> Call external service -> Send Response back to caller

1. Create a copy of existing Itinerary. (This is in continuation from previous post)
1

2. Rename the file to “TwoWayTransformService” and change the Name property as well.
2

3. Create a sample WCF Service to receive a message and send a response.3

4. Consume the Service in a BizTalk Project & Create a BizTalk map to convert a Sample Request message into WCF Service Call.

4

5. Change IsRequest Response to True in the below locations.
a. Itinerary – > See #2 screenshot
b. All the Itinerary Service Components
6. Create a two way Dynamic Send Port with Pass through pipelines & set filter as below.
5

7. In the OffRamp, update the Send Port with the newly created two way port.

6

8. Remove the link between OffRamp & Publish and reconnect that. Make sure that Publish is showing the new Filter properties. Sometimes you will have to remove the component and recreate it.

7

9. Update the Resolver in Route Component to point to Web Service created above.
8

You can use the WSDL of the service to fill it.

9

10. Validate and export the Itinerary.
11. Now expose the Request Message and WCF Response Message as a Service using BizTalk Service Publish Wizard.
10

12. Wizard will create the Receive Port & Location. Change the Receive pipeline to “Itinerary Rcv” which is the custom pipeline created in previous post. Change the Itinerary Name in Resolver Connection String.

1112

13. Make sure that WCF Service is working fine by enabling the Receive Location.
14. Now create a soap UI project and make a test. You should see the response.

13

Note: In the above Itinerary, there are no Itinerary related components in OffRamp Send handler / OffRamp Receive Handler.
Incase if you are using any components in the OffRamp Send handler / OffRamp Receive Handler then you should create two custom pipelines
1. Send Pipeline with ESB Dispatcher (Encode) & ESB Itinerary Cache (Encode) to be used in Two way Dynamic Send Port (instead of Pass through)
2. Receive Pipeline with ESB Itinerary Cache (Decode) & ESB Dispatcher (Resolve Party)

This is required because, when message goes out of BizTalk, ESB caches the Itinerary associated with the message before sending the message out and loads it back from cache after receiving the response from external system.
ESB uses “TransmitWorkID” context property for this.
14

Hope this helps.

– Shiv

December 18, 2014 - Posted by | General

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: