Showing posts with label ESB Request-Response Itinerary. Show all posts
Showing posts with label ESB Request-Response Itinerary. Show all posts

Wednesday, 20 July 2016

BizTalk ESB Toolkit: ESB Service Composition | Service Chaining

In this article, I would brief about service composition or chaining.

Lets say we have set of services running that allows us to booking a taxi/cab and flight and client wants invoke all the service in a sequential manner. Lets say's based on the cab booking status, invoke the the second flight service booking. This can be achieved using service composition logic. 

Itinerary service is defined as shown below, note this is a 2 way itinerary service.

This can be achieved by enabling a simple transformation at the Off-Ramp receive handler and setting routing information for 2nd service call. The dynamic 2-way send port should use ItinerarySendPassThrough send and ItineraryForwarderSendReceive receive pipelines.



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.

Tuesday, 19 July 2016

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


In this article, I would demonstrate how to develop a 2 way itinerary process invoking a web service. This can be achieved in 2 ways, either service request transformation at On-Ramp or at Off-Ramp. If we have to use transformation at on ramp or off ramp ESB Dispatcher component should be used in the pipeline.

Itineraries:-
Service request transformation at On-Ramp
{OnRamp[Static Resolver,Two-Way Receive Port] -->Messaging Extender[Static Map Resolver, Canonical Xform]-->Messaging Extender[Static Map Resolver, Service Request Xform]}-->Off-Ramp Extender[Static Routing Resolver] -->OffRamp[Two-Way Dynamic Send Port]
Service request transformation at Off-Ramp
{OnRamp[Static Resolver,Two-Way Receive Port] -->Messaging Extender[Static Map Resolver, Canonical Xform]}-->Off-Ramp Extender[Static Routing Resolver] -->{Messaging Extender[Static Map Resolver, Service Request Xform]-->OffRamp[Two-Way Dynamic Send Port]}
Receive Port Configurations:
Two-way receive port with WCF-Custom webHttpbinding, shown below
Dynamic Send Port Configurations
Here is a screen shot of send ports, 
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 caller.