通过 SSL 的 BizTalk 消息传递
我想要 BizTalk 发送&通过 SSL 接收消息,您能否分享一些关于如何实现此需求的想法?
I'd like BizTalk to send & receive messages via SSL, can you please share some thoughts about how to accomplish this need?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
BizTalk 包含一个 SOAP 适配器,允许您使用 SOAP 发送和接收消息。有关此适配器的基本信息可在 MSDN 上获取。
通过 SSL 发送就像在 Web 服务的 URL 中指定 https 而不是 http 一样简单。
在 BizTalk 中发布 SOAP (ASMX) 服务通常使用 BizTalk Web 服务发布向导,但需要 IIS。您可以将架构(使用 Visual Studio 编译到 BizTalk 程序集)和/或编排作为 Web 服务发布。发布服务后,您可以使用 IIS 设置 SSL。
还有一个方便的 SOAP 适配器故障排除指南(该指南仍然与最新版本的 BizTalk 相关,即使该指南已有 3 年历史)这里。
我应该注意到,最近我没有使用 SOAP 适配器部署任何东西,而是使用了 WCF-Custom 适配器。这仍然导致调用者能够通过 SOAP 向我发送消息,但提供了一个更强大、更灵活的解决方案,用于在 Microsoft 堆栈的这一部分(WCF 与 ASMX)中的最新技术上使用 Web 服务。
要发布服务,只需使用 BizTalk WCF 服务发布向导而不是 Web 服务发布向导。为了安全起见,请在 IIS 中指定传输安全性并设置 SSL 配置 (这是关于安全设置的一个演练)。要使 WCF 服务以允许调用者不了解 WCF 的方式使用 SOAP,请将绑定类型设置为 customBinding 并使用 httpTransport 传输。这几乎就是您需要配置的全部内容。
举一个简单的例子,如果您发布一个如下所示的简单模式(并允许输入任何内容):
...那么发送到您的服务的 SOAP 消息实际上将如下所示:
...其中 Action 需要被指定为任何接收 BizTalk 业务流程的入站接收端口的操作。
BizTalk includes a SOAP adapter to allow you to send and receive messages using SOAP. Basic information on this adapter is available on MSDN.
Sending via SSL is as simple as specifying https instead of http in the web service's URL.
Publishing a SOAP (ASMX) service in BizTalk is typically done using the BizTalk Web Services Publishing Wizard, though IIS is required. You can publish schemas (compiled into a BizTalk assembly using Visual Studio) and/or orchestrations as web services. After publishing the service, you use IIS to setup SSL.
There's also a handy guide to troubleshooting the SOAP adapter (that is still relevant to the latest version of BizTalk, even if the guide is 3 years old) available here.
I should note that, lately, I have not deployed anything with the SOAP adapter, but have used the WCF-Custom adapter instead. This still results in callers being able to send me messages via SOAP, but provides a much more powerful and flexible solution for working with web services on the latest technology in this part of the Microsoft stack (WCF vs ASMX).
To publish your service, you just use the BizTalk WCF Service Publishing Wizard instead of the Web Service Publishing Wizard. For security, specify Transport security and setup the SSL configuration in IIS (here is one walk-through on the security setup). To make the WCF service use SOAP in a manner that allows callers to not know about WCF, set the binding type to customBinding and use the httpTransport transport. That's pretty much all you have to configure.
As a simple example, if you publish a simple schema that looks like this (and lets in just about anything):
...then the SOAP message sent to your service would actually look like this:
...where the Action would need to be specified as the Operation of any receiving BizTalk orchestration's inbound receive port.