Author: ruchithf
Date: Sun Sep 10 07:15:12 2006
New Revision: 441954

URL: http://svn.apache.org/viewvc?view=rev&rev=441954
Log:
Enabled appending the UsernameToken

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

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecUsernameToken.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecUsernameToken.java?view=diff&rev=441954&r1=441953&r2=441954
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecUsernameToken.java
 (original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecUsernameToken.java
 Sun Sep 10 07:15:12 2006
@@ -163,6 +163,21 @@
                                .getSecurityHeader(), ut.getElement(), false);
        }
 
+    /**
+     * Appends the UsernameToken element to the elements already in the
+     * Security header.
+     * 
+     * The method can be called any time after <code>prepare()</code>.
+     * This allows to insert the UsernameToken element at any position in the
+     * Security header.
+     * 
+     * @param secHeader
+     *            The security header that holds the Signature element.
+     */
+    public void appendToHeader(WSSecHeader secHeader) {
+        WSSecurityUtil.appendChildElement(document, secHeader
+                .getSecurityHeader(), ut.getElement());
+    }
        /**
         * Adds a new <code>UsernameToken</code> to a soap envelope.
         * 



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

Reply via email to