mace-opensaml-users - Re: [OpenSAML] Marshaling an Extension
Subject: OpenSAML user discussion
List archive
- From: rangeli nepal <>
- To:
- Subject: Re: [OpenSAML] Marshaling an Extension
- Date: Fri, 20 May 2011 06:28:03 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Hpe0soFtvVfvfDJdirdCiz7VwXrW47EB/fYYGkY1dRhMKYQ7EwgVaWhCO22t9IPclA rtgGNvLCMBL1Y5YZtu0wjGstbfhk6NpnQ6uHFDNMjdYNVctL3ILMe36yBM6YL0tiWEF9 TgrXm/XoXWkk7pRtGYftW52tenG0+h1fD89Sk=
Thank you Brent it works. :)
rn
On Thu, May 19, 2011 at 6:54 PM, Brent Putman
<>
wrote:
>
>
> On 5/19/11 7:52 AM, rangeli nepal wrote:
>> Good Morning Everybody,
>>
>> Extensions extensions =
>> extBuilder.buildObject(SAMLConstants.SAML20_NS, Extensions.LOCAL_NAME,
>> SAMLConstants.SAML20_PREFIX);
>>
>> It builds the object but when marshaling it it gives:
>>
>> java.lang.ClassCastException:
>> org.opensaml.saml2.common.impl.ExtensionsImpl cannot be cast to
>> org.opensaml.xml.schema.XSAny
>>
>
>
> Yeah, your problem above is just a typo, the Extensions element is in
> the protocols namespace, not the assertion namespace, so you are missing
> the "P" in the constant names above, e.g. SAML20P_NS.
>
> It's failing to find a provider with the requested non-existant QName,
> so it's returning to you the default XSAny impl, and naturally you can't
> cast that to an Extensions object.
>
>
> This works correctly, for example.
>
>
> QName name = new QName(SAMLConstants.SAML20P_NS, Extensions.LOCAL_NAME,
> SAMLConstants.SAML20P_PREFIX);
> Extensions ext = (Extensions)
> Configuration.getBuilderFactory().getBuilder(name).buildObject(name);
>
>
- [OpenSAML] Marshaling an Extension, rangeli nepal, 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, Cantor, Scott E., 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, rangeli nepal, 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, Cantor, Scott E., 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, rangeli nepal, 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, Brent Putman, 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, Cantor, Scott E., 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, Brent Putman, 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, rangeli nepal, 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, Brent Putman, 05/19/2011
- Re: [OpenSAML] Marshaling an Extension, rangeli nepal, 05/20/2011
- Re: [OpenSAML] Marshaling an Extension, Cantor, Scott E., 05/19/2011
Archive powered by MHonArc 2.6.16.