use of org.jboss.as.test.integration.ws.wsse.trust.bearer.BearerIface in project wildfly by wildfly.
the class WSTrustTestCase method testBearer.
@Test
@RunAsClient
@OperateOnDeployment(BEARER_SERVER_DEP)
@WrapThreadContextClassLoader
public void testBearer() throws Exception {
Bus bus = BusFactory.newInstance().createBus();
try {
BusFactory.setThreadDefaultBus(bus);
final QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/bearerwssecuritypolicy", "BearerService");
Service service = Service.create(new URL(serviceURL + "BearerService?wsdl"), serviceName);
BearerIface proxy = (BearerIface) service.getPort(BearerIface.class);
WSTrustTestUtils.setupWsseAndSTSClientBearer((BindingProvider) proxy, bus);
assertEquals("Bearer WS-Trust Hello World!", proxy.sayHello());
} catch (Exception e) {
throw e;
} finally {
bus.shutdown(true);
}
}
Aggregations