Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] Unmarshall and validating an SAML file

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] Unmarshall and validating an SAML file


Chronological Thread 
  • From: murali mca <>
  • To:
  • Subject: Re: [OpenSAML] Unmarshall and validating an SAML file
  • Date: Thu, 22 Oct 2009 15:47:23 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=q8ldj8ahhSRaTXhS5K/75TMJPz5RwN/TAtb0hVFPTcXUPlEqD1yNYnF4ZkiWKJufcl979vkLhzpt60eF5+4wtdDTIbJ320S0KK1gyaZGk4NzFwgjNO3n0HkP7YyomatEiKDBFxrkfmq8UbVq5lXHQaFd1vkg/BLWENjqcTfcieQ=;


Thanks for the reply.
 
After using FileInputStream,I am able to get rid of the error. Now I am getting with below  "SAX ParserException" error.
 
org.xml.sax.SAXParseException
: cvc-elt.1: Cannot find the declaration of element 'Response'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Unknown Source)
at util.MetadataTest.testInCommonUnmarshall(MetadataTest.java:89)
at util.MetadataTest.main(MetadataTest.java:126)
 
Can you help me to understand, why this error is throwing and how the schema validation works in SAML?
 
Thanks,
Regards.
 
--- On Thu, 22/10/09, Xavier Drudis Ferran <> wrote:

From: Xavier Drudis Ferran <>
Subject: Re: [OpenSAML] Unmarshall and validating an SAML file
To:
Date: Thursday, 22 October, 2009, 3:29 PM

On Thu, Oct 22, 2009 at 05:42:17AM -0400, wrote:
>  String inCommonMDFile = "templates/SamlResponse.xml";
[...]
>   InputStream in = new ByteArrayInputStream(inCommonMDFile.getBytes());  Document inCommonMDDoc = ppMgr.parse(in);

Are you using the file name as if it was the file content ?
Why don't you just use a FileInputStream ?

--
Xavi Drudis Ferran



Keep up with people you care about with Yahoo! India Mail. Learn how.


Archive powered by MHonArc 2.6.16.

Top of Page