![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Before running any adapter application, you need to specify its configuration information. Configuration information and metadata information are specified using the TIBCO Designer software.Creating a configuration for zapAdapter consists of the following tasks:Task A Configure SchemaAll schema data can be configured using the resources in the AESchemas folder. It is recommended to place your schema data for each adapter in a separate folder inside the AESchemas/ae folder.
2. Figure 26 Create a Folder for Schema Data
3. Open the new folder and drag an AESchema icon from the Palettes panel into the Design panel. Name it zapadapter and click Apply.
4. Create a new class named Contract.
a.
b. Drag the Generic Class object from the Palettes panel to the Design panel.
c.
d. Figure 27 Create a Class
5. Add a ContractId attribute.
a. Double-click the Contract class
b. Drag a Generic Scalar object from the Palettes panel to the Design panel.
c. Change the Name to ContractId.
d. For the Type, choose i4(32-bit integer) from the drop-down list.
e. Click Apply.
6.
7. Create another new class named Customer with the following attributes:
− CustomerId (Type i4 32-bit integer)
− CustomerName (Type string)
− CustomerAddress (Type string)
8. You can drag a Contract class from the project tree into the Design panel.Alternatively, you can add a generic class attribute and click the Browse button, then select the Contract class.Figure 28 Add an AttributeTask B Configure non-Schema DataTo configure the non-Schema data, that is, the adapter itself and its services, endpoints, and sessions:
1. Drag a folder to the Design palette and name it zapAdapter.
2. In the Project panel, double-click the zapAdapter folder, then drag a Generic Adapter Configuration from the Adapter Resources palette into the Design panel.
3. In the Instance Name field, type zapone.
4. In the SDK AppName field, type zapAdapter. This is the short name of the adapter and will be used in the source code. Click Apply.Figure 29 Adapter Configuration
5.
6. Drag a Publication Service from the Palettes panel into the Design panel. In the Configuration Name field, change the name to zappublisher.
7. Select the Transport tab. The fields should have the following values:
a.
b. Message Subject field, type ZAP.DATA
c. Click Apply.TIBCO Designer creates the service and a corresponding endpoint and session. Endpoint and session are placed in the Advanced folder.Figure 30 Add a Publication Service
8. To add a timer, double-click the Timers folder (inside the Advanced folder) and drag a Timer into the Design panel. In the Configuration tab:
a. Name field, type zap.Timer.
b. Interval field, type 2000 (in millisecond).
d. Click Apply.Figure 31 Add a Timer
9. Click Source and add the following information to the XML file, under <AESDK:adapter name = "zapAdapter">:Figure 32 Edit Adapter XML
10. Click OK.Task C Link Schema and Publisher
1.
2.
3. Click the Browse resources button. In the popup dialog, navigate to the Customer class and select it. Click Apply and save the project.Figure 33 Link Schema and Publisher
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |