use of wssec.wssec10.PingService in project cxf by apache.
the class WSSecurity10Test method testClientServer.
@Test
public void testClientServer() {
BusFactory.setDefaultBus(getStaticBus());
BusFactory.setThreadDefaultBus(getStaticBus());
URL wsdlLocation = null;
PingService svc = null;
wsdlLocation = getWsdlLocation(test.prefix, test.port);
svc = new PingService(wsdlLocation);
final IPingService port = svc.getPort(new QName("http://WSSec/wssec10", test.prefix + "_IPingService"), IPingService.class);
Client cl = ClientProxy.getClient(port);
if (test.streaming) {
// Streaming
((BindingProvider) port).getRequestContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
((BindingProvider) port).getResponseContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
}
HTTPConduit http = (HTTPConduit) cl.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout(0);
httpClientPolicy.setReceiveTimeout(0);
http.setClient(httpClientPolicy);
String output = port.echo(INPUT);
assertEquals(INPUT, output);
cl.destroy();
}
use of wssec.wssec10.PingService 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.wssec10.PingService 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.wssec10.PingService 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