Enabling Adapter Framework Configuration Extensions
The BizTalk Adapter Framework provides several extensions to improve the user experience. To use these extensions, import the framework's schema, BiztalkAdapterFramework.xsd. Importing the schema enables you to access decorations and specialized types and to use them in the adapter's configuration schema, as described below. The following code shows how to import the schema:
<?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>
Importing the BizTalk Adapter Framework Extensions Schema XSD
By importing the Adapter Framework extensions schema XSD, you can use decorations such as <baf:FileName> as an element's type, which shows the file name pop-up when editing the element.
Additional decorations control the display of the property in the interface. The <baf:description> decoration, for example, adds help text to the element. The <baf:description> decoration displays the text at the bottom of the property page. The <baf:browsable> decoration hides an element from the interface. The following code shows how you can use these elements within a configuration schema:
<?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>