Author: werner
Date: Thu Nov 17 06:19:18 2005
New Revision: 345245

URL: http://svn.apache.org/viewcvs?rev=345245&view=rev
Log:
Provide mechanism to sign elements with plain Id

attributes in addition to wsu:Id.


Modified:
    
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSignEnvelope.java

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSignEnvelope.java
URL: 
http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSignEnvelope.java?rev=345245&r1=345244&r2=345245&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSignEnvelope.java 
(original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSignEnvelope.java 
Thu Nov 17 06:19:18 2005
@@ -341,7 +341,13 @@
              */
             try {
                 if (idToSign != null) {
-                    Element toSignById = WSSecurityUtil.getElementByWsuId(doc, 
"#"+idToSign);
+                       Element toSignById = WSSecurityUtil
+                                                       
.findElementById(doc.getDocumentElement(),
+                                                                       
idToSign, WSConstants.WSU_NS);
+                                       if (toSignById == null) {
+                                               toSignById = 
WSSecurityUtil.findElementById(doc
+                                                               
.getDocumentElement(), idToSign, null);
+                                       }
                     transforms = new Transforms(doc);
                     transforms
                             
.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS);



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

Reply via email to