cancel
Showing results for 
Search instead for 
Did you mean: 

Interface name in Adapter module

Former Member
0 Kudos

Hi Gems,

In my adapter module , i have a bean class and an other class extends AbstractTransformation with transform method.

public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException {

strReceiverInterface = (String) in.getInputHeader().getReceiverInterface();

strSenderInterface = (String) in.getInputHeader().getSenderInterface();

inTime = in.getInputHeader().getTimeSent();

// ...

}

From my Bean class i created an Object and fetched the interface name.. .. but at runtime interface name comes null.

Can any one tried this ever?? Please let me know ASAP..

Thanks

Prabhakar

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

If your requirement is just to get the sender and receiver interface names, then it would be very simple if you take them as parameters from module context in your bean class. And then,you can give the corresponding interface names in the module tab of your configuration.

Correct me, if my understanding is wrong.

Regards,

Swetha.

Former Member
0 Kudos

That is not necessary and limits you to one interface per channel, instead use get the Action from the message and use the getType() and getName() methods in the Action to get the interface namespace and name.

Message msg;

Object obj = moduleData.GetPrincipalData();

msg = (Message) obj;

Action act = msg.getAction();

String interfaceNamespace = act.getType();

String interfaceName = act.getName():

Hope this helps

Ricardo

Former Member
0 Kudos

Hi,

Is it possible to retrieve the processing mode (synchronous or asynchronous) from a custom adapter module?

Regards,

Pedro Leal

iaki_vila
Active Contributor
0 Kudos

Hi Pedro,

In the constants procvided by ravi you have the constant PROCESSING_MODE

Regards.

Former Member
0 Kudos

Hi Iñaki,

Those constants belong to com.sap.aii.mapping.api.StreamTransformationConstants. Are these constants available outside mappings? If yes, how can I access those constants?

Aditional question: are those constants also available at Axis Sender Adapter?

Regards,

Pedro Leal

Shabarish_Nair
Active Contributor
0 Kudos

is this being used in your Sender side adapter?

I guess those values will be populated only in the receiver side.

Do check !!

Former Member
0 Kudos

I am using in Receiver side adapter...

former_member181962
Active Contributor
0 Kudos
former_member204873
Contributor
0 Kudos

hi,

U may also try to use StreamTransformationConstants

Please check:

http://help.sap.com/javadocs/pi/SP3/xpi/index.html

Thanks!!