cancel
Showing results for 
Search instead for 
Did you mean: 

How do you set the system MESSAGE_ID to an XML field value?

Former Member
0 Kudos

Hi experts,

I need to set the value of the system MESSAGE_ID to a field that an external company will send in the XML file. What I could gather thus far is that it should look something like this:

//externalRef and container are passed as parameters:

GlobalContainer globalContainer;

String headerField;

java.util.Map map;

globalContainer = container.getGlobalContainer();

globalContainer.setParameter("MessageId", externalRef);

map = globalContainer.getParameters();

headerField = (String) map.get(StreamTransformationConstants.MESSAGE_ID);

return headerField;

The problem is the setParameter() function - not sure how it is supposed to work. The GETting of the MessageId works though but I need to SET it while mapping the file. Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> I need to set the value of the system MESSAGE_ID to a field that an external company will send in the XML file.

This is not possible.

You can set the message ID externally, when the sender adapter is: HTTP, SOAP, JMS.

But you cannot set in a mapping.

Former Member
0 Kudos

Hi thanks for the replies!

I am using a SOAP adapter as the sender channel - any idea how this works then?

stefan_grube
Active Contributor
0 Kudos

In SOAP adapter the sender has to provide the message ID as URL parameter:

http://host:port/XISOAPAdapter/MessageServlet?channel=p:s:c&vers
ion=3.0&...&MessageId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

You find the details in SAP note 856597

Former Member
0 Kudos

Thanks Stefan!

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi, I've tried the links but had no luck with setting the parameters.