public AegisJaxWsTest() {
}
private void setupForTest(boolean sec) throws Exception {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(AegisJaxWs.class);
if (sec) {
factory.setAddress("http://localhost:" + PORT + "/aegisJaxWsUN");
WSS4JOutInterceptor wss4jOut = new WSS4JOutInterceptor();
wss4jOut.setProperty("action", "UsernameToken");
wss4jOut.setProperty("user", "alice");
wss4jOut.setProperty("password", "pass");
factory.setProperties(new HashMap<String, Object>());
factory.getProperties().put("password", "pass");
factory.getOutInterceptors().add(wss4jOut);
} else {
factory.setAddress("http://localhost:" + PORT + "/aegisJaxWs");
}
factory.getServiceFactory().setDataBinding(new AegisDatabinding());
client = (AegisJaxWs)factory.create();
}