Invoking restful services with BizTalk 2010

ReST supports GET, PUT, POST, and DELETE methods. So, if one has to use ReST with BizTalk Server, the adapter to be used should be able to:
•Exchange non-SOAP messages.
•Support GET, PUT, POST, and DELETE methods.

If we look at the adapters available with BizTalk Server 2010, only the HTTP adapter satisfies the first criteria but it does not support GET (it does support the POST method). Similarly, the webHttpBinding (that supports consuming and exposing ReSTful services) available with WCF-Custom adapter can send non-SOAP messages but that too has no way of specifying the HTTP verb to be used. All other adapters either do not support HTTP verbs or always exchange SOAP messages. So, there is no way to have an out-of-box BizTalk configuration to consume a ReSTful service. To use BizTalk Server with ReST, we’ll have to do some customizations around HTTP adapter or the webHttpBinding of the WCF-Custom adapter. There is no prescribed way of doing customizations around the HTTP adapter. However, to the webHttpBinding, we can add some custom behaviors that when coupled with webHttpBinding enable BizTalk users to invoke and consume ReSTful services. Through these customizations, we can specify the following:
•The HTTP method to use in the request (GET, PUT, POST, DELETE).
•How to form the request URL from operation method parameters (URL path and query string template).
•How to encode the request body and decode the response.

With WCF-Custom port configuration, there’s no way of specifying these customizations directly on the webHttpBinding. So, we’ll have to put these values in the request message. After specifying the values as part of the request message and adding a custom behavior to the webHttpBinding, when the request message hits the WCF-Custom port with the webHttpBinding, the custom behavior extracts the values from the request message and frames the required HTTP transport.

See this link to read more…

See this link for sample code.


2 Responses

  1. We are seeking a location ( inside the USA ) for Biztalk Server 2010 training for a developer — boot camp — to compress teh learning for ramp up to a project.

    Can you recommend a good training company, other than Microsoft, for performing this activity? The people are in the San Dieog, CA area but the training does not ahve to be in So. CA. We can travel anywher if the training is good.


    R Jerrell

  2. Hi R.Jerrell,

    How many developers are you planning to train and for what company is this? I have a few contacts and can find out for you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

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

%d bloggers like this: