启用适配器框架配置架构扩展
BizTalk 适配器框架提供多种扩展,为用户带来更多便利。 若要使用这些扩展,请导入框架的架构 BiztalkAdapterFramework.xsd。 导入架构后,可以访问修饰和专用类型,并在适配器的配置架构中使用它们,如下所述。 下面的代码演示如何导入该架构:
<?xml version="1.0" encoding="utf-8" ?><xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:baf="BiztalkAdapterFramework.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:import namespace="BiztalkAdapterFramework.xsd" />
. . .
</xs:schema>
导入 BizTalk 适配器框架扩展架构 XSD
通过导入适配器框架扩展架构 XSD,可以使用 baf:FileName> 等<修饰作为元素的类型,这会在编辑元素时显示文件名弹出窗口。
其他修饰控制属性在界面中的显示方式。 <例如,baf:description> 修饰将帮助文本添加到 元素。 <baf:description> 修饰在属性页底部显示文本。 <baf:browsable> 修饰从 接口中隐藏元素。 下面的代码显示如何在配置架构中使用这些元素:
<?xml version="1.0" encoding="utf-8" ?><xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:baf="BiztalkAdapterFramework.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:import namespace="BiztalkAdapterFramework.xsd" />
<xs:element name="Send">
<xs:complexType>
<xs:sequence>
<xs:element name="directory" type="xs:string" />
<xs:annotation>
<xs:appinfo>
<baf:designer>
<baf:description>Enter the directory that will receive sent files..
</baf:description>
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="fileName" type="" />
<xs:element name="sendBatchSize" type="xs:int" />
<xs:element name="fileCopyMode" type="CopyMode" />
<xs:element name="uri" type="xs:string" >
<xs:annotation>
<xs:appinfo>
<baf:designer>
<baf:browsable show="false" />
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="CopyMode">
<xs:restriction base="xs:string">
<xs:enumeration value="Append">
<xs:annotation>
<xs:documentation>= 0</xs:documentation>
</xs:annotation>
<xs:enumeration value="Create">
<xs:annotation>
<xs:documentation>= 1</xs:documentation>
</xs:annotation>
<xs:enumeration value="CreateNew">
<xs:annotation>
<xs:documentation>= 2</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>