<div dir="ltr">Ah I see. Thanks!<div><br></div><div>The complete snippet is now working:</div><div><br></div><div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>InitializationService.initialize();</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">           </span>FilesystemMetadataResolver idpMetaDataProvider = new FilesystemMetadataResolver( new File( "/home/raudenaerde/sso/FederationMetadata.xml" ) );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>idpMetaDataProvider.setRequireValidMetadata( true );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">           </span>idpMetaDataProvider.setId( "myId" );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>BasicParserPool pool = new BasicParserPool();</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>pool.initialize();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>idpMetaDataProvider.setParserPool( pool );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>idpMetaDataProvider.initialize();</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>for ( EntityDescriptor idpEntityDescriptor : idpMetaDataProvider )</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>{</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                     </span>System.out.println( idpEntityDescriptor.getID() );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                     </span>for ( SingleSignOnService sss : idpEntityDescriptor.getIDPSSODescriptor( SAMLConstants.SAML20P_NS ).getSingleSignOnServices() )</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                              </span>if ( sss.getBinding().equals( SAMLConstants.SAML2_REDIRECT_BINDING_URI ) )</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                             </span>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                                      </span>System.out.println( sss.getLocation() );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                               </span>}</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                     </span>}</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>for ( ArtifactResolutionService ars : idpEntityDescriptor.getIDPSSODescriptor( SAMLConstants.SAML20P_NS ).getArtifactResolutionServices() )</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                    </span>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                              </span>if ( ars.getBinding().equals( SAMLConstants.SAML2_SOAP11_BINDING_URI ) )</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                               </span>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                                      </span>System.out.println( ars.getLocation() );</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                               </span>}</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>}</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span>}</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 23, 2017 at 6:27 PM, Brent Putman <span dir="ltr"><<a href="mailto:putmanb@georgetown.edu" target="_blank">putmanb@georgetown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <p><br>
    </p>
    <br>
    <div class="m_8622265807474492184moz-cite-prefix">On 5/23/17 12:17 PM, Rob Audenaerde
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div>Actually, I already tried setting an ID just before
          initialize(). It gave me an exception which was ultimately
          caused by:</div>
      </div>
    </blockquote>
    <br></span>
    Well, that's not what was giving you the exception.  You do
    definitely need to set that ID.  That has just allowed the code to
    proceed past that point, leading you to another issue...<span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div><br>
          <div>Caused by:
net.shibboleth.utilities.java.<wbr>support.component.<wbr>UninitializedComponentExceptio<wbr>n:
            Component has not yet been initialized and cannot be used.</div>
          <div><span class="m_8622265807474492184gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>at
net.shibboleth.utilities.java.<wbr>support.component.<wbr>ComponentSupport.<wbr>ifNotInitializedThrowUninitial<wbr>izedComponentException(<wbr>ComponentSupport.java:111)</div>
          <div><span class="m_8622265807474492184gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>at
net.shibboleth.utilities.java.<wbr>support.xml.BasicParserPool.<wbr>checkInitializedNotDestroyed(<wbr>BasicParserPool.java:643)</div>
          <div><span class="m_8622265807474492184gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>at
net.shibboleth.utilities.java.<wbr>support.xml.BasicParserPool.<wbr>parse(BasicParserPool.java:<wbr>237)</div>
          <div><span class="m_8622265807474492184gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>at
org.opensaml.saml.metadata.<wbr>resolver.impl.<wbr>AbstractMetadataResolver.<wbr>unmarshallMetadata(<wbr>AbstractMetadataResolver.java:<wbr>341)</div>
          <div><span class="m_8622265807474492184gmail-Apple-tab-span" style="white-space:pre-wrap">    </span>...
            7 more</div>
        </div>
        <div><br>
        </div>
      </div>
    </blockquote>
    <br></span>
    As you can see, that's originally being thrown by the
    BasicParserPool.  That also needs to be initialize()-ed before it
    can be used.<br>
    <br>
    Generally, you don't want to new() a new parser pool every time you
    need one.  You create 1 instance (and initialize() it), and reuse
    it.  If you were using dependency injection/IoC, you'd just wire 1
    instance up and inject it where needed.  If you aren't using that
    development style, and don't have any special requirements for the
    parser pool, then you can just use the global instance that exists
    after InitializationService.<wbr>initialize() is called.  It will be
    available from
org.opensaml.core.xml.config.<wbr>XMLObjectProviderRegistrySuppo<wbr>rt.getParserPool().<br>
    <br>
    <br>
    <br>
    <br>
  </div>

<br>--<br>
To unsubscribe from this list send an email to <a href="mailto:dev-unsubscribe@shibboleth.net">dev-unsubscribe@shibboleth.net</a><br></blockquote></div><br></div>