use of org.apache.cxf.systest.jaxrs.JMSBookStore in project cxf by apache.
the class JAXRSJmsTest method testGetBookFromProxyClientWithQueryWithTextJMSMessage.
@Test
public void testGetBookFromProxyClientWithQueryWithTextJMSMessage() throws Exception {
// setup the the client
String endpointAddressUrlEncoded = "jms:jndi:dynamicQueues/test.jmstransport.text" + "?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory" + "&replyToName=dynamicQueues/test.jmstransport.response" + "&jndiURL=tcp://localhost:" + JMS_PORT + "&jndiConnectionFactoryName=ConnectionFactory" + "&messageType=text";
JMSBookStore client = JAXRSClientFactory.create(endpointAddressUrlEncoded, JMSBookStore.class);
Book book = client.getBookByURLQuery(new String[] { "1", "2", "3" });
assertEquals("Get a wrong response code.", 200, WebClient.client(client).getResponse().getStatus());
assertEquals("Get a wrong book id.", 123, book.getId());
}
Aggregations