BizTalk 2013 R2 JSON Encoder error – “Object reference not set to an instance of an object” – Part 2

Posted: November 29, 2015  |  Categories: BizTalk Uncategorized
Tags:

In a previous post I lamented that the JSON encoder pipeline component throws an error if a soap fault is sent to it. My colleague Deepa Kamalanthan has developed a workaround to this issue. The clue to this was taken from a previous post by Johann Cooper. The JSON encoder pipeline component in our send pipeline was replaced with XML Dissembler and the BREPipelineFrameworkComponent pipeline components. The BRE Pipeline Framework is configured to dynamically chose whether to include the JSON encoder pipeline component in pipeline processing or not. This shown below

api1_thumb3api23_thumb1

A business rule is configured that only executes the JSON Encoder if the message has a type of Orders.

json-policy_thumb7

If a SOAP fault is sent as a response, the JSON Encoder is not executed and is subsequently sanitized by a custom behaviour. This custom behaviour changes SOAP fault to simpler error message that only contains basic information in a JSON format.

In summary we are pleased the BRE pipeline component has given us a way to work around this problem. I believe the JSON encoder should provide some out of the box mechanism to handle a soap fault and I hope Microsoft address this in a future release of BizTalk.

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

Back to Top