mace-opensaml-users - Re: [OpenSAML] Unmarshall and validating an SAML file
Subject: OpenSAML user discussion
List archive
- From: murali mca <>
- To:
- Subject: Re: [OpenSAML] Unmarshall and validating an SAML file
- Date: Fri, 23 Oct 2009 17:22:41 -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=rRsS3KXv59L2f7lSohw7V6jR30UP5QoydmC3ZBE8AKQd9X89YhhiJjIPqWrNbuJ8UROcQhCYwXBVooZoW40fpobaAADyPfmbwyRzgeJiyDePXLoDSQ6bL1X8XlXcTQUWpfhoM4D9DV7fDLWcGm8/IEXD/dvHPduuIkQj3mULynI=;
Hi
Thanks for reply.
I have got the SAML with namespace and now am able to resolve the "SAXParseException".
String fileName = "C:/Users/SamlResponse.xml";BasicParserPool ppMgr = new BasicParserPool();ppMgr.setNamespaceAware( true);
Document inCommonMDDoc; FileInputStream in = new FileInputStream(new File(fileName));try{ inCommonMDDoc = ppMgr.parse(in); Element responseRoot = inCommonMDDoc.getDocumentElement();
System. out.println("responseRoot is:"+responseRoot);
UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory(); Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(responseRoot);
Response samlresponse = (Response) unmarshaller.unmarshall(responseRoot);
} catch (XMLParserException e){e.printStackTrace();
} catch (UnmarshallingException e){e.printStackTrace(); }
When I ran the above piece of code, I am presenting with responseRoot: null
"Exception in thread "main" java.lang.NullPointerException "
I am getting the "null", at this line. Element responseRoot = inCommonMDDoc.getDocumentElement();
Please could you correct me if I am doing wrong in mycode.
Thanks
Regards
--- On Fri, 23/10/09, Brent Putman <> wrote:
|
From cricket scores to your friends. Try the Yahoo! India Homepage!
- Unmarshall and validating an SAML file, muralimca2004, 10/22/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, Xavier Drudis Ferran, 10/22/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, murali mca, 10/22/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, Brent Putman, 10/22/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, murali mca, 10/23/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, Brent Putman, 10/26/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, murali mca, 10/26/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, Brent Putman, 10/26/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, murali mca, 10/23/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, Brent Putman, 10/22/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, murali mca, 10/22/2009
- Re: [OpenSAML] Unmarshall and validating an SAML file, Xavier Drudis Ferran, 10/22/2009
Archive powered by MHonArc 2.6.16.