jekcom
jekcom

Reputation: 2095

Expose REST service with Biztalk

I'm trying to build Biztalk app that can expose REST services and accept JSON messages instead of SOAP XML.

What I did is : I have created couple of schemes and orchestrations and published the schemes as WCF service. Then I also created custom piplines to decode json to xml. However, this seems to work only with xml requests with Content-Type:application/soap+xml; charset=utf-8 header.

If a change the content type to Content-Type: application/json it fails with

Cannot process the message because the content type 'application/json' was not the expected type 'application/soap+xml; charset=utf-8'.

Been searching all over the net for the solution. And now i'm not sure if it can be achieved at all, does any one know?

Any advice is appreciated.

Upvotes: 1

Views: 516

Answers (1)

oderibas
oderibas

Reputation: 2094

WCF-WSHttp adapter works only with SOAP messages. If you want JSON it is better to use WCF-WebHTTP. In BT 2013 you'd still need custom pipeline component to convert JSON to XML. And BT 2013R2 supports JSON natively.

Upvotes: 1

Related Questions