Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] Developing Entensions

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] Developing Entensions


Chronological Thread 
  • From: Deena Gurajala <>
  • To:
  • Subject: Re: [OpenSAML] Developing Entensions
  • Date: Tue, 3 Nov 2009 14:30:25 -0800
  • 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=d2Dwd/JuFoN3jOppgsAt9cG2chkx1IC3h39B7JUsasvYorq+f6niqglpt5B8qJuFSh WFfimOXQBVVnEU3j1+e6GPxd/lNObQaOwK+W1DQKPsHqTMc5ng7kMbnu71njUnM0cZEm 7bZjomI+7npgtSZsK9uQ8k0aNeWS6i8rtyL/Y=

Thanks for your support and time. I will try to get it work with godd way of implementation.

On Tue, Nov 3, 2009 at 2:25 PM, Brent Putman <> wrote:
Well, the builder has multiple buildObject methods.  The object provider
support for extensions is a little atypical - in looking at it we
re-used the same provider for both the metadata and protocol schema
extensions, because the content model is the same.  The buildObject()
builds the metadata one.  Since you want the protocol schema one, just
use one of the other overloaded buildObject methods, specifying either
the protocol element QName or the triple of namespace, prefix and local
name Strings.

Honestly, we should probably at least have a custom builder for the
protocol Extensions so that people don't have to do that, but that's the
way it is right now.

And btw, you generally don't want to instantiate a builder (or
marshaller or unmarshaller) directly, it's better to obtain it via
Configuration.getBuilderFactory.getBuilder(QName).

--Brent


Deena Gurajala wrote:
>  Extensions extens=new ExtensionsBuilder().buildObject();
>
> Is it the correct way to build an extension. Because the prefix is
> coming as md and name space is pointing to Metadata Descriptor schema
> name space.
>
> On Tue, Nov 3, 2009 at 1:15 PM, Brent Putman <
> <mailto:>> wrote:
>
>
>
>     Deena Gurajala wrote:
>     > I figured out that I have to write a custom schema for my
>     extensions.
>     > They way I did it is.
>     >
>     > -write a custom schema.
>
>     Yes, you probably should have a schema for your custom stuff.
>
>
>     > - Use JAXB to marshal the JAVA to XML DOM.
>     > -Then set it o Extensions using setDOM method.
>     >
>
>     No, not really.  JAXB is not really a complimentary technology to
>     OpenSAML.  They are both Java-XML binding approaches.  Use one or the
>     other, but probably not both.
>
>
>
>     >
>     >
>     >            Extensions extens=new ExtensionsBuilder().buildObject();
>     >
>     >             extens.setDOM(new
>     > DocumentGenerator().generate().getDocumentElement());
>
>     No, definitely do not use the setDOM method on the XMLObjects.
>     That is
>     used by other components withing the library (marshallers and
>     unmarshallers) to cache the DOM representation of the XMLObject, it is
>     not really intended for use via the public API.   You'll get
>     unpredictable results doing that.
>
>
>




Archive powered by MHonArc 2.6.16.

Top of Page