POST method at Receive Port

POST Method does not send data in URL Parameters as GET Method sends. In Post method, Rest Service sends data in Message body. Mostly this is in json format. When BizTalk Receive this file, then through the use of JSON decoder pipeline component, BizTalk convert the json into xml format.

For Pipeline configuration related information, you can refer to below reference:

At BizTalk Receive port we just adding a   below details in HTTP Method and URL mapping in Wcf-WebHttp adopter configuration.

<BtsHttpUrlMapping><Operation Name=”<Name>” Method=”POST” Url=’/OperationName/Request’ /></BtsHttpUrlMapping>


Here no need to do anything with Variable mapping. Apply “Content-Type:application/json” to process data as JSON.


Note: For Get Operation we have to keep GET verb in Incoming Message, for Post operations keep blank only.

POST Method at Send Port:

In case of when BizTalk consuming Rest Service through its Send Port with Wcf-WebHttp adopter, then its configuration is same as in Receive Port except one nominal change in below configuration.

<BtsHttpUrlMapping><Operation Name=”” Method=”<REST METHOD>” Url=’/OperationName/Request’ /></BtsHttpUrlMapping> 

There is not require to provide Operation name, we can leave it blank as above.


GET method at Receive Port

When we publish BizTalk as REST Service, then it’s not directly linked with Schema or Orchestration like WCF or Web Service does. in my previous blog, I have mentioned how to publish BizTalk as REST Service with help of BizTalk WCF Service Publishing Wizard Tool.

Here when we define the action configuration in Receive Location in that we provide Message Context property BTS.Operation for Operation Name, through this message context property, incoming message can link with orchestration Receive Port or Send Port with applying details in Filter. In below example

<BtsHttpUrlMapping><Operation Name=”TESTGETMETHOD” Method=”GET” Url=’/OperationName/Request?Param1={param1}&amp;Param2={param2}’ /></BtsHttpUrlMapping>

Here Operation name is TESTGETMETHOD. So BTS.Operation Message Context Property is stand for TESTGETMETHOD.

For Pipeline configuration related information, you can refer to below reference: 

The purpose of enabling GET operation is to fetch data from target system. Other perspective is when request parameters are few in count wise, then we can go with GET API URL.

We will discuss the configuration details at receive location transport level for GET operation.

  • Promote the elements (Param1 and Param2) from message schema whose elements are going to use in GET API URL.
  • Navigate transportation configuration of the REST API receive location and add below text in HTTP method and URL mapping shown in below snap.
  • <BtsHttpUrlMapping><Operation Name=”<Name>” Method=”GET” Url=’/OperationName/Request?Param1={param1}&amp;Param2={param2}’ /></BtsHttpUrlMapping>
  • If there is not require any parameter in GET method then no need to add parameters in BizTalk Schema.
  • Rest11.jpg
  • Map the elements with property schema element names and namespace as below.


In GEt method of REST Service, there is no message body. Information is sending in URL as Parameter as in below example:


here Param1 and Param2 are the two parameters of the GET method. Now We need to understand how BizTalk work with this. In above screen shot we are defining Variable Mapping. In variable Mapping, we are assigning parameters with Property Schema. We need to define Property Schema variable with Message Context Property. Otherwise it will not assign any value.


Create your property schema with those properties, set the Property Schema Base to MessageContextPropertyBase.

When BizTalk receive request with JSON decoder pipeline, then its create message.

Receive location transportation url would be like this: /BizTalkRestServiceTest/Service1.svc

GET Method at Send Port:

In case of when BizTalk consuming Rest Service through its Send Port with Wcf-WebHttp adopter, then its configuration is same as in Receive Port except one nominal change in below configuration.

<BtsHttpUrlMapping><Operation Name=”” Method=”<REST METHOD>” Url=’/OperationName/Request’ /></BtsHttpUrlMapping> 

There is not require to provide Operation name, we can leave it blank as above.

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.

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


Click Next


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.

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

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:

Step3: Apply POST Method at Receive Post:

Receive Port Configuration is provided in next blog as below:



Convert svc URL to REST API URL

When we publish BizTalk as REST Service, then it’s generate as below by default.


when we apply REST verb with this URL, then it’s become as below for Business User.

For GET Method:


For POST Method:


We can change the Service1 name with some other name but can’t change the .svc.

So, for outer world (Consumer), it’s look like they are consuming the WCF Service instead of REST Service.

So, making feel like as REST Service we need to do some small thing as below:

  • Install Microsoft Rewrite URL module 2.0 (it’s freeware) for IIS to accept the rewrite tags in service configuration files.

  • Add below rewrite module entries in service web.config file to enable us to use api name in service URL.




<rule name=”TestService1”>

<match url=”/Service1(.*)” />

<action type=”Rewrite” url=”Service1.svc/{R:0}” />


<add input=”{REQUEST_METHOD}” pattern=”GET” />



                     <rule name=”TestService2”>

<match url=”/Service2(.*)” />

<action type=”Rewrite” url=”Service2.svc/{R:0}” />


<add input=”{REQUEST_METHOD}” pattern=”POST” />





  • URL will refer as below instead of Service1.svc at postfix.

GET Method:


For POST Method:


Implementation of BAM Activity Definition file

When we install BAM in BizTalk Server then its add BAM (Business Activity Monitoring) in Add-Ins in Microsoft Excel File. For implementation of BAM or create Activity Definition file of BAM we need to follow the following process.

Open Excel File -> File -> Options -> Add-Ins


Click on Go… Button as in above screenshot. Now below popup will open, Select the Business Activity Monitoring and click OK.


Now click on Add-Ins Tab in Excel file as below screenshot. And select BAM Activity. as defined below.


Now Activity Definition file will open as below:


Here we need to define the data and milestone, which will need to capture from the BizTalk applications when message process.

Here I have defined some data as below screenshot:


Item type as Business Milestone is related to Date Time.




After defining Activity data, we can also define these things in BAM View as below to look more familiar to Business Users.





Now if require then we can go for below feature otherwise we can escape this.



Click next and finish the Activity Creation.

After finishing the creation of Activity details, we need to export then details in xml format as defined below:


BAM Definition file will look like as below:


Now we need to execute the below command to setup the activity Details in BAMPrimaryImport Database.

bm.exe deploy-all -DefinitionFile:<def file>[ -Server:<server> ][ -Database:<database> ]


The BAM management utility deployment commands allow you to apply, modify, and remove definitions.

  • exe deploy-all: Deploys a BAM definition.
  • exe update-all: Updates a BAM definition.
  • exe remove-all: Removes a BAM definition.

BAM Portal:

Now you can check this on BAM Portal. If you run BAM Portal first time then need to set the Compatibility View Setting on Internet Explorer. If you want to open BAM Portal on Google Crome then you need to add IE Tab in Crome.

For more information about how to open BAM in different browser, you can refer below reference:


For more information about BAM, please refer the below reference: