callbackHandler.setIssuer("www.example.com");
SAMLCallback samlCallback = new SAMLCallback();
SAMLUtil.doSAMLCallback(callbackHandler, samlCallback);
SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback);
WSSecSAMLToken wsSign = new WSSecSAMLToken();
Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
WSSecHeader secHeader = new WSSecHeader();
secHeader.insertSecurityHeader(doc);
Document unsignedDoc = wsSign.build(doc, samlAssertion, secHeader);
if (LOG.isDebugEnabled()) {
LOG.debug("SAML 2 Attr Assertion (sender vouches):");
String outputString =
XMLUtils.PrettyDocumentToString(unsignedDoc);