/******************************************************************************* *******************************************************************************/ package at.gv.egiz.eaaf.modules.pvp2.impl.message; import org.opensaml.Configuration; import org.opensaml.xml.io.Unmarshaller; import org.opensaml.xml.io.UnmarshallerFactory; import org.opensaml.xml.io.UnmarshallingException; import org.opensaml.xml.signature.SignableXMLObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class PVPSProfileRequest extends InboundMessage{ private static final Logger log = LoggerFactory.getLogger(PVPSProfileRequest.class); private static final long serialVersionUID = 8613921176727607896L; private String binding = null; public PVPSProfileRequest(SignableXMLObject inboundMessage, String binding) { setSAMLMessage(inboundMessage.getDOM()); this.binding = binding; } public String getRequestBinding() { return binding; } public SignableXMLObject getSamlRequest() { UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory(); Unmarshaller unmashaller = unmarshallerFactory.getUnmarshaller(getInboundMessage()); try { return (SignableXMLObject) unmashaller.unmarshall(getInboundMessage()); } catch (UnmarshallingException e) { log.warn("AuthnRequest Unmarshaller error", e); return null; } } }