mace-opensaml-users - Re: Re: Problem in creating Assertion Object
Subject: OpenSAML user discussion
List archive
- From:
- To:
- Subject: Re: Re: Problem in creating Assertion Object
- Date: Sun, 27 Aug 2006 20:44:32 -0400 (EDT)
hi,
i am using svn trunk code of opensaml, when i am trying to create a
assertion and than print it. i am getting it as null
output: [saml:Asserton: null]
can you please help me what could be going wrong.
thanks
harsha
Configuration.init();
XMLObjectBuilderFactory builderFactory =
Configuration.getBuilderFactory();
// Get the assertion builder based on the assertion element name
AssertionBuilder builder = (AssertionBuilder)
builderFactory.getBuilder(Assertion.DEFAULT_ELEMENT_NAME);
// Create the assertion
Assertion assertion = builder.buildObject ();
// set Id
assertion.setID ("12345");
IssuerBuilder ib = new IssuerBuilder();
// set Issuer
Issuer i = ib.buildObject();
i.setValue("Hello World");
assertion.setIssuer(i);
// set IssueInstant
DateTime dt = new DateTime();
assertion.setIssueInstant(dt);
// set Conditions
ConditionsBuilder cb = new ConditionsBuilder();
Conditions cd = cb.buildObject();
cd.setNotOnOrAfter(dt);
assertion.setConditions(cd);
// set Subject
// Get the marshaller factory
MarshallerFactory marshallerFactory = Configuration.getMarshallerFactory();
// Get the Subject marshaller
Marshaller marshaller = marshallerFactory.getMarshaller(assertion);
// Marshall the Subject
Element subjectElement = marshaller.marshall(assertion);
System.out.println(subjectElement);
- Problem in creating Assertion Object, harsha . ch, 08/26/2006
- RE: Problem in creating Assertion Object, Scott Cantor, 08/26/2006
- <Possible follow-up(s)>
- Re: RE: Problem in creating Assertion Object, harsha . ch, 08/26/2006
- Re: Problem in creating Assertion Object, Chad la Joie, 08/26/2006
- Re: Re: Problem in creating Assertion Object, harsha . ch, 08/27/2006
- RE: Re: Problem in creating Assertion Object, Scott Cantor, 08/27/2006
Archive powered by MHonArc 2.6.16.