santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milan Tomic" <mi...@setcce.org>
Subject RE: [java] XMLSignature ctor
Date Fri, 14 Oct 2005 13:38:24 GMT

As much as I could debug XSEC, "Algorith" attribute was never found for my
<SignatureMethod> element, although it is there. Perhaps this is an issue
with namespaces?

I'm attaching XML file I was using for testing purposes.

Best regards,
Milan


-----Original Message-----
From: Milan Tomic [mailto:milan@setcce.org] 
Sent: Friday, October 14, 2005 11:49 AM
To: security-dev@xml.apache.org
Subject: RE: [java] XMLSignature ctor


> Yes, the docSig parameter should be the
> SignatureMethod element and not 
> the Signature element.

Thank you, Sean. The error message a little confused me.

I did as you suggested and now I got this exception in XMLSignature ctor:

org.apache.xml.security.signature.XMLSignatureException: The requested
algorithm  does not exist. Original Message was: null
Original Exception was java.lang.NullPointerException
	at
org.apache.xml.security.algorithms.SignatureAlgorithm.<init>(Unknown Source)
	at org.apache.xml.security.signature.SignedInfo.<init>(Unknown
Source)
	at org.apache.xml.security.signature.XMLSignature.<init>(Unknown
Source)
	at TestXSEC.main(TestXSEC.java:97)
java.lang.NullPointerException
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:141)
	at
org.apache.xml.security.algorithms.SignatureAlgorithm.<init>(Unknown Source)
	at org.apache.xml.security.signature.SignedInfo.<init>(Unknown
Source)
	at org.apache.xml.security.signature.XMLSignature.<init>(Unknown
Source)
	at TestXSEC.main(TestXSEC.java:97)
Exception in thread "main"

I'm using this XMLSignature ctor:

XMLSignature(org.w3c.dom.Document doc,
            java.lang.String BaseURI,
            java.lang.String SignatureMethodURI,
            java.lang.String CanonicalizationMethodURI)

I couldn't find any examples using this ctor. I'm trying to sign already
created XML template with <Signature> element in it. Similar to
templateSign.cpp in C++ examples. I'm using XSEC 1.2.1 and JDK 1.4.2.

Am I doing something wrong? Could someone verify that this ctor works OK?

Best regards,
Milan

Mime
View raw message