use of com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor in project narayana by jbosstm.
the class TestClient method init.
/**
* Initialise the servlet.
*
* @param config The servlet configuration.
*/
public void init(final ServletConfig config) throws ServletException {
try {
URL wsdlLocation = new URL("http://" + getLocalHost() + ":8080/txbridge-inbound-tests-service/TestServiceImpl?wsdl");
QName serviceName = new QName("http://client.inbound.tests.txbridge.jbossts.jboss.org/", "TestServiceImplService");
Service service = Service.create(wsdlLocation, serviceName);
testService = service.getPort(TestService.class);
BindingProvider bindingProvider = (BindingProvider) testService;
List<Handler> handlers = new ArrayList<Handler>(1);
handlers.add(new JaxWSHeaderContextProcessor());
bindingProvider.getBinding().setHandlerChain(handlers);
context = config.getServletContext();
} catch (Exception e) {
throw new ServletException(e);
}
}
use of com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor in project narayana by jbosstm.
the class TestServiceBAClient method getClientWithManuallyAddedHandler.
public static TestServiceBA getClientWithManuallyAddedHandler() throws MalformedURLException {
TestServiceBAClient client = new TestServiceBAClient();
Service service = Service.create(new URL(WSDL_URL), SERVICE_NAME);
client.testService = service.getPort(PORT_NAME, TestServiceBA.class);
BindingProvider bindingProvider = (BindingProvider) client.testService;
@SuppressWarnings("rawtypes") List<Handler> handlers = new ArrayList<Handler>(1);
handlers.add(new JaxWSHeaderContextProcessor());
bindingProvider.getBinding().setHandlerChain(handlers);
return client;
}
use of com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor in project narayana by jbosstm.
the class TestServiceATClient method getClientWithManuallyAddedHandler.
public static TestServiceAT getClientWithManuallyAddedHandler() throws MalformedURLException {
TestServiceATClient client = new TestServiceATClient();
Service service = Service.create(new URL(WSDL_URL), SERVICE_NAME);
client.testService = service.getPort(PORT_NAME, TestServiceAT.class);
BindingProvider bindingProvider = (BindingProvider) client.testService;
@SuppressWarnings("rawtypes") List<Handler> handlers = new ArrayList<Handler>(1);
handlers.add(new JaxWSHeaderContextProcessor());
bindingProvider.getBinding().setHandlerChain(handlers);
return client;
}
use of com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor in project narayana by jbosstm.
the class TestClient method init.
/**
* Initialise the servlet.
*
* @param config The servlet configuration.
*/
public void init(final ServletConfig config) throws ServletException {
try {
Context ic = new InitialContext();
userTransaction = (UserTransaction) ic.lookup("java:comp/UserTransaction");
URL wsdlLocation = new URL("http://" + getLocalHost() + ":8080/txbridge-outbound-tests-service/TestServiceImpl?wsdl");
QName serviceName = new QName("http://client.outbound.tests.txbridge.jbossts.jboss.org/", "TestServiceImplService");
Service service = Service.create(wsdlLocation, serviceName);
testService = service.getPort(TestService.class);
BindingProvider bindingProvider = (BindingProvider) testService;
List<Handler> handlers = new ArrayList<Handler>(2);
handlers.add(new JaxWSTxOutboundBridgeHandler());
handlers.add(new JaxWSHeaderContextProcessor());
bindingProvider.getBinding().setHandlerChain(handlers);
context = config.getServletContext();
} catch (Exception e) {
throw new ServletException(e);
}
}
use of com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor in project narayana by jbosstm.
the class TestATClient method getServiceWithManualHandlers.
private CommonTestService getServiceWithManualHandlers(boolean isWSATService) {
CommonTestService testService;
if (isWSATService) {
Service service = Service.create(wsatServiceWsdlLocation, wsatServiceName);
testService = service.getPort(TestATService.class);
} else {
Service service = Service.create(simpleServiceWsdlLocation, simpleServiceName);
testService = service.getPort(TestNonATService.class);
}
BindingProvider bindingProvider = (BindingProvider) testService;
List<Handler> handlers = new ArrayList<Handler>(2);
handlers.add(new JaxWSTxOutboundBridgeHandler());
handlers.add(new JaxWSHeaderContextProcessor());
bindingProvider.getBinding().setHandlerChain(handlers);
return testService;
}
Aggregations