Monday, December 10, 2007

Testing Sample Adapter

There are many cases where the existing adapter doesn't meet all your requirements and you want to develop a new adapter. But where to start?

SAP provides a Sample Adapter for this purpose. You can start testing this adapter, understand the code and do modifications.


The Sample Adapter is present on the adapter engine with the name sample_ra.sda.You can search for it on your XI Server or on decentralized adapter engine (if u have)

Extract the sample_ra.sda with WinZip. You will get sample_ra.rar and some .xml files(Deployment descriptors).

Extract the sample_ra.rar with WinZip and you can find the sample_ra.jar and .xml files.

To get the Java Doc and source text of sample adapter extract the sample_ra.jar file.

If the sample adapter is already deployed then no need to deploy it again. If it is not deployed then deploy the sample_ra.sda file though SDM.The JNDI name of your deployed adapter will be "deployedAdapters//shareable/. Here the connector name means the name of your .rar file.By default it is deployed. So now all that you need to do for testing Sample Adapter is create the Adapter Meta Data and use the Adapter in Communication channel at configuration time.


Create Adapter Meta Data in Integration Repository. The Meta data should be under the Namespace, with the name JCA and the software component could be anything (it doesn’t matter). This restriction is because; in the ra.xml (extract the sample_ra.rar) file these deployment descriptors were given. If u wants to create Adapter Meta Data with some other name and namespace then change the corresponding values in ra.xml file and deploy it. To create the Adapter Meta Data copy the contents of SampleRa.xml (Extract the sample_ra.jar file) file and paste it in Adapter Meta Data Source Document View (4th icon on create Adapter metadata screen). Once you active the Meta Data Object, then it is ready to be used in Integration Directory at configuration time.



At configuration time in communication channel, select the Adapter(the Adapter name is same as Metadata name)that is displayed with the name that u have given for Metadata at Design time. You can use this adapter both on Sender and Receiver side.



You can see the status of Sample Adapter in Runtime workbench same as other adapters

No comments:

Blog Archive