"http://localhost:9000/SoapContext/SoapPort");
Greeter greeter = service.getPort(fakePortName, Greeter.class);
try {
//try the jaxws way
BindingProvider bp = (BindingProvider)greeter;
bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "BJ");
bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "pswd");
String s = greeter.greetMe("secure");
assertEquals("Hello BJ", s);
bp.getRequestContext().remove(BindingProvider.USERNAME_PROPERTY);
bp.getRequestContext().remove(BindingProvider.PASSWORD_PROPERTY);
//try setting on the conduit directly
Client client = ClientProxy.getClient(greeter);
HTTPConduit httpConduit = (HTTPConduit)client.getConduit();
AuthorizationPolicy policy = new AuthorizationPolicy();