In BizTalk 2013, the only data format available for posting a message to a web service was XML. This has been rectified in BizTalk Server 2013 R2 with the addition of the JSON encoder pipeline component. For BizTalk 2013, our options are to either create a WCF custom behavior or a custom send port pipeline to convert the outbound XML message to JSON.
In this section, we will discuss and build a custom pipeline to convert an XML message to a JSON message format and submit it to our Web API service. For this example, we will use a messaging only solution. The send port will subscribe to messages received by a file receive location, as we saw in our previous example.
The sample message to be picked up by the receive location will look like the following XML:
<ns0:SalesQuery xmlns:ns0="http://Packt.RestServices.Schemas.SalesQuery"> <Request> <AccountNumber>1234</AccountNumber> <OrderNumber>8979</OrderNumber>...