use of wssec.wssec11.IPingService in project cxf by apache.
the class WSSecurity10UsernameAuthorizationLegacyTest method getComplexPolicyPort.
private static IPingService getComplexPolicyPort(Bus bus) {
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
PingService svc = new PingService(getWsdlLocation("UserNameOverTransport"));
return svc.getPort(new QName("http://WSSec/wssec10", "UserNameOverTransport" + "_IPingService"), IPingService.class);
}
use of wssec.wssec11.IPingService in project cxf by apache.
the class WSSecurity10UsernameAuthorizationTest method getUTOnlyPort.
private static IPingService getUTOnlyPort(Bus bus, boolean hashed) {
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
PingService svc = new PingService(getWsdlLocation(hashed));
return svc.getPort(new QName("http://WSSec/wssec10", hashed ? "UserName_IPingService_hashed" : "UserName_IPingService"), IPingService.class);
}
use of wssec.wssec11.IPingService in project cxf by apache.
the class WSSecurity10UsernameAuthorizationTest method testClientServerComplexPolicyAuthorized.
@Test
public void testClientServerComplexPolicyAuthorized() throws IOException {
String configName = "org/apache/cxf/systest/ws/wssec10/client.xml";
Bus bus = new SpringBusFactory().createBus(configName);
IPingService port = getComplexPolicyPort(bus);
final String output = port.echo(INPUT);
assertEquals(INPUT, output);
((java.io.Closeable) port).close();
bus.shutdown(true);
}
use of wssec.wssec11.IPingService in project cxf by apache.
the class WSSecurity10UsernameAuthorizationTest method testClientServerComplexPolicyUnauthorized.
@Test
public void testClientServerComplexPolicyUnauthorized() throws IOException {
String configName = "org/apache/cxf/systest/ws/wssec10/client_unauthorized.xml";
Bus bus = new SpringBusFactory().createBus(configName);
IPingService port = getComplexPolicyPort(bus);
try {
port.echo(INPUT);
fail("Frank is unauthorized");
} catch (Exception ex) {
assertEquals("Unauthorized", ex.getMessage());
}
((java.io.Closeable) port).close();
bus.shutdown(true);
}
use of wssec.wssec11.IPingService in project cxf by apache.
the class WSSecurity10UsernameAuthorizationTest method getComplexPolicyPort.
private static IPingService getComplexPolicyPort(Bus bus) {
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
PingService svc = new PingService(getWsdlLocation("UserNameOverTransport"));
return svc.getPort(new QName("http://WSSec/wssec10", "UserNameOverTransport" + "_IPingService"), IPingService.class);
}
Aggregations