Hi there,

I'm using the XML-security package for a Java project.

I have this problem with as you describe it "vanishing attribute namespace prefixes". I tried the workaround (described in Mikolaj Habryn's message of Thu, 16 Sep 2004 19:05:56) but that didn't help me. I did the following:

   * I create message1 (document) and add a element with namespace.
   * I serialize it into message2 (documentToBeSigned) like this:

OutputFormat format = new OutputFormat(document,"UTF-8",false);
ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
XMLSerializer serializer = new XMLSerializer(arrayOutputStream,format);
serializer.setNamespaces(true);
serializer.asDOMSerializer();
serializer.serialize(document.getDocumentElement());
Document documentToBeSigned = documentBuilder.parse(new ByteArrayInputStream(arrayOutputStream.toByteArray()));


   * I sign message2 and yes Mikolaj is right about the namespace being
     added and the signing succeeding, but there are empty namespace
     attributes all over the place (like this: xmlns="").
   * I "cut" the signature from message2
   * I import the message in message1 and all looks fine.

But when I try to verify message1 it fails. I think because I think the appearing xmlns="" 's in the message are taken into account when signing the message (?) and my backup message doesn't have them. (Am I doing something wrong here?).

I have a couple of questions:
Is this problem fixed and is it checked into the CVS repository?
Is the 1.2 release you are working on going to fix this problem?
Is this problem logged as a bug and can I track it?

Thanks anyway,

Joris Wijlens

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Whitehorses B.V.
Dukatenburg 84a, Nieuwegein, +31 (0)30 - 600 4720
Malburgse Sluis 27, Arnhem, +31 (0)26 - 322 6900
Mobiel: +31 (0)6 - 5200 2532


Meer weten over nieuwe en interessante Oracle en Java ontwikkelingen? Wat ze voor u betekenen en wat u er aan heeft? Lees dan onze maandelijkse Whitebooks op www.whitehorses.nl.

begin:vcard
fn:Joris Wijlens
n:Wijlens;Joris
email;internet:[EMAIL PROTECTED]
tel;work:0652413704
tel;fax:-
tel;pager:-
tel;home:-
tel;cell:0652413704
version:2.1
end:vcard

Reply via email to