on 11-15-2006 6:34 AM
I want to retrieve following details in an adapter module
1) Sender Service : message.getFromService().getName()
2) Sender Interface :
3) Sender Namespace :
4) Reciever Service : message.getToService().getName()
5) Reciever Namespace :
6) Reciever Interface :
How can i retrieve 2,3,5 & 6?
Regards,
Amol
Hi Amol,
Check this code fragment to get the Interface where the module is configured(outbound or inbound). It basically uses the Message Interface.
Object obj = md.getPrincipalData();
com.sap.aii.af.ra.ms.api.Message msg = (Message) obj;
String interrface = msg.getAction().getName();
For Namespace check on the Action Object for more i hope it is
msg.getAction().getType();
I am not sure check it out and get back.
Regards,
Sudharshan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when you say the container? where do u instantiate the container? is it a java container... if not, from which import/package we can get this container..
I was trying to write a code for this in netweaver.. but it shows container is not imported anywhere.. any suggestion
thanks-Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My suggestion it´s to write the information you need on specifig tag in the payload, during the message mapping, with a custom function like this:
********************************************
String namespace;
java.util.Map map;
map = container.getTransformationParameters();
namespace = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
return namespace;
********************************************
For more information:
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
After this you can read the informations in the adapter module, and delete the added tag in order to have a clean payload without the additional parameters
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.