Author: coheigea
Date: Thu Apr 30 11:03:59 2009
New Revision: 770161

URL: http://svn.apache.org/viewvc?rev=770161&view=rev
Log:
[WSS-182] - A fix for "Encryption with symmetric key with encryptSymmKey set to 
false generates invalid xml without xenc defined"

Modified:
    
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandlerConstants.java
    webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncrypt.java

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandlerConstants.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandlerConstants.java?rev=770161&r1=770160&r2=770161&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandlerConstants.java
 (original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandlerConstants.java
 Thu Apr 30 11:03:59 2009
@@ -91,11 +91,11 @@
     public static final String TIMESTAMP = "Timestamp";
 
     /**
-     * Supress the serialization of the SOAP message.
+     * Suppress the serialization of the SOAP message.
      * <p/>
      * Usually the handler serializes the processed SOAP message into a string
      * and sets it into the Axis message context as new current message. To
-     * supress this action, define this action. In this case the handler
+     * suppress this action, define this action. In this case the handler
      * stores the processed SOAP message as <code>Document</code> in the
      * Axis message context with the property name <code>SND_SECURITY</code>.
      * <p/>

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncrypt.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncrypt.java?rev=770161&r1=770160&r2=770161&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncrypt.java 
(original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncrypt.java 
Thu Apr 30 11:03:59 2009
@@ -374,6 +374,15 @@
                     WSConstants.ENC_NS,
                     WSConstants.ENC_PREFIX + ":ReferenceList"
                 );
+            //
+            // If we're not placing the ReferenceList in an EncryptedKey 
structure,
+            // then add the ENC namespace
+            //
+            if (!encryptSymmKey) {
+                WSSecurityUtil.setNamespace(
+                    referenceList, WSConstants.ENC_NS, WSConstants.ENC_PREFIX
+                );
+            }
         }
         createDataRefList(document, referenceList, encDataRefs);
         return referenceList;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to