Extend
WBIMetadataType
if your adapter needs a simple
wrapper
object around a
payload object, similar to the IBM WebSphere Adapter for Flat Files and the IBM
WebSphere Adapter for FTP. The
WBIMetadataType
interface allows you to select a
payload type, and optionally generate a business graph structure in addition to a
plain wrapper. Implement
MetadataType
interface directly if you need to deal with
a more complex object structure.
To extend
WBIMetadataType
, implement the following methods:
v
public abstract String getDefaultNamespace();
This method returns a default namespace for your adapter.
v
public abstract SchemaDefinition[] getSchemaDefinitions();
This method returns the generated schema definitions, based on the payload.
The following helper methods enable you to do this:
–
getImportedSchemaLocationString();
This helper method returns the relative location of the selected schema.
–
getImportedSchema()
This helper method returns the
Qname
of the selected schema.
–
getNamespace()
This helper method returns the namespace that the user has entered.
Discovery-service.xml
For the tool to detect and use your adapter, you need a discovery-service.xml file
in yor “meta-in” folder.
Here is an example of the discovery-service.xml file:
<?xml version="1.0" encoding="utf-8"?>
<emd:discoveryService xmlns:emd="commonj.connector"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd">
<j2ee:description>My Adapter</j2ee:description>
<j2ee:display-name>My Adapter</j2ee:display-name>
<emd:vendor-name xsi:type="j2ee:xsdStringType">My vendor </emd:vendor-name>
<emd:version xsi:type="j2ee:xsdStringType">My Version</emd:version>
<emd:spec-version>1.1</emd:spec-version>
<emd:metadataBuild-class xsi:type="j2ee:fully-qualified-classType">
mypackage.myadapter.MetadataBuild</emd:metadataBuild-class>
<emd:metadataEdit-class xsi:type="j2ee:fully-qualified-classType">
mypackage.myadapter.MetadataEdit</emd:metadataEdit-class>
<emd:metadataType-class xsi:type="j2ee:fully-qualified-classType">
mypackage.myadapter.MetadataType</emd:metadataType-class>
<emd:application-specific-schema>
</emd:application-specific-schema></emd:discoveryService>
Structured record implementation
StructuredRecord class needs to be implemented by adapters when the data
exchanged with backend application can be well defined. Extend foundation class
com.ibm.j2ca.base.WBIStructuredRecord
and implement the associated methods.
162
WebSphere Adapters: WebSphere Adapter Toolkit User Guide
Содержание WebSphere Adapters
Страница 1: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...
Страница 2: ......
Страница 3: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...
Страница 6: ...iv WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 211: ...7 Start UTC using the Run universal test client option WebSphere Adapter development overview 205...
Страница 220: ...214 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 224: ...218 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 225: ......
Страница 226: ...Printed in USA...