Which way is better to create a saml object?
Yaowen Tu
yaowen.tu at gmail.com
Sat Aug 4 01:43:20 EDT 2012
I see this wiki: https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaCreateFromScratch
I am wondering why the second way is not preferred. Seems that wiki is not explaining why. Or I missed anything?
Thanks,
Yaowen
On Aug 3, 2012, at 7:27 PM, Chad La Joie wrote:
> Please refer to the OpenSAML documentation. It covers this.
>
> On Fri, Aug 3, 2012 at 9:19 PM, Yaowen Tu <yaowen.tu at gmail.com> wrote:
>> Hi,
>>
>> I am looking at some examples, and seeing two different ways of creating
>> SAML object. I want to know which is better?
>>
>> One:
>>
>> XMLObjectBuilderFactory builderFactory =
>> org.opensaml.Configuration.getBuilderFactory();
>> AuthnRequestBuilder arb = (AuthnRequestBuilder) builderFactory.getBuilder(
>> AuthnRequest.DEFAULT_ELEMENT_NAME );
>> AuthnRequest auth = (AuthnRequest) arb.buildObject();
>>
>>
>> Another:
>>
>> AuthnRequest arb = (new AuthnRequestBuilder()).buildObject();
>>
>> One is using factory to get the builder, and the other is just create a new
>> builder. I am not sure about the implementation. So I want to know which is
>> better?
>>
>> Is the first one faster? Do we recommend using the second one?
>>
>>
>> Thanks,
>> Yaowen
>>
>> --
>> To unsubscribe from this list send an email to
>> dev-unsubscribe at shibboleth.net
>
>
>
> --
> Chad La Joie
> www.itumi.biz
> trusted identities, delivered
> --
> To unsubscribe from this list send an email to dev-unsubscribe at shibboleth.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20120803/1e0395ca/attachment.html
More information about the dev
mailing list