use of org.jboss.test.ws.jaxws.samples.wsse.policy.trust.bearer.BearerIface in project jbossws-cxf by jbossws.
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());
} finally {
bus.shutdown(true);
}
}
Aggregations