<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 5/9/17 5:18 AM, Massimiliano Masi
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:B5C7DCBB-0E50-4FC9-A6CA-FE1B5AD61BCF@mascanc.net">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class="">The SAMLSignatureProfileValidator fails because the
        ID is not registered. <br>
      </div>
    </blockquote>
    <br>
    As an un-related comment: If you are doing the signing, why are you
    then calling that signature profile validator?   It's really a bit
    unnecessary.  You usually only call that when you are *receiving* a
    signature to process, not when you are signing.  If you are doing
    just for development/debugging purposes to validate, and don't plan
    to do that in production code, that's fine.  But doing "for real"
    isn't really necessary.<br>
    <br>
    <blockquote type="cite"
      cite="mid:B5C7DCBB-0E50-4FC9-A6CA-FE1B5AD61BCF@mascanc.net">
      <div class="">
        <p style="margin: 0px; font-size: 11px; line-height: normal;
          font-family: Monaco; min-height: 15px;" class="">        <br
            class="webkit-block-placeholder">
        </p>
        <p style="margin: 0px; font-size: 11px; line-height: normal;
          font-family: Monaco; min-height: 15px;" class="">     <br
            class="webkit-block-placeholder">
        </p>
      </div>
      <div class="">The first idEleme is null, the second is not null.
        In order to make it working, I’ve to manually register the ID
        element in the toElement method (which is easy as it can be, see
        inline). <br>
      </div>
    </blockquote>
    <br>
    I suspect you are probably encountering this unfixed bug:<br>
    <br>
    <a class="moz-txt-link-freetext" href="https://issues.shibboleth.net/jira/browse/OSJ-154">https://issues.shibboleth.net/jira/browse/OSJ-154</a><br>
    <br>
    Summary: Unmarshalling sets the ID-ness of attributes properly, as
    does marshalling an object created from scratch (no cached DOM). 
    But if the object has a cached DOM Element, then the ID-ness is lost
    (really, it's not re-applied) when the Element is adopted into a new
    Document.<br>
    <br>
    So until this bug is fixed, probably in 3.4.0, you either have to 1)
    set the ID-ness manually after you (re)marshall an XMLObject with an
    already-cached DOM 2) Simply unmarshall a new XMLObject tree around
    the marshalled DOM.<br>
    <br>
    <blockquote type="cite"
      cite="mid:B5C7DCBB-0E50-4FC9-A6CA-FE1B5AD61BCF@mascanc.net">
      <div class=""><br class="">
      </div>
      <div class="">Worthless to say that this code was working
        perfectly in OpenSAML 2.6.1. Any ideas?</div>
    </blockquote>
    <br>
    Well, I'm not sure about the working in 2.6.1 part, the above issue
    was present in v2 and never fixed there, as OSJ-154 and the linked
    email thread indicates.  But maybe you are doing something slightly
    different with the v3 code that is triggering it.<br>
    <br>
    <br>
  </body>
</html>