Return-Path: X-Original-To: apmail-santuario-dev-archive@www.apache.org Delivered-To: apmail-santuario-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 01B63CE15 for ; Thu, 17 May 2012 09:00:47 +0000 (UTC) Received: (qmail 3412 invoked by uid 500); 17 May 2012 09:00:46 -0000 Delivered-To: apmail-santuario-dev-archive@santuario.apache.org Received: (qmail 3124 invoked by uid 500); 17 May 2012 09:00:45 -0000 Mailing-List: contact dev-help@santuario.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@santuario.apache.org Delivered-To: mailing list dev@santuario.apache.org Received: (qmail 3097 invoked by uid 99); 17 May 2012 09:00:44 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 09:00:44 +0000 Received: from localhost (HELO mail-ob0-f182.google.com) (127.0.0.1) (smtp-auth username coheigea, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 09:00:44 +0000 Received: by obcni5 with SMTP id ni5so4151859obc.27 for ; Thu, 17 May 2012 02:00:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.24.7 with SMTP id q7mr5731380oef.50.1337245243532; Thu, 17 May 2012 02:00:43 -0700 (PDT) Reply-To: coheigea@apache.org Received: by 10.182.209.42 with HTTP; Thu, 17 May 2012 02:00:43 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 May 2012 10:00:43 +0100 Message-ID: Subject: Re: Fail to verified the signature From: Colm O hEigeartaigh To: dev@santuario.apache.org Content-Type: text/plain; charset=ISO-8859-1 Since the 1.5.0 release, the XML Security for Java project will not "search" for the Element that was signed. Instead you need to find the element that was signed and register the Id appropriately. For the example you have posted, you will need to find the SAML Assertion Element, and then register the Id via: assertionElement.setIdAttributeNS(null, "ID", true); See here for more information (section "Major changes to how Elements are resolved"): http://santuario.apache.org/java150releasenotes.html Colm. On Thu, May 17, 2012 at 8:55 AM, David Yu wrote: > Dear Santuario developers, > I failed to verify the digital signature of the attached XML using the java > code from Pro Apache XML. Could someone help me and provide me some > information why it does not work. I googled a lot but cannot find any > solution works for me. > My environment: > Java JDK 1.7.0_02 > XMLSecurity 1.5.2 > > I get the exception: > org.apache.xml.security.signature.MissingResourceFailureException: The > Reference for URI #_c0c8397e-3669-42c6-a63f-0005ac294790 has no > XMLSignatureInput > Original Exception was > org.apache.xml.security.signature.ReferenceNotInitializedException: Cannot > resolve element with ID _c0c8397e-3669-42c6-a63f-0005ac294790 > Original Exception was > org.apache.xml.security.signature.ReferenceNotInitializedException: Cannot > resolve element with ID _c0c8397e-3669-42c6-a63f-0005ac294790 > Original Exception was > org.apache.xml.security.signature.ReferenceNotInitializedException: Cannot > resolve element with ID _c0c8397e-3669-42c6-a63f-0005ac294790 > Original Exception was > org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot > resolve element with ID _c0c8397e-3669-42c6-a63f-0005ac294790 > > Thank you > David > > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com