String artifactString;
for (Assertion assertion : artifactContext.getOutboundSAMLMessage().getAssertions()) {
artifact = artifactBuilder.buildArtifact(artifactContext, assertion);
try {
artifactMap.put(artifact.base64Encode(), messageContext.getInboundMessageIssuer(), messageContext
.getOutboundMessageIssuer(), assertion);
} catch (MarshallingException e) {
log.error("Unable to marshall assertion to be represented as an artifact", e);
throw new MessageEncodingException("Unable to marshall assertion to be represented as an artifact", e);
}