private Assertion createAssertion(
String sXMLID, String sParentID, String sResolved)
{
// create the SAMLSubject
Subject oSubject = new Subject();
NameID oName = new NameID(Tags.TAG_NAMEID);
oName.setNameQualifier(sParentID);
oName.setValue(sResolved);
oSubject.setNameID(oName);
// create the SAML Attribute Statement
AttributeStatement oAttrStatement = new AttributeStatement();
Attribute oAttr = new Attribute();
oAttr.setValue("#" + sXMLID);
oAttr.setName(Tags.NS_XRD_V2);
oAttrStatement.setAttribute(oAttr);
// create the conditions
Conditions oConditions = new Conditions();
// now we can create the true SAML Assertion
Assertion oXRIAssertion = new Assertion();
oXRIAssertion.setIssueInstant(DOMUtils.toXMLDateTime(new Date()));
NameID oIssuer = new NameID(Tags.TAG_ISSUER);
oIssuer.setValue(msIssuer);
oXRIAssertion.setIssuer(oIssuer);
oXRIAssertion.setSubject(oSubject);
oXRIAssertion.setAttrStatement(oAttrStatement);
oXRIAssertion.setConditions(oConditions);