URL wsdlLocation = null;
PingService svc = null;
wsdlLocation = getWsdlLocation(test.prefix);
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();
}