cancel
Showing results for 
Search instead for 
Did you mean: 

Determine the adapter type in adapter module

Former Member
0 Kudos

Hi All,

How can I determine with in a adapter module (custom developed) which adapter type the message is currently being processed? I was planning to use the method Message.getProtocol() and according to the documentation this returns

"Returns the protocol of this message (i.e. message format)"

The result of this method is always "XI".

I want to have a generic module for file and soap adapters. With in the module, I want to perform a different set of operations depending on the adapter type.

Any inputs are highly appreciated.

Thanks

Jai

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

In the sample module is an example for accessing the communication channel and reading values.

Former Member
0 Kudos

Thanks Stefan. I am able to get the adapter type now.

I am using

CPAFactory factory = CPAFactory.getInstance();

CPALookupManager lookup = factory.getLookupManager();

String strChannelId = moduleContext.getChannelID();

Channel channel = (Channel) lookup.getCPAObject(CPAObjectType.CHANNEL, strChannelId);

adapterType = channel.getAdapterType();

Regards

Jai

Answers (0)