Service service = Service.create(wsdl, qname); //Create endpoint metadata
TestEndpoint port = service.getPort(portQname, TestEndpoint.class); //Get proxy
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put(SAML2Constants.SAML2_ASSERTION_PROPERTY, assertion); //insert assertion
List<Handler> handlers = bp.getBinding().getHandlerChain();
handlers.add(new SAML2Handler()); //Add Picketlink JAX-WS handler to process assertion
bp.getBinding().setHandlerChain(handlers);
return port.hello(name); //invoke endpoint
}