Client client = ClientProxy.getClient(transportSaml2Port);
Endpoint ep = client.getEndpoint();
String id = "1234";
ep.getEndpointInfo().setProperty(TokenStore.class.getName(), new MemoryTokenStore());
ep.getEndpointInfo().setProperty(SecurityConstants.TOKEN_ID, id);
TokenStore store = (TokenStore)ep.getEndpointInfo().getProperty(TokenStore.class.getName());
SAMLParms samlParms = new SAMLParms();
samlParms.setCallbackHandler(new Saml2CallbackHandler());
AssertionWrapper assertion = new AssertionWrapper(samlParms);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Element assertionElement = assertion.toDOM(db.newDocument());
SecurityToken tok = new SecurityToken(id);
tok.setTokenType(WSConstants.WSS_SAML2_TOKEN_TYPE);
tok.setToken(assertionElement);
store.add(tok);
doubleIt(transportSaml2Port, 50);
}