-
Task
-
Resolution: Obsolete
-
Major
-
None
-
None
-
None
Currently, the client will have to use the JMS API directly
InitialContext context = new InitialContext();
QueueConnectionFactory connectionFactory = (QueueConnectionFactory)context.lookup("ConnectionFactory");
Queue reqQueue = (Queue)context.lookup("queue/RequestQueue");
Queue resQueue = (Queue)context.lookup("queue/ResponseQueue");
QueueConnection con = connectionFactory.createQueueConnection();
QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueReceiver receiver = session.createReceiver(resQueue);
ResponseListener responseListener = new ResponseListener();
receiver.setMessageListener(responseListener);
con.start();
TextMessage message = session.createTextMessage(reqMessage);
message.setJMSReplyTo(resQueue);
waitForResponse = true;
QueueSender sender = session.createSender(reqQueue);
sender.send(message);
sender.close();
int timeout = 5000;
while (waitForResponse && timeout > 0)
assertNotNull("Expected response message", responseListener.resMessage);
assertEquals(DOMUtils.parse(resMessage), DOMUtils.parse(responseListener.resMessage));
con.stop();
session.close();
con.close();
Instead, the client should use the standard JAX-WS API to consume a wsdl that defines the jms binding