Search in sources :

Example 1 with ReliableService

use of org.jboss.as.test.integration.ws.wsrm.generated.ReliableService in project wildfly by wildfly.

the class ReliableServiceTestCase method consumeOneWayService.

private void consumeOneWayService() throws Exception {
    QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsrm", "ReliableService");
    URL wsdlURL = new URL(baseUrl, "ReliableService?wsdl");
    Service service = Service.create(wsdlURL, serviceName, new UseNewBusFeature());
    ReliableService proxy = (ReliableService) service.getPort(ReliableService.class);
    BindingProvider bp = (BindingProvider) proxy;
    bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, new URL(baseUrl, "ReliableService").toString());
    proxy.writeLogMessage();
}
Also used : QName(javax.xml.namespace.QName) UseNewBusFeature(org.jboss.wsf.stack.cxf.client.UseNewBusFeature) ReliableService(org.jboss.as.test.integration.ws.wsrm.generated.ReliableService) ReliableService(org.jboss.as.test.integration.ws.wsrm.generated.ReliableService) Service(javax.xml.ws.Service) BindingProvider(javax.xml.ws.BindingProvider) URL(java.net.URL)

Example 2 with ReliableService

use of org.jboss.as.test.integration.ws.wsrm.generated.ReliableService in project wildfly by wildfly.

the class ReliableServiceTestCase method consumeHelloService.

private void consumeHelloService() throws Exception {
    QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsrm", "ReliableService");
    URL wsdlURL = new URL(baseUrl, "ReliableService?wsdl");
    Service service = Service.create(wsdlURL, serviceName, new UseNewBusFeature());
    ReliableService proxy = (ReliableService) service.getPort(ReliableService.class);
    BindingProvider bp = (BindingProvider) proxy;
    bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, new URL(baseUrl, "ReliableService").toString());
    Assert.assertEquals("Hello Rosta!", proxy.sayHello("Rosta"));
}
Also used : QName(javax.xml.namespace.QName) UseNewBusFeature(org.jboss.wsf.stack.cxf.client.UseNewBusFeature) ReliableService(org.jboss.as.test.integration.ws.wsrm.generated.ReliableService) ReliableService(org.jboss.as.test.integration.ws.wsrm.generated.ReliableService) Service(javax.xml.ws.Service) BindingProvider(javax.xml.ws.BindingProvider) URL(java.net.URL)

Aggregations

URL (java.net.URL)2 QName (javax.xml.namespace.QName)2 BindingProvider (javax.xml.ws.BindingProvider)2 Service (javax.xml.ws.Service)2 ReliableService (org.jboss.as.test.integration.ws.wsrm.generated.ReliableService)2 UseNewBusFeature (org.jboss.wsf.stack.cxf.client.UseNewBusFeature)2