Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By : Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper
Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By: Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper

Overview of this book

Table of Contents (21 chapters)
SOA Patterns with BizTalk Server 2013 and Microsoft Azure Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Receiving XML and JSON messages via the Post method


Now that we have successfully published a RESTful service that handles the GET verb, let's discuss the options to accept messages using the HTTP POST verb and how to receive the message body content in XML and JSON formats.

In order to receive an XML message, a schema that matches the posted message body and setting the receive pipeline to XMLReceive is required. In this scenario, the WCF-WebHttp adapter behaves very similar to a WCF-BasicHttp adapter.

However, if you are required to receive JSON formatted messages, you need to convert them to XML first before publishing them to the message box. Before you can do this, you must also have an XML schema representation of the JSON message. There are tools on the Internet that will take a JSON message online and convert it to an equivalent XML format.

There are a couple of options that can be used to covert JSON to XML.

Note

Note that BizTalk Server 2013R2 now includes a JSON Decoder Pipeline Component...