/******************************************************************************* *******************************************************************************/ package at.gv.egiz.eaaf.modules.pvp2.impl.message; import org.opensaml.Configuration; import org.opensaml.saml2.core.StatusResponseType; import org.opensaml.xml.io.Unmarshaller; import org.opensaml.xml.io.UnmarshallerFactory; import org.opensaml.xml.io.UnmarshallingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class PVPSProfileResponse extends InboundMessage { private static final Logger log = LoggerFactory.getLogger(PVPSProfileResponse.class); private static final long serialVersionUID = -1133012928130138501L; public PVPSProfileResponse(StatusResponseType response) { setSAMLMessage(response.getDOM()); } public StatusResponseType getResponse() { UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory(); Unmarshaller unmashaller = unmarshallerFactory.getUnmarshaller(getInboundMessage()); try { return (StatusResponseType) unmashaller.unmarshall(getInboundMessage()); } catch (UnmarshallingException e) { log.warn("AuthnResponse Unmarshaller error", e); return null; } } }