on 03-10-2006 2:37 PM
Hi all,
We are trying to build a custom adapter module, in order to create an additional attachment for our XI message. In this attachment we want to put the ID of the XI-payload (see below). Our first statement aims to get access to the XI-message:
Message msg = (message) inputModuleData.getPrincipalData();
Now we want to get the ID of the XI-payload, which is held in the XI-header fields as <i>blablabla</i> in <b><SAP:Payload xlink:href="blablabla"> etcetera</b>.
Does anyone know how to extract this information from the JAVA Message object msg within JAVA?
Thanks!!
Best regards, Maarten
Hi all,
I'm a colleague of Maarten, and I think maybe we didn't explain well enough what we want. So let me try to elaborate:
We want to obtain the reference (within the SOAP-Body of the XI-message) to the attachment which contains the main payload (at least, in XI itself). This reference seems to have gone missing, once our adapter module (after having gone through XI) is entered (and, by the way, before we enter the SOAP-receiver-adapter).
The JAVA-representation of the XI-message seems to hide the fact that in XI itself, the main payload is an attachment, referenced from within the SOAP-Body.
Nevertheless, we would like to obtain/retain(?) that reference, in order to put it in our own to-be-created-additional-attachment, which would go (via the PayloadSwapBean-module of SAP) into the SOAP-body of the final SOAP-call, and should then reference the 'new attachment' (which was (in XI itself) the main payload).
So, I think both answers (up to now) don't help us much (however: thanks for your reaction anyway of course).
So, maybe someone has another idea?
Regards, Fred
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maarten,
You can access the XI Message Id in Adapter module by calling
MessageObj.getMessageId()
try the following code..
Object dataObject = null;
Message xiMessage = null;
dataObject = modData.getPrincipalData();
xiMessage = (Message) dataObject;
String msgID = xiMessage.getMessageId();
Regards,
Ananth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maarten,
String headerField;
java.util.Map map;
// get runtime constant map
map = container.getTransformationParameters();
// get value of header field by using variable key
headerField = (String) map.get("MessageId");
have a look to http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.