Source:
protected final LogoutRequest buildLogoutRequest(final SAML2MessageContext context, final SingleLogoutService ssoService, final SAML2Profile profile) { final SAMLObjectBuilder<LogoutRequest> builder = (SAMLObjectBuilder<LogoutRequest>) this.builderFactory .getBuilder(LogoutRequest.DEFAULT_ELEMENT_NAME); final LogoutRequest request = builder.buildObject(); final SAMLSelfEntityContext selfContext = context.getSAMLSelfEntityContext(); request.setID(SAML2Utils.generateID()); request.setIssuer(getIssuer(selfContext.getEntityId())); request.setIssueInstant(DateTime.now(DateTimeZone.UTC).plusSeconds(this.issueInstantSkewSeconds)); request.setVersion(SAMLVersion.VERSION_20); request.setDestination(ssoService.getLocation()); final SAMLObjectBuilder<NameID> nameIdBuilder = (SAMLObjectBuilder<NameID>) this.builderFactory .getBuilder(NameID.DEFAULT_ELEMENT_NAME); final NameID nameId = nameIdBuilder.buildObject(); nameId.setValue(profile.getId()); nameId.setFormat(profile.getSamlNameIdFormat()); if (this.useNameQualifier) { System.out.println("************************** blah blah"); nameId.setNameQualifier(profile.getSamlNameIdNameQualifier()); nameId.setSPNameQualifier(profile.getSamlNameIdSpNameQualifier()); nameId.setSPProvidedID(profile.getSamlNameIdSpProviderId()); } request.setNameID(nameId); final String sessIdx = profile.getSessionIndex(); final SAMLObjectBuilder<SessionIndex> sessionIndexBuilder = (SAMLObjectBuilder<SessionIndex>) this.builderFactory .getBuilder(SessionIndex.DEFAULT_ELEMENT_NAME); final SessionIndex sessionIdx = sessionIndexBuilder.buildObject(); sessionIdx.setSessionIndex(sessIdx); request.getSessionIndexes().add(sessionIdx); return request; }

Target:
protected final LogoutRequest buildLogoutRequest(final SAML2MessageContext context, final SingleLogoutService ssoService, final SAML2Profile profile) { final SAMLObjectBuilder<LogoutRequest> builder = (SAMLObjectBuilder<LogoutRequest>) this.builderFactory .getBuilder(LogoutRequest.DEFAULT_ELEMENT_NAME); final LogoutRequest request = builder.buildObject(); final SAMLSelfEntityContext selfContext = context.getSAMLSelfEntityContext(); request.setID(SAML2Utils.generateID()); request.setIssuer(getIssuer(selfContext.getEntityId())); request.setIssueInstant(DateTime.now(DateTimeZone.UTC).plusSeconds(this.issueInstantSkewSeconds)); request.setVersion(SAMLVersion.VERSION_20); request.setDestination(ssoService.getLocation()); final SAMLObjectBuilder<NameID> nameIdBuilder = (SAMLObjectBuilder<NameID>) this.builderFactory .getBuilder(NameID.DEFAULT_ELEMENT_NAME); final NameID nameId = nameIdBuilder.buildObject(); nameId.setValue(profile.getId()); nameId.setFormat(profile.getSamlNameIdFormat()); if (this.useNameQualifier) { nameId.setNameQualifier(profile.getSamlNameIdNameQualifier()); nameId.setSPNameQualifier(profile.getSamlNameIdSpNameQualifier()); nameId.setSPProvidedID(profile.getSamlNameIdSpProviderId()); } request.setNameID(nameId); final String sessIdx = profile.getSessionIndex(); final SAMLObjectBuilder<SessionIndex> sessionIndexBuilder = (SAMLObjectBuilder<SessionIndex>) this.builderFactory .getBuilder(SessionIndex.DEFAULT_ELEMENT_NAME); final SessionIndex sessionIdx = sessionIndexBuilder.buildObject(); sessionIdx.setSessionIndex(sessIdx); request.getSessionIndexes().add(sessionIdx); return request; }