mace-opensaml-users - Re: [OpenSAML] OpenSAML 2.0 custom data type help
Subject: OpenSAML user discussion
List archive
- From: Brent Putman <>
- To:
- Subject: Re: [OpenSAML] OpenSAML 2.0 custom data type help
- Date: Mon, 09 Feb 2009 18:15:08 -0500
Yes, for going the XSAny route, that looks correct to me.
Neill Miller wrote:
> Hello Brent and Scott,
>
> Thanks so much for your patience and assistance. I think I got my code
> working now and everything appears as it should. I ended up building the
> AttributeValue as an XSAny type and adding the instantiation of my custom
> type as a child (as you both had mentioned).
>
> Reference code is included below -- I believe it's doing what you
> specified. Feel free to verify.
>
> --------------------
> // start with the attribute we're building
> Attribute attribute = attributeBuilder.buildObject();
> ...
>
> // instantiate my custom type and set parameters
> XSMyType myTypeValue = myTypeBuilder.buildObject(
> "http://www.myns.org", "myType", "myns");
> myTypeValue.setParam1("foo");
> myTypeValue.setParam2("bar");
>
> // instantiate the XSAnyBuilder to build my XSAny typed AttributeValue
> XSAnyBuilder xsb = new XSAnyBuilder();
> XSAny myXSAny = xsb.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME);
>
> // add XSMyType built above to this XSAny typed AttributeValue's list of
> children
> myXSAny.getUnknownXMLObjects().add(myTypeValue);
>
> // finally, add the XSAny AttributeValue to the attribute
> attribute.getAttributeValues().add(myXSAny);
> --------------------
>
> Appears to work perfectly!
>
> Thanks again,
> -Neill.
>
> ----- "Brent Putman"
> <>
> wrote:
>
>
>
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, (continued)
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Neill Miller, 02/09/2009
- RE: [OpenSAML] OpenSAML 2.0 custom data type help, Scott Cantor, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Brent Putman, 02/09/2009
- RE: [OpenSAML] OpenSAML 2.0 custom data type help, Scott Cantor, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Brent Putman, 02/09/2009
- RE: [OpenSAML] OpenSAML 2.0 custom data type help, Scott Cantor, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Brent Putman, 02/09/2009
- RE: [OpenSAML] OpenSAML 2.0 custom data type help, Scott Cantor, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Brent Putman, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Brent Putman, 02/09/2009
- RE: [OpenSAML] OpenSAML 2.0 custom data type help, Scott Cantor, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Neill Miller, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Neill Miller, 02/09/2009
- Re: [OpenSAML] OpenSAML 2.0 custom data type help, Brent Putman, 02/09/2009
Archive powered by MHonArc 2.6.16.