Solved the problem
Here is the solution:
1) Define a destination provider for your Jms Uri:
Code:
public class JmsDestinationProvider implements DestinationProvider {
private String jmsUri;
public URI getDestination() {
if(StringUtils.hasText(jmsUri)){
try {
return new URI(jmsUri);
} catch (URISyntaxException e) {
}
}
return null;
}
public void setJmsUri(String jmsUri) {
this.jmsUri = jmsUri;
}
}
2) In the spring xml file add a bean for this destination provider and use that bean in ws:outbound-gateway
Code:
<bean id="jmsDestinationProvider" class="play.zahid.springint.activemq.ws.JmsDestinationProvider">
<property name="jmsUri" value="jms:test_queue?messageType=TEXT_MESSAGE&deliveryMode=NON_PERSISTENT" />
</bean>
<ws:outbound-gateway id="wsClientGateway"
destination-provider="jmsDestinationProvider"
message-factory="messageFactory" marshaller="marshaller" unmarshaller="marshaller"
message-sender="messageSender"
request-channel="requestChannel" />
Thanks for the pointer and confirmation ...