0% found this document useful (0 votes)
200 views5 pages

Calling Restful Service Using Dynamic Send Ports Biztalk 2013 PDF

This document discusses how to call a RESTful service using dynamic send ports in BizTalk 2013. There are three main context properties that must be configured in the message context to make a REST call using a dynamic send port: 1) VariablePropertyMapping, 2) HttpMethodAndUrl, and 3) SuppressMessageBodyForHttpVerbs. The document provides an example of an orchestration that constructs a message with these context properties to call a RESTful service using a dynamic send port.

Uploaded by

Prijesh Ramani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views5 pages

Calling Restful Service Using Dynamic Send Ports Biztalk 2013 PDF

This document discusses how to call a RESTful service using dynamic send ports in BizTalk 2013. There are three main context properties that must be configured in the message context to make a REST call using a dynamic send port: 1) VariablePropertyMapping, 2) HttpMethodAndUrl, and 3) SuppressMessageBodyForHttpVerbs. The document provides an example of an orchestration that constructs a message with these context properties to call a RESTful service using a dynamic send port.

Uploaded by

Prijesh Ramani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

BizTalk Server Tutorial

Calling Restful Service


using Dynamic Send Ports
– BizTalk 2013

made with
Calling Restful Service using
Dynamic Send Ports – BizTalk
2013

There are a number of wonderful blog posts on calling Restful Services


using Out-Of-Box BizTalk WebHttp Adapter in BizTalk 2013.

But all of the blog posts deals with static send ports. However, I had a
very different situation where in I have to make a RestCall using
dynamic send port (to be used with ESB Itineraries).

The only difference in making a call using dynamic send ports is that, all
the configuration that we do in static send port has to be in context. I
started analyzing the context properties for WCF Adapter and found 3
main properties that are required for making a RestCall using dynamic
Send Port.

1. VariablePropertyMapping
2. HttpMethodAndUrl
3. SuppressMessageBodyForHttpVerbs

To start with I created a simple orchestration that receives a message,


constructs a copy of that message with additional context properties.
1. In the Construct_GetRequest, I used the below code:

• Basically, I am taking the same received message and assigned


additional context properties.
• For WCF.HttpMethodAndUrl, an xml has to be assigned in the below
format. This is the same xml that we specify under “HTTP Method and
URL Mapping” in case of a Static Send Port.

<BtsHttpUrlMapping>

<Operation Name='RestGET' Method='GET'


Url='/GetEmp/EmpId/State' />

</BtsHttpUrlMapping>

• For WCF.VariablePropertyMapping, an xml has to be assigned in the


below format.

<?xml version='1.0' encoding='utf-16'?>

<BtsVariablePropertyMapping
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

<Variable Name='EmpId' PropertyName='EmpId'


PropertyNamespace="https://MySoln.PropertySchema" />

<Variable Name='State' PropertyName='State'


PropertyNamespace="https://MySoln.PropertySchema" />

</BtsVariablePropertyMapping>

This is the XML format of Variable Mapping that we do in case of a static


send port.

• For WCF.SuppressMessageBodyForHttpVerbs, specify a value of “Get”


2. In the Initialize Dynamic Send Port Shape of the Orchestration, I am
assigning the Transport type & URL.

3. Once we deploy this Orchestration, it will automatically create a


physical dynamic send port in admin console & bind the logical port of
the orchestration to the physical port.

Setting the three context properties is the main key for using dynamicmade with
send port for Restful service calls. These three properties can also be
set in a custom pipeline component. However, I created an
orchestration to make my demonstration easier.

HTH
- Shiv

You might also like