documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder docBuilder = documentBuilderFactory.newDocumentBuilder();
Document document = docBuilder.parse(new ByteArrayInputStream(authReqStr.trim()
.getBytes()));
Element element = document.getDocumentElement();
UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory();
Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(element);
response = unmarshaller.unmarshall(element);
// Check for duplicate samlp:Response
NodeList list = response.getDOM().getElementsByTagNameNS( SAMLConstants.SAML20P_NS,"Response");
if (list.getLength() > 0) {
log.error("Invalid schema for the SAML2 reponse");