One of the features in BizTalk 2013 R2 is to integrate REST API with other systems/entities. As data process via JSON format we use JSON relevant pipelines to have syntax transformation (JSON to XML and vice versa). In this article, we will share how to expose REST service in BizTalk and configure it at receive and send port level.
For more about json pipeline, you can refer to my previous blog BizTalk with Rest Service.
We can categorize aforementioned process into below steps.
Step1: Expose REST API in BizTalk and apply in Receive stage.
Step2: Apply GET method at Receive Port
Step3: Apply POST method at Receive Port
Step4: How to test from Postman UI
Configure REST API using BizTalk WCF Service Publishing Wizard so that it creates service in IIS and Receive location in admin console.
- Open BizTalk WCF Service Publishing Wizard Tool and click on Next button in Home page and below screen populates.
- Select WCF-WebHttp adapter and enable second check box and select respective BizTalk application name and click on Next.
Click Next in below screen
Select Receive Port Type as per Business requirement as below screen
Provide relevant name in URL for the service as below screen
Now you can see the XSLD has ready to generate for this Rest Service. Click on Create> and finish the process.
Now the BizTalk WCF Service Publishing Wizard work is done. Next is just configuration change require on IIS and Receive Port.
Open IIS manager and select the BiztalkRestServiceTest Service and set up the Advance Settings
Start the Newly Created Receive Location in BizTalk Admin Console, then browse the Service from IIS. By default, its URL is created with Service1.svc.
Ensure that below settings available in web.config file.
WCF Service in IIS and BizTalk Receive location is created so far.
We can change the URL as defined above. It’s not recommended but good to look that BizTalk publish as REST Service then its URL also look like as REST Service.
Step2: Apply GET method at receive port.
Receive Port Configuration is provided in next blog Get Method at Receive Port.
Step3: Apply POST Method at Receive Post:
Receive Port Configuration is provided in next blog Post Method at Receive Port.