简体   繁体   English

WCF到WCF的请求和响应,通过MSMQ

[英]WCF to WCF request and response through MSMQ

I have two WCF services : 我有两个WCF服务:

1.Client WCF Service hosted on IIS configured with REST endpoint facing public returning JSON response. 1.客户端WCF服务托管在IIS上,该IIS配置有面向公共返回JSON响应的REST终结点。

2.Server WCF Service hosted on IIS configured with SOAP endpoint 2.服务器WCF服务托管在配置了SOAP端点的IIS上

and the Client is calling the Server WCF Service to get XML data in response. 并且客户端正在调用服务器WCF服务以获取XML数据作为响应。

As the NetMsmqBinding is one way , how can i integrate MSMQ to acheive the same but with reliability for transactions. 由于NetMsmqBinding是一种方法,因此我如何集成MSMQ以实现相同但可靠的事务。

So far i have been able to call from the Client WCF service to the Server WCF service but have not been able to get the return value , 到目前为止,我已经能够从客户端WCF服务调用到服务器WCF服务,但是还无法获取返回值,

How to get the response in JSON format ? 如何获取JSON格式的响应?

As you say MSMQ is one way. 正如您所说的,MSMQ是一种方法。

You can have the message Producer to have a reply from the message consumer using a second reply queue. 您可以让消息生产者使用第二个答复队列来接收消息使用者的答复。

That way you can have a reply on another queue. 这样,您可以在另一个队列上得到答复。

You ll have reliability in transactions when sending OR receiving messages. 发送或接收消息时,您将在事务中具有可靠性。 The two are not coupled. 两者没有耦合。

Regards 问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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