REST support in BizTalk Server

What is REST?

Representational State Transfer (ReST) is a software architecture style consisting of guidelines and best practices for creating scalable web services.

REST

ReST has gained widespread acceptance across the Web as a simpler alternative to SOAP and WSDL-based Web services.

REST makes use of existing and widely adopted technologies, specifically HTTP, and does not create any new standards. It can structure data into XML, YAML, or any other machine readable format, but usually JSON – JavaScript Object Notation – is preferred.

An application that uses ReST architecture is called a ReSTful application. Such applications use HTTP requests to create, update, read, and delete data, thereby supporting all CRUD operations. These CRUD operations are performed by ReST by supporting the GET, PUT, POST, and DELETE methods.

CRUD.jpg

When exposing a public API over the internet to handle CRUD operations on data, ReST generally considered as the best option. Twitter, Google, Salesforce, eBay, Amazon all offer ReST API’s to use their services. This is just an example of the companies that support ReST, there are many more. With the increase of mobile devices and light weight rich web applications over the years the adoption of ReST grew more and more.

A REST service also has a schema which is called a WADL – Web Application Description Language. The WADL uses XML syntax to describe the metadata and the available actions. It can also be written to be as strict as the WSDL: defining types, optional parameters, etc.

WCF-WebHttp Adapter

Microsoft offers ReST support in BizTalk Server 2013 through the WCF-WebHttp Adapter. Now a ReSTFul endpoint can be consumed very easily in BizTalk Server using WCF-WebHttp Adapter. Here is MSDN article which demonstrate the same.

Until WCF-WebHttp Adapter it was a challenge to consume ReST based services within Microsoft BizTalk Server. There were no out of the box native adapters to communicate with REST based services.

If you are using BizTalk Server 2010 then we don’t have the WCF-WebHttp adapter but still a ReSTFul endpoint can be consumed using custom codes which includes creating a message inspector, an endpoint behavior and a behavior extension element. This is very well explained by Nithin Mehrotra in his article Invoke ReSTful Web Services with BizTalk Server

There are further so many articles related to the WCF-WebHttp worth to check out at http://social.technet.microsoft.com/wiki/contents/articles/17359.biztalk-server-2013-rest-support-through-wcf-webhttp.aspx

Support for JSON

In brief, JSON is a light weight data interchange format, that’s easy for humans to read and write, and it’s also easy for systems to generate and parse. It’s mainly used in Web world with client side java script and it’s also widely used in mobile devices communication.

The main benefit of JSON format is the reduced data size, with XML there are lots of repeating unnecessary element and attributes names. With mobile devices usage of bandwidth is critical and it’s important to reduce the data set size, hence JSON is popular. It’s also popular in areas where you are dealing with large set of data.

For further information on JSON, one can refer http://www.json.org/

JSON.jpg

BizTalk Server 2013 R2 now supports sending and receiving JSON messages. It includes a wizard to generate XSD schema from a JSON instance, and an Encoder and Decoder component to use with custom pipelines. For more information, see Processing JSON messages using BizTalk Server.

 

Conclusion

Microsoft BizTalk product group has made a lot of improvement for supporting REST through the new BizTalk release 2013 R2. Most of the services currently in the cloud are based on REST, which lead to more integration solution requiring communication with RESTful services. Within an enterprise BizTalk Server can be the heart of the messaging infrastructure supporting many protocols. Adding REST support will mean that BizTalk will provide even more value.

 

Related Links:

http://blogs.technet.com/b/wikininjas/archive/2013/05/07/tnwiki-article-spotlight-biztalk-server-rest-services-error-handling.aspx

http://blogs.biztalk360.com/consuming-json-endpoint-with-biztalk-2010-r2-rest-wcf-webhttp-adapter/

http://www.soapui.org/testing-dojo/world-of-api-testing/soap-vs–rest-challenges.html

 

Loved this? Spread the word


BizTalk Server Monitoring

Gautam

Follow me here

About the Author

My name is Gyanendra Kumar Gautam. I am Solution Consultant, who basically works to hook the stuff together using Microsoft technologies like Azure PaaS, Azure Serverless Services, Microsoft BizTalk Server, and Azure DevOps Services.

You may also like

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
turbo360

Never miss a good story!

 Subscribe to my blog to keep up with the latest news!