[SWS-534] Request JMS correlation id field not used to set response message JMS correlation id Created: 24/Jun/09  Updated: 04/May/12  Resolved: 30/Jul/09

Status: Closed
Project: Spring Web Services
Component/s: None
Affects Version/s: 1.5.4
Fix Version/s: 1.5.8

Type: Improvement Priority: Blocker
Reporter: Gary Flood Assignee: Arjen Poutsma
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 0d
Time Spent: 7m
Original Estimate: Not Specified

Windows XP SP2

Reference URL: http://forum.springsource.org/showthread.php?p=247490#post247490


In JmsReceiverConnection.onSendBeforeWrite(...) the following code sets the response correlation id field :-

>> responseMessage.setJMSCorrelationID(requestMessage .getJMSMessageID());

There does not seem to be a check on the inbound request's correlation id as in the following code from JmsInvokerServiceExporter.createResponseMessage(.. .)

>>String correlation = request.getJMSCorrelationID();
>>if (correlation == null)

{ >>correlation = request.getJMSMessageID(); >>}


The above logic has also been implemented in MessageListnenerAdapter and I am looking for the same behaviour in JmsReceiverConnection.onSendBeforeWrite(...).

This seems to be related to http://jira.springframework.org/browse/SPR-4647

Comment by Arjen Poutsma [ 24/Jun/09 ]

This is in accordance with the SOAP over JMS spec, see http://www.w3.org/TR/2009/CR-soapjms-20090604/#responder-transition

Comment by 123 [ 24/Jul/09 ]

I am also facing the same problem.
I am using the oracle service bus to post the message to the request queue.
I am seeting the response correlation pattern as correlation id.
The spring web serivice picks up the message from the request queue and after procerssing it sends the response back to the response queue.But the message is not getting picked up from the response queue.
But when i use Message Id as the respose correlation pattern,the message is gettnig picked up from the response queue.
This means by default, the request message id is set to the response correlation id.
when correlation id pattern is used then the request correlation id must be copied to the response correlation id. This is the reason why the Oracle service bus is not able to identify the message and hence not getting picked up.
The condition check for

if (correlation id==null)

Please fix this bug .

Comment by Arjen Poutsma [ 26/Jul/09 ]

We might be able to make this a configurable feature, i.e. you can pick whether you want response messages to use the request's message id or correlation id.

Comment by Gary Flood [ 26/Jul/09 ]

I'm happy that the Spring source is correctly implementing the spec. Possibly having a configurable feature with the current behaviour being the default would be a decent compromise. We have been able to work around the issue such that the message id being used as the correlation id is acceptable for our solution.

Comment by Arjen Poutsma [ 30/Jul/09 ]

I've decided against making it an option, and went for an automatic fallback instead of explicit configuration, just like JmsInvokerServiceExporter.

Comment by 123 [ 03/Aug/09 ]

Thanks for the help.
How should i use it now.Is there any separate updated jar file available having this option?

Comment by Arjen Poutsma [ 03/Aug/09 ]

SNapshots are available at http://static.springsource.org/spring-ws/sites/1.5/downloads/snapshots.html

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Sat Dec 15 23:33:02 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.