mace-opensaml-users - RE: Error while creating AssertionIDRequestBuilder
Subject: OpenSAML user discussion
List archive
- From: "Sumit Shah" <>
- To: "Chad La Joie" <>, <>
- Subject: RE: Error while creating AssertionIDRequestBuilder
- Date: Thu, 1 Jun 2006 16:53:52 -0400
Hi I got the latest code and tried it. But I get the following error: 16:24:55,187 ERROR [AbstractXMLObjectMarshaller] This marshaller only
operations on {urn:oasis:names:tc:SAML:2.0:protocol}AssertionIDRequest elements
not {urn:oasis:names:tc:SAML:2.0:assertion}AssertionIDRequest org.opensaml.xml.io.MarshallingException: This marshaller only
operations on {urn:oasis:names:tc:SAML:2.0:protocol}AssertionIDRequest elements
not {urn:oasis:names:tc:SAML:2.0:assertion}AssertionIDRequest at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.checkXMLObjectIsTarget(AbstractXMLObjectMarshaller.java:322) at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:124) at
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:104) at com.gce2000.saml.client.SAMLClient.marshall(SAMLClient.java:244) at
com.gce2000.saml.client.SAMLClient.init(SAMLClient.java:137) at
com.gce2000.saml.client.SAMLClient.<init>(SAMLClient.java:98) at
com.gce2000.saml.client.SAMLClient.main(SAMLClient.java:327) Here is the code snippet: //Build a new AssertionIDRequest AssertionIDRequest req = buildRequest(); AssertionIDRequestMarshaller
assertionIDRequestMarshaller = null; MarshallerFactory
marshallerFactory = Configuration.getMarshallerFactory(); assertionIDRequestMarshaller
= (AssertionIDRequestMarshaller)
marshallerFactory.getMarshaller(AssertionIDRequest.DEFAULT_ELEMENT_NAME); try { //I get the error here
Element requestElement1 = assertionIDRequestMarshaller.marshall(req); System.out.println(requestElement1); } catch
(MarshallingException e) { //
TODO Auto-generated catch block
e.printStackTrace(); } Upon debugging, I see that the request gets built with
:oasis:names:tc:SAML:2.0:assertion}AssertionIDRequest and hence its not able to
Here is the code to build the request with dummy values: XMLObjectBuilderFactory builderFactory =
Configuration.getBuilderFactory(); Map builders =
builderFactory.getBuilders(); AssertionIDRequestBuilder builder
= null; builder = (AssertionIDRequestBuilder)
builderFactory.getBuilder(AssertionIDRequest.DEFAULT_ELEMENT_NAME); AssertionIDRequest
assertionIDRequest = builder.buildObject(); //System.out.println(assertionIDRequest.getElementQName()); Issuer issuer = new
IssuerBuilder().buildObject();;
issuer.setNameQualifier("DUMMY");
assertionIDRequest.setDestination("SOME URL");
assertionIDRequest.setID("1212121211");
assertionIDRequest.setVersion(SAMLVersion.VERSION_20); return assertionIDRequest; I would appreciate your help on this. Thanks Sumit > -----Original Message----- > From: Sumit Shah > Sent: Thursday, June 01, 2006 10:30 AM > To: Chad La Joie; > Subject: RE: Error while creating AssertionIDRequestBuilder > > Thanks > > Sumit > > > -----Original Message----- > > From: Chad La Joie [mailto:] > > Sent: Wednesday, May 31, 2006 6:39 PM > > To: > > Subject: Re: Error while creating AssertionIDRequestBuilder > > > > It was a bug in the namespace, I had accidently use the SAML
assertion > > namespace. If you get the latest code it should work. > > > > Sumit Shah wrote: > > > All, > > > > > > > > > > > > I am trying to create AssertionIDRequest using the > > > AssertionIDRequestBuilder. I get a NullPointerException
while trying > to > > > build the object. > > > > > > > > > > > > Here is the code snippet: > > > > > > > > > > > > XMLObjectBuilderFactory builderFactory = > > > Configuration./getBuilderFactory/(); > > > > > > AssertionIDRequestBuilder builder =
(AssertionIDRequestBuilder) > > > >
builderFactory.getBuilder(AssertionIDRequest./DEFAULT_ELEMENT_NAME/); > > > > > > AssertionIDRequest assertionIDRequest=
builder.buildObject(); > > > > > > > > > > > > > > > > > > Upon debugging, I checked that the factory contains > "AssertionIDRequest" > > > as the key. But, > > >
builderFactory.getBuilder(AssertionIDRequest./DEFAULT_ELEMENT_NAME/) > > > returns a NULL value. > > > > > > > > > > > > I would appreciate any pointers on how to go about
creating an > > > AssertionIDRequest. > > > > > > > > > > > > Thanks > > > > > > Sumit > > > > > > > > > > > > > -- > > > >
OIS-Middleware
202.687.0124 |
- RE: Error while creating AssertionIDRequestBuilder, Sumit Shah, 06/01/2006
- <Possible follow-up(s)>
- RE: Error while creating AssertionIDRequestBuilder, Sumit Shah, 06/01/2006
- Re: Error while creating AssertionIDRequestBuilder, Chad La Joie, 06/02/2006
- RE: Error while creating AssertionIDRequestBuilder, Sumit Shah, 06/02/2006
Archive powered by MHonArc 2.6.16.