Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityNew9.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityNew9.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityNew9.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityNew9.java Tue Feb 10 
17:01:45 2009
@@ -26,7 +26,6 @@
 import org.apache.axis.client.AxisClient;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.security.WSPasswordCallback;
@@ -46,7 +45,6 @@
 // import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 /**
  * WS-Security Test Case
@@ -176,7 +174,9 @@
         Message encryptedMsg = SOAPUtil.toAxisMessage(encryptedSignedDoc);
         if (log.isDebugEnabled()) {
             log.debug("Encrypted message, RSA-OAEP keytransport, 3DES:");
-            
XMLUtils.PrettyElementToWriter(encryptedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedSignedDoc);
+            log.debug(outputString);
         }
         String s = encryptedMsg.getSOAPPartAsString();
         ((SOAPPart)message.getSOAPPart()).setCurrentMessage(s, 
SOAPPart.FORM_STRING);
@@ -195,7 +195,6 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
     }
     
     /* (non-Javadoc)

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityNewDK.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewDK.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityNewDK.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityNewDK.java Tue Feb 10 
17:01:45 2009
@@ -23,7 +23,6 @@
 import org.apache.axis.client.AxisClient;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.security.WSConstants;
@@ -45,7 +44,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -151,16 +149,13 @@
         encrKeyBuilder.prependToHeader(secHeader);
         encrKeyBuilder.prependBSTElementToHeader(secHeader);
 
-        
-       Message encryptedMsg = SOAPUtil.toAxisMessage(encryptedDoc);
-       if (log.isDebugEnabled()) {
-           log.debug("Encrypted message: 3DES  + DerivedKeys");
-           XMLUtils.PrettyElementToWriter(encryptedMsg.getSOAPEnvelope()
-                    .getAsDOM(), new PrintWriter(System.out));
-       }
-//       String out = 
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);
-//       System.out.println(out);
-       verify(doc);
+        if (log.isDebugEnabled()) {
+            log.debug("Encrypted message: 3DES  + DerivedKeys");
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);
+            log.debug(outputString);
+        }
+        verify(doc);
     }
 
     /**
@@ -192,14 +187,12 @@
          encrKeyBuilder.prependToHeader(secHeader);
          encrKeyBuilder.prependBSTElementToHeader(secHeader);
          
-        Message encryptedMsg = SOAPUtil.toAxisMessage(encryptedDoc);
-        if (log.isDebugEnabled()) {
-            log.debug("Encrypted message: 3DES  + DerivedKeys");
-            XMLUtils.PrettyElementToWriter(encryptedMsg.getSOAPEnvelope()
-                    .getAsDOM(), new PrintWriter(System.out));
-        }
-//        String out = 
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);
-//        System.out.println(out);
+         if (log.isDebugEnabled()) {
+             log.debug("Encrypted message: 3DES  + DerivedKeys");
+             String outputString = 
+                 
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedDoc);
+             log.debug(outputString);
+         }
         verify(doc);
      }
      
@@ -228,15 +221,12 @@
          encrKeyBuilder.prependToHeader(secHeader);
          encrKeyBuilder.prependBSTElementToHeader(secHeader);
          
-         Message signedMessage = SOAPUtil.toAxisMessage(doc);
          if (log.isDebugEnabled()) {
              log.debug("Encrypted message: 3DES  + DerivedKeys");
-             XMLUtils.PrettyElementToWriter(signedMessage.getSOAPEnvelope()
-                    .getAsDOM(), new PrintWriter(System.out));
+             String outputString = 
+                 
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+             log.debug(outputString);
          }
-//         String out = org.apache.ws.security.util.XMLUtils
-//                .PrettyDocumentToString(signedDoc);
-//        System.out.println(out);
          verify(doc);
      }
      
@@ -272,16 +262,12 @@
         encrKeyBuilder.prependToHeader(secHeader);
         encrKeyBuilder.prependBSTElementToHeader(secHeader);
 
-        Message signedMessage = SOAPUtil.toAxisMessage(signedEncryptedDoc);
-
         if (log.isDebugEnabled()) {
             log.debug("Encrypted message: 3DES  + DerivedKeys");
-            XMLUtils.PrettyElementToWriter(signedMessage.getSOAPEnvelope()
-                    .getAsDOM(), new PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedEncryptedDoc);
+            log.debug(outputString);
         }
-//        String out = org.apache.ws.security.util.XMLUtils
-//                .PrettyDocumentToString(signedEncryptedDoc);
-//        System.out.println(out);
         verify(signedEncryptedDoc);
     }
      
@@ -317,17 +303,13 @@
          encrKeyBuilder.prependToHeader(secHeader);
          encrKeyBuilder.prependBSTElementToHeader(secHeader);
          
-         Message signedMessage = SOAPUtil.toAxisMessage(encryptedSignedDoc);
-         
          if (log.isDebugEnabled()) {
-            log.debug("Encrypted message: 3DES  + DerivedKeys");
-            XMLUtils.PrettyElementToWriter(signedMessage.getSOAPEnvelope()
-                    .getAsDOM(), new PrintWriter(System.out));
-        }
-        
-//         String out = org.apache.ws.security.util.XMLUtils
-//                .PrettyDocumentToString(encryptedSignedDoc);
-//         System.out.println(out);
+             log.debug("Encrypted message: 3DES  + DerivedKeys");
+             String outputString = 
+                 
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(encryptedSignedDoc);
+             log.debug(outputString);
+         }
+
          verify(encryptedSignedDoc);
      }
     
@@ -340,13 +322,13 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
-        String decryptedString = message.getSOAPPartAsString();
-        assertTrue(decryptedString.indexOf("LogTestService2") > 0 ? true : 
false);
+        String outputString = 
+            org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+        assertTrue(outputString.indexOf("LogTestService2") > 0 ? true : false);
     }
 
     public void handle(Callback[] callbacks)
-            throws IOException, UnsupportedCallbackException {
+        throws IOException, UnsupportedCallbackException {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof WSPasswordCallback) {
                 WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSCT.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSCT.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSCT.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSCT.java Tue Feb 10 
17:01:45 2009
@@ -106,15 +106,17 @@
             
             sctBuilder.prependSCTElementToHeader(doc, secHeader);
 
-            String out = org.apache.ws.security.util.XMLUtils
-                    .PrettyDocumentToString(doc);
+            String out = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
 
             assertTrue(
-                    "SecurityContextToken missing",
-                    out
-                            
.indexOf(ConversationConstants.SECURITY_CONTEXT_TOKEN_LN) > 0);
-            assertTrue("wsc:Identifier missing", out
-                    .indexOf(ConversationConstants.IDENTIFIER_LN) > 0);
+                "SecurityContextToken missing",
+                out.indexOf(ConversationConstants.SECURITY_CONTEXT_TOKEN_LN) > 0
+            );
+            assertTrue(
+                "wsc:Identifier missing", 
+                out.indexOf(ConversationConstants.IDENTIFIER_LN) > 0
+            );
 
             // System.out.println(out);
 
@@ -302,9 +304,9 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
-        String decryptedString = message.getSOAPPartAsString();
-        assertTrue(decryptedString.indexOf("LogTestService2") > 0 ? true
+        String outputString = 
+            org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+        assertTrue(outputString.indexOf("LogTestService2") > 0 ? true
                 : false);
     }
 

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSOAP12.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSOAP12.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSOAP12.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityNewSOAP12.java Tue Feb 10 
17:01:45 2009
@@ -25,7 +25,6 @@
 import org.apache.axis.client.AxisClient;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.security.WSSecurityEngine;
@@ -37,7 +36,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 
 /**
@@ -140,7 +138,9 @@
         Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
         if (log.isDebugEnabled()) {
             log.debug("Signed message SOAP 1.2:");
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
         log.info("After Signing....");

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST1.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST1.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST1.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST1.java Tue Feb 10 
17:01:45 2009
@@ -27,7 +27,6 @@
 import org.apache.axis.Message;
 import org.apache.axis.MessageContext;
 import org.apache.axis.client.AxisClient;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
 import org.apache.commons.logging.Log;
@@ -46,7 +45,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 /**
  * WS-Security Test Case
@@ -153,14 +151,16 @@
          * convert the resulting document into a message first. The 
toAxisMessage()
          * method performs the necessary c14n call to properly set up the 
signed
          * document and convert it into a SOAP message. Check that the 
contents can't
-          * be read (cheching if we can find a specific substring). After that 
we extract it
+          * be read (checking if we can find a specific substring). After that 
we extract it
          * as a document again for further processing.
          */
 
         Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
         if (log.isDebugEnabled()) {
             log.debug("Unsigned SAML message (sender vouches):");
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         // String encryptedString = signedMsg.getSOAPPartAsString();
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
@@ -177,13 +177,13 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, null);
-        SOAPUtil.updateSOAPMessage(doc, message);
-        String decryptedString = message.getSOAPPartAsString();
-        assertTrue(decryptedString.indexOf("LogTestService2") > 0 ? true : 
false);
+        String outputString = 
+            org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+        assertTrue(outputString.indexOf("LogTestService2") > 0 ? true : false);
     }
 
     public void handle(Callback[] callbacks)
-            throws IOException, UnsupportedCallbackException {
+        throws IOException, UnsupportedCallbackException {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof WSPasswordCallback) {
                 WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST2.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST2.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST2.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST2.java Tue Feb 10 
17:01:45 2009
@@ -27,7 +27,6 @@
 import org.apache.axis.Message;
 import org.apache.axis.MessageContext;
 import org.apache.axis.client.AxisClient;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
 import org.apache.commons.logging.Log;
@@ -53,7 +52,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 /**
  * WS-Security Test Case
@@ -173,7 +171,9 @@
         Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
         if (log.isDebugEnabled()) {
             log.debug("Signed SAML message (sender vouches):");
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         // String encryptedString = signedMsg.getSOAPPartAsString();
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
@@ -221,7 +221,9 @@
         Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
         if (log.isDebugEnabled()) {
             log.debug("Signed SAML message (sender vouches):");
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         // String encryptedString = signedMsg.getSOAPPartAsString();
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
@@ -298,9 +300,9 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
-        String decryptedString = message.getSOAPPartAsString();
-        assertTrue(decryptedString.indexOf("LogTestService2") > 0 ? true : 
false);
+        String outputString = 
+            org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+        assertTrue(outputString.indexOf("LogTestService2") > 0 ? true : false);
     }
 
     public void handle(Callback[] callbacks)

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST3.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST3.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST3.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityNewST3.java Tue Feb 10 
17:01:45 2009
@@ -28,7 +28,6 @@
 import org.apache.axis.Message;
 import org.apache.axis.MessageContext;
 import org.apache.axis.client.AxisClient;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
 import org.apache.commons.logging.Log;
@@ -50,7 +49,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 /**
  * WS-Security Test Case
@@ -131,7 +129,7 @@
 
     /**
      * Test that encrypt and decrypt a WS-Security envelope.
-     * This test uses the RSA_15 alogrithm to transport (wrap) the symmetric
+     * This test uses the RSA_15 algorithm to transport (wrap) the symmetric
      * key.
      * <p/>
      * 
@@ -169,14 +167,16 @@
          * convert the resulting document into a message first. The 
toAxisMessage()
          * method performs the necessary c14n call to properly set up the 
signed
          * document and convert it into a SOAP message. Check that the 
contents can't
-          * be read (cheching if we can find a specific substring). After that 
we extract it
+         * be read (checking if we can find a specific substring). After that 
we extract it
          * as a document again for further processing.
          */
 
         Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
         if (log.isDebugEnabled()) {
             log.debug("Signed SAML message (key holder):");
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         // String encryptedString = signedMsg.getSOAPPartAsString();
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
@@ -194,9 +194,9 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
-        String decryptedString = message.getSOAPPartAsString();
-        assertTrue(decryptedString.indexOf("LogTestService2") > 0 ? true : 
false);
+        String outputString = 
+            org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+        assertTrue(outputString.indexOf("LogTestService2") > 0 ? true : false);
     }
 
     public void handle(Callback[] callbacks)

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecuritySignatureParts.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecuritySignatureParts.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecuritySignatureParts.java 
(original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecuritySignatureParts.java Tue 
Feb 10 17:01:45 2009
@@ -25,7 +25,6 @@
 import org.apache.axis.client.AxisClient;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.security.SOAPConstants;
@@ -275,10 +274,11 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
         if (log.isDebugEnabled()) {
             log.debug("Verfied and decrypted message:");
-            
XMLUtils.PrettyElementToWriter(message.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+            log.debug(outputString);
         }
     }
 

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityTimestamp.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityTimestamp.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityTimestamp.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityTimestamp.java Tue Feb 10 
17:01:45 2009
@@ -25,7 +25,6 @@
 import org.apache.axis.client.AxisClient;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.security.WSConstants;
@@ -41,7 +40,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
-import java.io.PrintWriter;
 import java.util.Vector;
 
 /**
@@ -128,7 +126,9 @@
 
         Message msg = SOAPUtil.toAxisMessage(createdDoc);
         if (log.isDebugEnabled()) {
-            XMLUtils.PrettyElementToWriter(msg.getSOAPEnvelope().getAsDOM(), 
new PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(createdDoc);
+            log.debug(outputString);
         }
         
         createdDoc = msg.getSOAPEnvelope().getAsDocument();
@@ -166,7 +166,9 @@
 
         Message msg = SOAPUtil.toAxisMessage(createdDoc);
         if (log.isDebugEnabled()) {
-            XMLUtils.PrettyElementToWriter(msg.getSOAPEnvelope().getAsDOM(), 
new PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(createdDoc);
+            log.debug(outputString);
         }
         
         createdDoc = msg.getSOAPEnvelope().getAsDocument();
@@ -204,7 +206,9 @@
 
         Message msg = SOAPUtil.toAxisMessage(createdDoc);
         if (log.isDebugEnabled()) {
-            XMLUtils.PrettyElementToWriter(msg.getSOAPEnvelope().getAsDOM(), 
new PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(createdDoc);
+            log.debug(outputString);
         }
         
         createdDoc = msg.getSOAPEnvelope().getAsDocument();
@@ -236,7 +240,9 @@
 
         Message msg = SOAPUtil.toAxisMessage(createdDoc);
         if (log.isDebugEnabled()) {
-            XMLUtils.PrettyElementToWriter(msg.getSOAPEnvelope().getAsDOM(), 
new PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(createdDoc);
+            log.debug(outputString);
         }
         
         createdDoc = msg.getSOAPEnvelope().getAsDocument();

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityUserProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityUserProcessor.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityUserProcessor.java 
(original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityUserProcessor.java Tue Feb 
10 17:01:45 2009
@@ -23,7 +23,6 @@
 import org.apache.axis.Message;
 import org.apache.axis.MessageContext;
 import org.apache.axis.client.AxisClient;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
 import org.apache.commons.logging.Log;
@@ -41,7 +40,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 
 /**
@@ -149,13 +147,11 @@
 
         if (log.isDebugEnabled()) {
             log.debug("Signed message with IssuerSerial key identifier:");
-            XMLUtils.PrettyElementToWriter(signedDoc.getDocumentElement(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         Message signedMsg = (Message) SOAPUtil.toSOAPMessage(signedDoc);
-        if (log.isDebugEnabled()) {
-            log.debug("Signed message with IssuerSerial key identifier(1):");
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
-        }
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
         log.info("After Signing IS....");
         //
@@ -208,13 +204,11 @@
 
         if (log.isDebugEnabled()) {
             log.debug("Signed message with IssuerSerial key identifier:");
-            XMLUtils.PrettyElementToWriter(signedDoc.getDocumentElement(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         Message signedMsg = (Message) SOAPUtil.toSOAPMessage(signedDoc);
-        if (log.isDebugEnabled()) {
-            log.debug("Signed message with IssuerSerial key identifier(1):");
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
-        }
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
         log.info("After Signing IS....");
         //

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS60.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS60.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS60.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS60.java Tue Feb 10 
17:01:45 2009
@@ -25,7 +25,6 @@
 import org.apache.axis.client.AxisClient;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.security.WSPasswordCallback;
@@ -43,7 +42,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 /**
  * This is a test for WSS-60 - "Problems when SOAP envelope namespace prefix 
is null"
@@ -137,7 +135,9 @@
         
         Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
         if (log.isDebugEnabled()) {
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
         
@@ -153,10 +153,11 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
         if (log.isDebugEnabled()) {
             log.debug("Verfied and decrypted message:");
-            
XMLUtils.PrettyElementToWriter(message.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+            log.debug(outputString);
         }
     }
 

Modified: webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS86.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS86.java?rev=743021&r1=743020&r2=743021&view=diff
==============================================================================
--- webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS86.java (original)
+++ webservices/wss4j/trunk/test/wssec/TestWSSecurityWSS86.java Tue Feb 10 
17:01:45 2009
@@ -25,7 +25,6 @@
 import org.apache.axis.client.AxisClient;
 import org.apache.axis.configuration.NullProvider;
 import org.apache.axis.message.SOAPEnvelope;
-import org.apache.axis.utils.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.security.WSPasswordCallback;
@@ -43,7 +42,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.PrintWriter;
 
 /**
  * This is a test for WSS-86 - "CryptoBase.splitAndTrim does not take into 
account the format of a 
@@ -166,7 +164,9 @@
         
         Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
         if (log.isDebugEnabled()) {
-            
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(signedDoc);
+            log.debug(outputString);
         }
         signedDoc = signedMsg.getSOAPEnvelope().getAsDocument();
         
@@ -182,10 +182,11 @@
      */
     private void verify(Document doc) throws Exception {
         secEngine.processSecurityHeader(doc, null, this, crypto);
-        SOAPUtil.updateSOAPMessage(doc, message);
         if (log.isDebugEnabled()) {
             log.debug("Verfied and decrypted message:");
-            
XMLUtils.PrettyElementToWriter(message.getSOAPEnvelope().getAsDOM(), new 
PrintWriter(System.out));
+            String outputString = 
+                
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);
+            log.debug(outputString);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscr...@ws.apache.org
For additional commands, e-mail: wss4j-dev-h...@ws.apache.org

Reply via email to