Search in sources :

Example 1 with SOAPService7

use of org.apache.hello_world_doc_lit.SOAPService7 in project cxf by apache.

the class JMSClientServerTest method testReplyToConfig.

@Test
public void testReplyToConfig() throws Exception {
    ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(broker.getBrokerURL());
    TestReceiver receiver = new TestReceiver(cf, "SoapService7.replyto.queue", false);
    receiver.setStaticReplyQueue("SoapService7.reply.queue");
    receiver.runAsync();
    QName serviceName = new QName("http://apache.org/hello_world_doc_lit", "SOAPService7");
    QName portName = new QName("http://apache.org/hello_world_doc_lit", "SoapPort7");
    URL wsdl = getWSDLURL("/wsdl/hello_world_doc_lit.wsdl");
    SOAPService7 service = new SOAPService7(wsdl, serviceName);
    Greeter greeter = service.getPort(portName, Greeter.class);
    String name = "FooBar";
    String reply = greeter.greetMe(name);
    Assert.assertEquals("Hello " + name, reply);
    ((Closeable) greeter).close();
}
Also used : ActiveMQConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory) QName(javax.xml.namespace.QName) Greeter(org.apache.hello_world_doc_lit.Greeter) Closeable(java.io.Closeable) TestReceiver(org.apache.cxf.transport.jms.util.TestReceiver) URL(java.net.URL) SOAPService7(org.apache.hello_world_doc_lit.SOAPService7) Test(org.junit.Test)

Aggregations

Closeable (java.io.Closeable)1 URL (java.net.URL)1 QName (javax.xml.namespace.QName)1 ActiveMQConnectionFactory (org.apache.activemq.ActiveMQConnectionFactory)1 TestReceiver (org.apache.cxf.transport.jms.util.TestReceiver)1 Greeter (org.apache.hello_world_doc_lit.Greeter)1 SOAPService7 (org.apache.hello_world_doc_lit.SOAPService7)1 Test (org.junit.Test)1