Search in sources :

Example 1 with HelloWorldOneWayQueueService

use of org.apache.cxf.hello_world_jms.HelloWorldOneWayQueueService in project cxf by apache.

the class JMSClientServerTest method testOneWayQueueConnection.

@Test
public void testOneWayQueueConnection() throws Exception {
    QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldOneWayQueueService");
    QName portName = new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldOneWayQueuePort");
    URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
    HelloWorldOneWayQueueService service = new HelloWorldOneWayQueueService(wsdl, serviceName);
    HelloWorldOneWayPort greeter = service.getPort(portName, HelloWorldOneWayPort.class, new AddressingFeature(true, true));
    for (int idx = 0; idx < 5; idx++) {
        greeter.greetMeOneWay("JMS:Queue:Milestone-" + idx);
    }
    // Give some time to complete one-way calls.
    Thread.sleep(100L);
    ((java.io.Closeable) greeter).close();
}
Also used : HelloWorldOneWayPort(org.apache.cxf.hello_world_jms.HelloWorldOneWayPort) AddressingFeature(javax.xml.ws.soap.AddressingFeature) QName(javax.xml.namespace.QName) Closeable(java.io.Closeable) HelloWorldOneWayQueueService(org.apache.cxf.hello_world_jms.HelloWorldOneWayQueueService) URL(java.net.URL) Endpoint(javax.xml.ws.Endpoint) Test(org.junit.Test)

Aggregations

Closeable (java.io.Closeable)1 URL (java.net.URL)1 QName (javax.xml.namespace.QName)1 Endpoint (javax.xml.ws.Endpoint)1 AddressingFeature (javax.xml.ws.soap.AddressingFeature)1 HelloWorldOneWayPort (org.apache.cxf.hello_world_jms.HelloWorldOneWayPort)1 HelloWorldOneWayQueueService (org.apache.cxf.hello_world_jms.HelloWorldOneWayQueueService)1 Test (org.junit.Test)1