cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy to JMS and JMS to Proxy - Szenario

Former Member
0 Kudos

Hi @all,

i've implemented an async scenario:

Proxy to JMS (away, request)

JMS to Proxy (way back, response)

Backend is ECC 6.0 and Middleware is PI 7.1.

Business Case: Run a request with a number, get an answer back with an entry. The number is an individual criteria which is not included in the answer. So I decided to write the number in JMSCorrelationID, therefore I've written an UDF in Message Mapping.

I've checked the JMS Correlation ID in additional properties and also added this into the list of additional properties:

key.0 -> read xxxx DCJMSCorreleationID

value.0 -> DCJMSCorrelationID.

First question: is there something what I should account for in JMS receiver channel?

At the way back I've implemented another UDF for writing the JMSCorrelationID back to payload in message mapping.

But I'm not sure that works. The coding looks like:

try

{

DynamicConfiguration conf = (DynamicConfiguration)

container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey KEY_JMSCorrID = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSCorrelationID");

String a = conf.get(KEY_JMSCorrID);

}

catch(Exception e){}

return a; //a is an input field for the payload back to SAP backend.

Second question: is there something what I should accound for JMS sender channel? Do I need to add the DCJMSCorreleationID to the list of additional properties (JMS Correlation is checked)?

Thanks in Advance,

Stefan

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member854360
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

thank you for your answer.

The Proxy to JMS scenario works well and overwrites the JMSCorrelationID given by a number from message payload.

Could you please take a look at the given udf-coding that belongs to JMS to Proxy Scenario?

Is it possible to get the JMSCorrelation at this way?

I also put in JMS-Sender-Channel the JMSCorrelationID into the additional JMS-Message properties and checked "correlation-id from jms message" in adapter specific message attributes.

In Module-Tab of JMS-Sender-Channel i put the module-configuration in a way like this:

-> key.0 insert http://sap.com/xi/XI/System/JMS DCJMSCorreleationID

-> value.0 DCJMSCorreleationID

Do you think that works?

I could not verify this configuration until I get an entry in outbound queue so I can't make tests to that.

In Message Mapping - Test a Null Pointer Exception Occurs, according to the UDF, because I'm reading the DCJMSCorreleationID which is not present at mapping ad hoc test - I think that is ok.

Thank you in Advance,

Stefan

Former Member
0 Kudos

Hi @all,

I've solved the issue.

Thanks for your help,

Stefan