Adapter configuration that comes from a handler applies to the adapter and all its consumers on a global scope. An administrator can statically alter handler configuration at design time by using the BizTalk Server Administration console to expand the adapter's receive or send handler and bring up the properties of the specified host.
The sample file adapter included in the SDK has a set of XSD files used to configure its receive location, send port, receive handler, and send handler. Modify these XSD files so that your custom adapter receives the configuration properties it requires. The files included with the sample file adapter that you need to modify are the TransmitHandler.xsd and ReceiveHandler.xsd schema files. These files configure the send handler and receive handler, respectively, by controlling the property pages used to configure the handlers in the BizTalk Server Administration console. These files are located in the <drive>:\Program Files\Microsoft BizTalk Server 2006\SDK\Samples\AdaptersUsage\File Adapter\Design Time\Adapter Management directory.
Using your adapter requirements, create a list of configuration properties required for each of the endpoints. If all of your configuration properties are global, you may only need to modify the send and receive port configurations. If the adapter properties need to be set for each send port or receive location, you have to modify the receive location and send port configuration files as well.
The Adapter Framework provides schema extensions and advanced configuration options to support common adapter configuration requirements. It also provides extensions that are not in the schema included with the sample file adapter. For more information about the Adapter Framework schema extensions, see Adapter Framework Configuration Schema Extensions. For more information about advanced configuration options such as custom drop-down editors and custom type converters, see Advanced Configuration Components for Adapters.
The code at the end of this topic is from the TransmitHandler.xsd file, and produces the following property page.
Send handler property page created by the TransmitHandler.xsd file
.gif)
Note the use of the <baf:designer>, <baf:displayname>, and <baf:description> tags in the TransmitHandler.xsd code that is shown below. These are custom decorations provided by the Adapter Framework to make the generation of these property pages faster.
For a list of all of the decorations available for use within the Adapter Framework, see Adapter Framework Configuration Schema Decoration Tags.
Note that the schema has only one element and does not contain a URI element. Because of this, you cannot use this schema to configure a send port or receive location through BizTalk Explorer where setting the URI of the send port or receive location is required.
Security Note |
|---|
|
Do not store sensitive customer data in the default adapter schema. For security reasons, configure user name and password information only after you deploy an adapter. This ensures that the information gets stored in the Enterprise Single Sign-On (SSO) database. For more information about the SSO database, see Using SSO. |
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:baf="BiztalkAdapterFramework.xsd"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns="http://tempuri.org/XMLSchema1.xsd"
elementFormDefault="qualified" targetNamespace="http://tempuri.org/XMLSchema1.xsd"
id="TransmitHandler" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Config">
<xs:complexType>
<xs:sequence>
<xs:element default="50" name="sendBatchSize" type="xs:int" >
<xs:annotation>
<xs:appinfo>
<baf:designer>
<baf:displayname _locID="sendBatchSizeName">Batch Size</baf:displayname>
<baf:description _locID="sendBatchSizeDesc">Enter the
maximum number of files to be transmitted per batch</baf:description>
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element default="4096" name="bufferSize" type="xs:int" >
<xs:annotation>
<xs:appinfo>
<baf:designer>
<baf:displayname _locID="bufferSizeName">Write Buffer Size</baf:displayname>
<baf:description _locID="bufferSizeDesc">Enter the size of
the buffer used to write the file</baf:description>
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element default="1" name="threadsPerCPU" type="xs:int" >
<xs:annotation>
<xs:appinfo>
<baf:designer>
<baf:displayname _locID="threadsPerCPUName">Threads Per CPU</baf:displayname>
<baf:description _locID="threadsPerCPUDesc">Enter the
number of threads per CPU to execute in the thread pool</baf:description>
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>