Publish BizTalk as REST Service

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.

https://vkbiztalk.wordpress.com/2017/06/14/biztalk-with-rest-services/

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

Step1: 

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.

Rest1.jpg

Click Next in below screen

Rest2.jpg

Select Receive Port Type as per Business requirement as below screen

Rest4.jpg

Provide relevant name in URL for the service as below screen

Rest5.jpg

Click Next

Rest6.jpg

Now you can see the XSLD has ready to generate for this Rest Service. Click on Create> and finish the process.

Rest7.jpg

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

Rest8.jpg

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.

Rest9.jpg

Ensure that below settings available in web.config file.

Rest10.jpg

WCF Service in IIS and BizTalk Receive location is created so far.

In below reference, its defined to convert .svc url into REST API url.

Convert .svc URL to Rest API URL

https://vkbiztalk.wordpress.com/2017/06/17/convert-svc-url-to-rest-api-url/

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 as below:

https://vkbiztalk.wordpress.com/2017/06/17/get-method-at-receive-port/

Step3: Apply POST Method at Receive Post:

Receive Port Configuration is provided in next blog as below:

https://vkbiztalk.wordpress.com/2017/06/19/post-method-at-receive-port/

 

 

Advertisements

2 comments

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s