gpt4 book ai didi

ssl - 通过 SSL 的 BizTalk 消息传递

转载 作者:太空宇宙 更新时间:2023-11-03 13:55:54 27 4
gpt4 key购买 nike

我希望 BizTalk 通过 SSL 发送和接收消息,您能否分享一些关于如何实现此需求的想法?

最佳答案

BizTalk 包含一个 SOAP 适配器,允许您使用 SOAP 发送和接收消息。有关此适配器的基本信息可用 on MSDN .

通过 SSL 发送就像在 Web 服务的 URL 中指定 https 而不是 http 一样简单。

在 BizTalk 中发布 SOAP (ASMX) 服务通常使用 BizTalk Web Services Publishing Wizard ,尽管需要 IIS。您可以将架构(使用 Visual Studio 编译到 BizTalk 程序集)和/或业务流程发布为 Web 服务。发布服务后,您使用 IIS 设置 SSL。

还有一个方便的 SOAP 适配器故障排除指南(即使该指南已有 3 年历史,它仍然与最新版本的 BizTalk 相关)可用 here .


我应该指出,最近我没有使用 SOAP 适配器部署任何东西,而是使用了 WCF-Custom 适配器。这仍然导致调用者能够通过 SOAP 向我发送消息,但提供了一个更强大和灵活的解决方案,用于在 Microsoft 堆栈的这一部分(WCF 与 ASMX)的最新技术上使用 Web 服务。

要发布您的服务,您只需使用 BizTalk WCF 服务发布向导而不是 Web 服务发布向导。为了安全起见,指定传输安全并在 IIS 中设置 SSL 配置(安全设置中的 here is one walk-through)。要使 WCF 服务以允许调用方不知道 WCF 的方式使用 SOAP,请将绑定(bind)类型设置为 customBinding 并使用 httpTransport 传输。这几乎就是您需要配置的全部内容。

作为一个简单的例子,如果您发布一个看起来像这样的简单模式(并且允许任何东西):

 <?xml version="1.0" encoding="utf-16" ?> 
<xs:schema xmlns="http://company.namespace.ExternalService" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://company.namespace.ExternalService" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo root_reference="Stuff" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Stuff">
<xs:complexType>
<xs:sequence>
<xs:any processContents="lax" />
<xs:element name="OutboundDataFeed" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

...那么发送到您的服务的 SOAP 消息实际上看起来像这样:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action>ReceiveStuff</a:Action>
<a:To>http://your.company.com/stuff/stuff.svc</a:To>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Stuff xmlns="company.namespace.ExternalService">
<test>Replace this XML with whatever you want, XML or otherwise</test>
</Stuff>
</s:Body>
</s:Envelope>

...其中需要将操作指定为任何接收 BizTalk 业务流程的入站接收端口的操作。

关于ssl - 通过 SSL 的 BizTalk 消息传递,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7978051/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com