Wednesday 20 July 2016

BizTalk ESB Toolkit: Two-way Request Response Itinerary process | Web Service call from ESB | Part 2


This is in continuation for my previous article on Request Response itinerary process to invoking a web service and echo back service response to the client. Here we would go one step further and build our itinerary process to respond back to the client in their expected response format.

Lets say we have set of services running that allows us to booking a taxi/cab and flight based on the request made the customers, say client have their own Booking Request and Response schema and they want us book service request by them and respond back the status in their expected response format.

This can be achieved by enabling a simple transformation at the Off-Ramp receive handler and dynamic 2-way send port should used ItinerarySendPassThrough send and ItinerarySendReceive receive pipelines
Itinerary:-

Here is the itinerary flow,

{OnRamp[Static Resolver,Two-Way Receive Port] -->Messaging Extender[Static Map Resolver,ClientRequestToService Request Xform at the Receive Handler]} -->Off-Ramp Extender[Static Routing Resolver] -->{OffRamp[Two-Way Dynamic Send Port]-->Messaging Extender[Static Map Resolver, Service ResponseToClientResponse at the receive handler]}


Receive Port Configurations:
Two-way receive port with WCF-Custom webHttpbinding, shown below,

Dynamic Send Port Configurations: 
Here is a screen shot of dynamic send port,

Deploy the itinerary and start the application, then test the solution by placing a request through fiddler and wait the response of the process. Refer test results below, 

Conclusion
In this article, I illustrated how to develop an itinerary process to invoke web service and respond back to client in their response format.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.