IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit > Enterprise Metadata Discovery interfaces and implementation for technology adapters

Implementing Enterprise Metadata Discovery to build an interface

The com.ibm.j2ca.extension.emd.build.* package allows a simpler way to build services with an adapter from existing types. Instead of the EMD process generating types, it will import them and use them in a service.


Extend the adapter foundation classes to build services

Creating services that use technology-style adapters relies on being able to implement the interfaces in the commonj.connector.metadata.build.* package or by extending the AFC classes in com.ibm.j2ca.extension.emd.build.* package, or a combination thereof.

To implement the interfaces that allow you to build services, you need to extend the following adapter foundation classes:

When you extend WBIMetadataBuild, you will need to implement the following methods:

When you extend WBIFunctionBuilder, you will need to implement the following methods:


WBIMetadataType

If your adapter requires the ability to generate its own types (or wrappers), you should either extend WBIMetadataType or implement the MetadataType interface directly.

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:


Discovery-service.xml

For the tool to detect and use your adapter, you need a discovery-service.xml file in your “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>WebSphere Sample Adapter for 
Enterprise Information System Simulator
<j2ee:description>
<j2ee:display-name>WebSphere Sample Adapter for Enterprise Information System Simulator
</j2ee:display-name>
<emd:vendor-name xsi:type
="j2ee:xsdStringType>IBM</emd:vendor-name>	
<emd:version xsi:type="j2ee:xsdStringType">
@adapter-version@@adapter-version@>
<emd:spec-version>1.1/emd:spec-version>
<emd:discoveryService-class xsi:type=
"j2ee:fully-qualified-classType">
com.ibm.j2ca.eissa.emd.discovery.EISSAMetadataDiscovery
</emd:discoveryService-class>
<emd:metadataEdit-class xsi:type=
"j2ee:fully-qualified-classType">
com.ibm.j2ca.eissa.emd.discovery.EISSAMetadataEdit
</emd:metadataEdit-class>
<emd:application-specific-schema>
<j2ee:description>
PeopleSoft ASI schema</j2ee:description>
<j2ee:displayname>PeopleSoft ASI schema</j2ee:display-name>
<emd:asiNSURI>http://www.ibm.com/xmlns/prod
/websphere/j2ca/peoplesoft/metadata
</emd:asiNSURI><emd:asiSchemaLocation>
PeopleSoftASI.xsdemd:asiSchemaLocation>
PeopleSoftASI.xsd>
</emd:application-specific-schema>
</emd:discoveryService>

Enterprise Metadata Discovery interfaces and implementation for technology adapters