BizTalk 可以向我的 C# Web 应用程序发送确认消息吗?
大家早上好,
我们正在维护一个 C# Web 应用程序。
此应用程序向 BizTalk 发送一条 XML
消息,但不知何故,开发团队尚未生成反馈消息来告诉我们的应用程序,例如:
<Response>
<Request>1</Request>
<Message>BizTalk has successfully processed your request.</Message>
<Date>2010-10-20</Date>
</Response>
问题是,BizTalk 能否向我们的 C# Web 应用程序发送 XML回复?
我可以使用哪种方法?创建一个侦听器来等待响应,使用一个 Web 服务来了解响应还是其他事情?
谢谢
Good morning guys
We are maintaining a C# Web application.
This application sends a XML
message to BizTalk, but somehow the development team haven't produced yet a feedback message to tell our application something like:
<Response>
<Request>1</Request>
<Message>BizTalk has successfully processed your request.</Message>
<Date>2010-10-20</Date>
</Response>
The question is, can BizTalk send to our C# web application a XML response?
Which approach can I use? Create a listener to wait the response, consume a webservice to know the response or another thing?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这在很大程度上取决于您正在执行何种处理以及您如何与 BizTalk 进行通信。有两种主要方法可以做到这一点:
同步响应:例如,如果您通过 HTTP 或 SOAP 发送 XML 消息,您可以要求 BizTalk 开发人员向您发送 HTTP/SOAP 回复以确认收到的消息。请注意,这并不一定意味着所有处理都已完成(BizTalk 允许您发送响应并稍后继续处理),只是确认已收到消息。
异步响应:例如,您可以从 Web 应用程序公开 Web 服务,并在请求处理完成时让 BizTalk 向其发送消息。然后,您需要将 BizTalk 的回复与您的 Web 应用程序中的原始请求相关联(这可以像在数据库中将某些内容标记为已完成或其他什么一样简单)。 (您也可以通过 MSMQ 队列或其他异步机制执行此操作)。
无论哪种方式,您都必须与 BizTalk 开发团队一起决定要使用哪种架构进行确认,并且需要对解决方案的两端进行更改。
It depends a lot on what kind of processing you're doing and how you're communicating with BizTalk. There are at two big ways you could do this:
A synchronous response: For example, if you're sending the XML message over HTTP or SOAP, you could ask the BizTalk devs to send you an HTTP/SOAP reply confirming receipt of the message. Notice that this wouldn't necessarily mean all processing is done (BizTalk allows you to send a response and continue processing later), just an acknowledge that the message was received.
An asynchronous response: You could, for example, expose a web service from your web application and have BizTalk send a message to it when your request has finished processing. It would then be up to you to correlate the reply from BizTalk with your original request in your web application (this could be as simple as marking something in the DB as done, or whatever). (You could also do this over an MSMQ queue or some other asynch mechanism).
Either way, this is something you have to decide with the BizTalk dev team on what architecture you want to use for acknowledgements, and will require changes on both ends of the solutions.