<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 8/14/19 4:29 AM, DD K wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAD3X5rbHDJ8MYPPTbtvaJudx5pVZ92Dq3GK9cW00B-MBjYufjw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi All,<br>
          <br>
        </div>
        <div>What I'm currently trying is to migrate from OpenSAML2.x to
          OpenSAML3.x. Currently on OpenSAML2.x the code is as below:</div>
        <br>
      </div>
    </blockquote>
    <p>Well that wasn't correct in the first place.  At least not if
      you're just trying to turn some XML you already have into an
      XMLObject tree. If you have the XML for an existing
      EntityDescriptor or EntitiesDescriptor element and just want to
      parse that into OpenSAML representation, then you just parse and
      unmarshall.  Exactly like what you were doing in the earlier
      thread you posted for (I think) AuthnRequest.  Given that you were
      using the DOMMetadataProvider, you were doing sort of doing that,
      but in a very roundabout and unnecessary fashion.</p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAD3X5rbHDJ8MYPPTbtvaJudx5pVZ92Dq3GK9cW00B-MBjYufjw@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>But I've struggled to find a resource on how to generate a
          EntityDescriptor to return from the method cause now there is
          no method such as <i>generateMetadata()</i> in <i>DOMMetadataResolver</i>,
          keeping this apart </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>Right, the entire design and API of metadata providers changed in
      3.x.  In 3.x it's entirely EntityDescirptor-centric (no more
      EntitiesDescriptors are surfaced) and the API is about searching
      for and returning 1 or more EntityDescriptors.<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAD3X5rbHDJ8MYPPTbtvaJudx5pVZ92Dq3GK9cW00B-MBjYufjw@mail.gmail.com">
      <div dir="ltr">
        <div>there is a method called <i>resolveSingle()</i> but it
          needs a <i>CriteriaSet(which i do not know what to include)</i>.<br>
        </div>
      </div>
      <br>
    </blockquote>
    <p>Right, in the new model you would supply criteria for the
      EntityDescriptor(s) you want.  In the common SSO use case, you
      usually want just 1, based usually on entityID criteria.</p>
    <p>If you want to see how that works, take a look at the relevant
      unit tests, there's plenty of examples there.<br>
    </p>
    <p><br>
    </p>
  </body>
</html>