Share this

Retain request message details scenario in BizTalk

I ran couple of time into this requirement from my customers where they need to retain some of the data from the request message and send them along with the response data in response message.

Scenario

You have a BizTalk application where you receive an employee message which has EmployeeID and EmployeeName  details. Now you need to make a call to another system to pull the salary information of the employee. Finally in the response message you need to send the details (EmployeeID and EmployeeName) which were there in the request along with the salary of the employee.

Solution

For the scenario mentioned above, lets consider its asynchronous call to the Employee Salary System and that is why I have used correlation to get the corresponding salary response for a salary request in orchestration. I have created the following schemas for the request and response to Employee Salary System. I am creating the SalaryInfoRequest for Employee Salary System in Transform_1 Once I receive the salary details from Employee Salary System, I need to merge that response with the request details. This is being done by creating many-to-one mapping in Transform_2.  

Testing the Solution

1. Sign the assembly. 2. Build and deploy the solution from Visual Studio. 3. Configure on BizTalk Management console.
  • Create a receive port and corresponding receive location to receive the Salary Request in orchestration.
  • Create a send port to send the request for salary info to Employee Salary System.
  • Create a receive port and corresponding receive location to receive the response from the Employee Salary System.
  • Create a send port to send the final salary response from orchestration.
4. Generate XML instances of salary request schemas, and put in receive location for receiving the salary request. 5. Verify the output in file location configured in send port for the salary info request. 6. Now Generate XML instance of salary info response schema, and put that in the receive location for receiving the response from Employee Salary System. 7. Verify the final salary response in file location configured for salary response.

See Also

BizTalk Server Resources on the TechNet Wiki

Loved this? Spread the word


Gautam

Follow me here

About the Author

My name is Gyanendra Kumar Gautam. I am Solution Consultant, who basically works to hook the stuff together using Microsoft technologies like Azure PaaS, Azure Serverless Services, Microsoft BizTalk Server, and Azure DevOps Services.

You may also like

REST support in BizTalk Server

What is REST? Representational State Transfer (ReST) is a software architecture style consisting of guidelines and best practices for creating scalable web services. ReST has gained widespread acceptance across the Web as a simpler alternative to SOAP and WSDL-based Web services. REST makes use of existing and widely adopted technologies, specifically HTTP, and does not

Read More

Security Features in BizTalk Server

BizTalk Server enables companies to automate business processes, through the use of adapters which are tailored to communicate with different software systems used in an enterprise. In a common scenario, BizTalk enables companies to integrate and manage automated business processes by exchanging business documents such as purchase orders and invoices between disparate applications, within or

Read More

Never miss a good story!

 Subscribe to my blog to keep up with the latest news!