Hi,
 
I am building a web service client using wss4j 1.5 calling a .NET service (WSE 
2.0).  The code generates a signature for the Body and several Header 
addressing elements.  The signed document looks OK except that all elements 
within the Signature element have redundant declarations of the ds: namespace.  
And, the request is being rejected by the service.  Unfortunately, I've gotten 
no info from the service provider on what's failing.. I'm working on that.  In 
the meantime, they've sent me an example of a working request, also generated 
by Axis/wss4j.
 
The beginning of the signature in my failing request is -
   <ds:Signature Id="Signature-1694736358" 
xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
    <ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
     <ds:CanonicalizationMethod 
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; 
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
     <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"; 
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
 [... rest of signature deleted]
 
The beginning of the signature in their example is - 
 
   <Signature xmlns="http://www.w3.org/2000/09/xmldsig#";>
    <SignedInfo>
     <ds:CanonicalizationMethod
      Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#";
      xmlns:ds="http://www.w3.org/2000/09/xmldsig#"; />
     <SignatureMethod
      Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"; />

 [... rest of signature deleted.  CanonicalizationMethod is the only element 
that explicity used the ds: prefix.  The rest have no prefix, and are included 
in the default namespace scope]
 
BTW, my client is implemented in the WebSphere Message Broker, not Axis, so 
wss4j plus the org.apache.axis.utils.XMLUtils class is the only Axis code I'm 
using.  The rest of the SOAP construction is being done in the broker.
 
Question:  Is there a way to get wss4j to suppress the redundant namespace 
declarations and use a default namespace declaration for the ds: stuff?
 
Everything I've read says that the two signatures are canonically the same (per 
c14n), but it seems I'm going to have to make mine use the default namespace 
pattern to be acceptable to .NET.
 
Cheers, Jim


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to