Binding BizTalk:导出应用程序绑定时,正在清除自定义适配器发送端口的密码
使用为BizTalk Server 2010制作的适配器导出包含发送端口的应用程序时,清除密码时遇到问题 发送端口使用我根据Microsoft.Samples.BizTalk.adapter.Common BaseAdapter(v.1.0.2)制作的适配器 TransmitLocation.xsd和TransmitHandler.xsd架构都使用AdapterFramework密码特定字段,并且都定义为:Binding BizTalk:导出应用程序绑定时,正在清除自定义适配器发送端口的密码,binding,passwords,adapter,biztalk,baseadapter,Binding,Passwords,Adapter,Biztalk,Baseadapter,使用为BizTalk Server 2010制作的适配器导出包含发送端口的应用程序时,清除密码时遇到问题 发送端口使用我根据Microsoft.Samples.BizTalk.adapter.Common BaseAdapter(v.1.0.2)制作的适配器 TransmitLocation.xsd和TransmitHandler.xsd架构都使用AdapterFramework密码特定字段,并且都定义为: <xs:element minOccurs="1" default=""
<xs:element minOccurs="1" default="" name="passwordField">
<xs:simpleType>
<xs:annotation>
<xs:appinfo>
<baf:designer xmlns:baf="BiztalkAdapterFramework.xsd">
<baf:category _locID="mailAuthIndstillingerKategori">Password related category</baf:category>
<baf:displayname _locID="passwordName">Password:</baf:displayname>
<baf:description _locID="passwordDescription">Password description.</baf:description>
<baf:editor assembly="%BTSROOT%\\Developer Tools\\Microsoft.BizTalk.Adapter.Framework.dll">Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordUITypeEditor</baf:editor>
<baf:converter assembly="%BTSROOT%\\Developer Tools\\Microsoft.BizTalk.Adapter.Framework.dll">Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordTypeConverter</baf:converter>
</baf:designer>
</xs:appinfo>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
密码相关类别
密码:
密码说明。
Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordUITypeEditor
Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordTypeConverter
一些谷歌点击提到,在应该清除的元素上设置“vt=“1””属性就可以了。我尝试在调用ValidateConfiguration()时设置/添加此属性。但是,配置XML以字符串的形式返回,然后在插入XML并导出到绑定文件之前对其进行转义
我已经尝试指定注册表项中的SendHandlerPropertiesXML和SendLocationPropertiesXML的AdapterConfig应使用以下,并带有vt=“1”属性,希望它将清空端口的整个绑定属性(不是最优的,但比让某人导出密码更好的解决方案):
SendHandlerPropertiesXML:
SendLocationPropertiesXML:
导出具有配置的发送端口的应用程序时,特定XML如下所示:
<TransportTypeData><CustomProps><AdapterConfig vt="1">&lt;Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;passwordField vt="1"&gt;CLEARTEXTPASSWORD;lt;/passwordField&gt;&lt;uri&gt;SMTP://NOT-USED&lt;/uri&gt;&lt;/Config&gt;</AdapterConfig></CustomProps></TransportTypeData>
CustomPropsAdapterConfig vt=“1”<;Config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance“xmlns:xsd=”http://www.w3.org/2001/XMLSchema“&;gt;<;passwordField vt=“1”>;CLEARTEXTPASSWORD;lt;/passwordField>;<;uri>;SMTP://未使用<;/uri>;<;/Config>;/AdapterConfig/CustomProps
每次导出绑定时,适配器的重载方法:ValidateConfiguration()被调用,但无法判断这是在何时配置适配器,还是在何时导出绑定,这意味着:您不能在返回的xml字符串中篡改密码,因为它在配置时也会篡改密码
还有其他内置适配器可以做到这一点(例如:SMTP适配器),我确信这是我误解的基本问题。但是任何帮助或指针都会非常有用。我注意到on CodePlex实现了这一点,我已经能够复制它
您只需在密码元素上添加type=“baf:Password”
你可以参考他们的模式。我以为导出绑定时从来没有包含密码。对于BTS预装的所有适配器,情况就是这样。但当你制作自己的适配器时,你必须告诉BTS,当导出绑定中的特定元素(密码)时,它应该将其清空或“星型”信息技术
<TransportTypeData><CustomProps><AdapterConfig vt="1">&lt;Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;passwordField vt="1"&gt;CLEARTEXTPASSWORD;lt;/passwordField&gt;&lt;uri&gt;SMTP://NOT-USED&lt;/uri&gt;&lt;/Config&gt;</AdapterConfig></CustomProps></TransportTypeData>