You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Andrej Konkow <An...@partner.bmw.de> on 2004/09/15 12:01:56 UTC

Additional note: vanishing attribute namespace prefixes

Hi there,
 
I'm new to this kind of discussion but would like to respond to a
message and point out another problem.
 
the solution you have described is not practicable from my point of
view.
I have the following problem: We have evaluated the XML-Security package
in combination with Apache Axis.
Everything is fine. Signing->Verifying, Encryption->Decryption. 
But: When I make the following  Signing->Encryption  and on the other
side Decryption->Verification  then
the verification will fail, as the namespaces are no more included.
There's no possibility for me to include the namespaces
in the way you described as we just handle the incoming messages.
Currently I have no solution. Do you?
 
regards,
 
Andrej
 
------------------------------------------------------------------
 
From: Mikolaj Habryn <dichro-xml-security <at> rcpt.to>
Subject: Re: vanishing attribute namespace prefixes (resend)
Newsgroups: gmane.text.xml.security.devel
Date: Mon, 13 Sep 2004 20:37:00 +1000
 
On Mon, 2004-09-13 at 18:42, Raul Benito wrote: 
>
rootElement.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","
NS1:schemaLocation","urn:frog
> http://xml.rcpt.to/mikolaj/default");
>
rootElement.setAttributeNS(XMLNS_URI,"xmlns:NS1","http://www.w3.org/2001
/XMLSchema-instance");
> I think your problems will be vanished.
 
You are, of course, absolutely right.
 
For the benefit of any future searching of the list archives, the
sequence to get this right appears to be:
 
a = doc.createElement(localNamespace, prefix + ":" + tag);
a.setAttributeNS(xmlnsNamespace, "xmlns:" + prefix, localNamespace);
a.setAttributeNS(xmlnsNamespace, "xmlns:xsi", xmlschemaNamespace);
a.setAttributeNS(xmlschemaNamespace, "xsi:schemaLocation",
"localNamespace path-to-schema");
 
I hope to one day understand why it takes four lines to achieve a
construct that seems so fundamental.
 
m.
 
PS: ...and I see that my original post has now made it through. My
thanks to the moderators.
 

 

Re: Additional note: vanishing attribute namespace prefixes

Posted by Mikolaj Habryn <di...@rcpt.to>.
Hi Andrej - it seems to me that if you're receiving XML that has had the
namespaces stripped, then it's effectively corrupted and no longer
valid. I don't see how you could be expected to rectify that problem -
surely the solution must reside with the Signing->Verifying step?

m.

PS: Love your motorbikes. Keep 'em coming.

On Wed, 2004-09-15 at 20:01, Andrej Konkow wrote:
> Hi there,
>  
> I'm new to this kind of discussion but would like to respond to a
> message and point out another problem.
>  
> the solution you have described is not practicable from my point of
> view.
> I have the following problem: We have evaluated the XML-Security
> package in combination with Apache Axis.
> Everything is fine. Signing->Verifying, Encryption->Decryption. 
> But: When I make the following  Signing->Encryption  and on the other
> side Decryption->Verification  then
> the verification will fail, as the namespaces are no more included.
> There's no possibility for me to include the namespaces
> in the way you described as we just handle the incoming messages.
> Currently I have no solution. Do you?
>  
> regards,
>  
> Andrej
>  
> ------------------------------------------------------------------
>  
> From: Mikolaj Habryn <dichro-xml-security <at> rcpt.to>
> Subject: Re: vanishing attribute namespace prefixes (resend)
> Newsgroups: gmane.text.xml.security.devel
> Date: Mon, 13 Sep 2004 20:37:00 +1000
>  
> On Mon, 2004-09-13 at 18:42, Raul Benito wrote: 
> >
> rootElement.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","NS1:schemaLocation","urn:frog
> > http://xml.rcpt.to/mikolaj/default");
> >
> rootElement.setAttributeNS(XMLNS_URI,"xmlns:NS1","http://www.w3.org/2001/XMLSchema-instance");
> > I think your problems will be vanished.
>  
> You are, of course, absolutely right.
>  
> For the benefit of any future searching of the list archives, the
> sequence to get this right appears to be:
>  
> a = doc.createElement(localNamespace, prefix + ":" + tag);
> a.setAttributeNS(xmlnsNamespace, "xmlns:" + prefix, localNamespace);
> a.setAttributeNS(xmlnsNamespace, "xmlns:xsi", xmlschemaNamespace);
> a.setAttributeNS(xmlschemaNamespace, "xsi:schemaLocation",
> "localNamespace path-to-schema");
>  
> I hope to one day understand why it takes four lines to achieve a
> construct that seems so fundamental.
>  
> m.
>  
> PS: ...and I see that my original post has now made it through. My
> thanks to the moderators.
>  
>  


Re: Additional note: vanishing attribute namespace prefixes

Posted by Sean Mullan <Se...@Sun.COM>.
Have you included a decryption Transform?: http://www.w3.org/TR/xmlenc-decrypt

--Sean

Andrej Konkow wrote:
> Hi there,
>  
> I'm new to this kind of discussion but would like to respond to a 
> message and point out another problem.
>  
> the solution you have described is not practicable from my point of view.
> I have the following problem: We have evaluated the XML-Security package 
> in combination with Apache Axis.
> Everything is fine. Signing->Verifying, Encryption->Decryption.
> But: When I make the following  Signing->Encryption  and on the other 
> side Decryption->Verification  then
> the verification will fail, as the namespaces are no more included. 
> There's no possibility for me to include the namespaces
> in the way you described as we just handle the incoming messages. 
> Currently I have no solution. Do you?
>  
> regards,
>  
> Andrej
>  
> ------------------------------------------------------------------
>  
> From: Mikolaj Habryn <dichro-xml-security <at> rcpt.to>
> Subject: Re: vanishing attribute namespace prefixes (resend)
> Newsgroups: gmane.text.xml.security.devel
> Date: Mon, 13 Sep 2004 20:37:00 +1000
>  
> On Mon, 2004-09-13 at 18:42, Raul Benito wrote:
>> 
> rootElement.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","NS1:schemaLocation","urn:frog
>>  http://xml.rcpt.to/mikolaj/default");
>> 
> rootElement.setAttributeNS(XMLNS_URI,"xmlns:NS1","http://www.w3.org/2001/XMLSchema-instance");
>>  I think your problems will be vanished.
>  
> You are, of course, absolutely right.
>  
> For the benefit of any future searching of the list archives, the
> sequence to get this right appears to be:
>  
> a = doc.createElement(localNamespace, prefix + ":" + tag);
> a.setAttributeNS(xmlnsNamespace, "xmlns:" + prefix, localNamespace);
> a.setAttributeNS(xmlnsNamespace, "xmlns:xsi", xmlschemaNamespace);
> a.setAttributeNS(xmlschemaNamespace, "xsi:schemaLocation",
> "localNamespace path-to-schema");
>  
> I hope to one day understand why it takes four lines to achieve a
> construct that seems so fundamental.
>  
> m.
>  
> PS: ...and I see that my original post has now made it through. My
> thanks to the moderators.
>  
> 
>