简体   繁体   中英

JSON Decoder in custom pipeline is not working

I am using BizTalk+ESB. I send a request to a REST service. Using this pipeline.发送管道

Which uses the JSONEncoder . The rest service posts a message in the event log, letting me know the process was completed. The issue is, on the response, I get this error:

"The content type application/json; charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)."*

This is the response pipeline:

接收管道

It acts as if the JSONDecoder is not processing the response message.

The request is made using ESB Itinerary, and a WCF Web Service in BizTalk.

Any suggestions?

You need to use the WCF-WebHttp Adapter for a RESTful service. See WCF-WebHttp Adapter (Microsof.com)

Microsoft BizTalk Server uses the WCF-WebHttp adapter to send messages to RESTful services. The WCF-WebHttp send adapter sends HTTP messages to a service from a BizTalk message. The receive location receives messages from a RESTful service. For GET and DELETE request, the adapter does not use any payload. For POST and PUT request, the adapter uses the BizTalk message body part to the HTTP content/payload.

The WCF-WSHttp is expecting a SOAP envelope and XML see What Is the WCF-WSHttp Adapter? (Microsof.com).

The WCF-WSHttp adapter provides full access to the SOAP security, reliability, and transaction feature

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM