Author: coheigea
Date: Wed Oct 20 16:29:18 2010
New Revision: 1025632

URL: http://svn.apache.org/viewvc?rev=1025632&view=rev
Log:
Fixed some ant test failures with JDK 1.6. Also fixed some longstanding 
problems with the build.xml's using Ant 1.8.

Added:
    webservices/wss4j/trunk/lib/bcprov-jdk15-1.45.jar   (with props)
Removed:
    webservices/wss4j/trunk/lib/bcprov-jdk14-1.45.jar
Modified:
    webservices/wss4j/trunk/build.xml
    webservices/wss4j/trunk/interop/build.xml
    webservices/wss4j/trunk/pom.xml
    webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
    webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java
    webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java
    webservices/wss4j/trunk/src/org/apache/ws/security/util/XMLUtils.java

Modified: webservices/wss4j/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/build.xml?rev=1025632&r1=1025631&r2=1025632&view=diff
==============================================================================
--- webservices/wss4j/trunk/build.xml (original)
+++ webservices/wss4j/trunk/build.xml Wed Oct 20 16:29:18 2010
@@ -71,15 +71,6 @@ Build Instructions:
         <property name="build.junit.xml" value="${build.doc.xml}/junit"/>
         <property name="build.junit.html" value="${build.doc.html}/junit"/>
 
-
-        <condition property="jdk13.present">
-          <equals arg1="${ant.java.version}" arg2="1.3"/>
-        </condition>
-
-        <condition property="jdk14.present">
-          <equals arg1="${ant.java.version}" arg2="1.4"/>
-        </condition>
-
         <condition property="jdk15.present">
           <equals arg1="${ant.java.version}" arg2="1.5"/>
         </condition>
@@ -90,7 +81,6 @@ Build Instructions:
 
         <condition property="merlin.ok">
             <or>
-                <equals arg1="${ant.java.version}" arg2="1.4"/>
                 <equals arg1="${ant.java.version}" arg2="1.5"/>
                 <equals arg1="${ant.java.version}" arg2="1.6"/>
             </or>
@@ -110,8 +100,6 @@ Build Instructions:
         <path id="classpath.libraries" description="3rd party libs">
             <fileset dir="${dir.libs}">
                 <include name="**/*.jar"/>
-                <exclude name="**/bcprov-jdk15-*.jar" unless="jdk15.present"/>
-                <exclude name="**/bcprov-jdk13-*.jar" if="jdk15.present" />
                 <!-- <pathelement path="${java.class.path}"/> -->
             </fileset>
             <fileset dir="${dir.endorsed.libs}">
@@ -276,9 +264,8 @@ org.apache.ws.axis.security.util
         <echo level="debug">
         --- Flags (Note: If the {property name} is displayed,
                    then the component is not present)
-        jdk13.present=${jdk13.present}
-        jdk14.present=${jdk14.present}
         jdk15.present=${jdk15.present}
+        jdk16.present=${jdk16.present}
         bc.present=${bc.present}
         </echo>
 
@@ -352,10 +339,9 @@ org.apache.ws.axis.security.util
 
     <target name="compile.library" depends="prepare-src">
         <!-- Compile the java code from ${dir.src} into ${build.classes} -->
-        <javac srcdir="${dir.src}" destdir="${build.classes}" debug="on" 
source="1.3" target="1.3">
+        <javac srcdir="${dir.src}" destdir="${build.classes}" debug="on" 
source="1.4" target="1.4" includeAntRuntime="false">
             <classpath refid="classpath.library"/>
             <exclude name="**/Merlin.java" unless="merlin.ok"/>
-            <exclude name="**/sandbox/**/*.java" if="jdk13.present" />
         </javac>
         <!-- Copy Property files -->
         <copy todir="${build.classes}">
@@ -370,14 +356,13 @@ org.apache.ws.axis.security.util
         depends="compile.interops"
         if="junit.present">
 
-        <javac srcdir="${dir.test}" destdir="${build.classes}" debug="on" 
source="1.3" target="1.3">
+        <javac srcdir="${dir.test}" destdir="${build.classes}" debug="on" 
source="1.4" target="1.4" includeAntRuntime="false">
             <classpath refid="classpath.test"/>
-<!--            <exclude name="**/secconv/**/*.java"/> -->
         </javac>
 
         <mkdir dir="${build.work}"/>
 
-        <javac srcdir="${build.work}" destdir="${build.classes}" debug="on" 
source="1.3" target="1.3">
+        <javac srcdir="${build.work}" destdir="${build.classes}" debug="on" 
source="1.4" target="1.4" includeAntRuntime="false">
             <classpath refid="classpath.test"/>
         </javac>
 
@@ -396,7 +381,7 @@ org.apache.ws.axis.security.util
         <javac srcdir="${dir.samples}"
             debug="on"
             source="1.4"
-            destdir="${build.classes}" target="1.4">
+            destdir="${build.classes}" target="1.4" includeAntRuntime="false">
             <classpath refid="classpath.library"/>
         </javac>
         <copy todir="${build.classes}">
@@ -423,7 +408,7 @@ org.apache.ws.axis.security.util
             httpStopTarget="stop-functional-test-http-server"/>
     </target>
 
-    <target name="start-functional-test-http-server" if="junit.present">
+    <target name="start-functional-test-http-server" depends="init" 
if="junit.present">
         <echo message="Starting http server."/>
         <java classname="org.apache.axis.transport.http.SimpleAxisServer" 
           fork="yes" dir="${build.dir}">
@@ -432,7 +417,7 @@ org.apache.ws.axis.security.util
         </java>
     </target>
 
-    <target name="stop-functional-test-http-server" if="junit.present">
+    <target name="stop-functional-test-http-server" depends="init" 
if="junit.present">
         <echo message="Stopping http server."/>
         <java classname="org.apache.axis.client.AdminClient" fork="yes">
             <classpath refid="classpath.library"/>
@@ -647,7 +632,7 @@ org.apache.ws.axis.security.util
         <antcall target="undeployWSDD" />
     </target>
     
-    <target name="deployWSDD">
+    <target name="deployWSDD" depends="init">
       <path id="deploy_xml_files">
       <fileset dir="${build.work}">
         <include name="**/deploy.wsdd"/>

Modified: webservices/wss4j/trunk/interop/build.xml
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/interop/build.xml?rev=1025632&r1=1025631&r2=1025632&view=diff
==============================================================================
--- webservices/wss4j/trunk/interop/build.xml (original)
+++ webservices/wss4j/trunk/interop/build.xml Wed Oct 20 16:29:18 2010
@@ -83,9 +83,10 @@
           </fileset>
         </copy>
         <javac srcdir="${dir.work}" 
-                destdir="${dir.classes}"
-                source="1.4"
-               debug="true">
+               destdir="${dir.classes}"
+               source="1.4"
+               debug="true"
+               includeAntRuntime="false">
           <classpath refid="classpath.libraries" />
           <include name="${server}/*.java" />
           <include name="${client}/*.java" />
@@ -99,4 +100,4 @@
         <delete dir="${dir.work}/${client}"/>
         <delete dir="${dir.classes}/${client}"/>
     </target>
-</project>
\ No newline at end of file
+</project>

Added: webservices/wss4j/trunk/lib/bcprov-jdk15-1.45.jar
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/lib/bcprov-jdk15-1.45.jar?rev=1025632&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/wss4j/trunk/lib/bcprov-jdk15-1.45.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: webservices/wss4j/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/pom.xml?rev=1025632&r1=1025631&r2=1025632&view=diff
==============================================================================
--- webservices/wss4j/trunk/pom.xml (original)
+++ webservices/wss4j/trunk/pom.xml Wed Oct 20 16:29:18 2010
@@ -255,8 +255,8 @@
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>2.3.2</version>
                     <configuration>
-                        <source>1.3</source>
-                        <target>1.3</target>
+                        <source>1.4</source>
+                        <target>1.4</target>
                         <testExcludes>
                             <exclude>interop/**/*</exclude>
                         </testExcludes>

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java?rev=1025632&r1=1025631&r2=1025632&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java 
(original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java 
Wed Oct 20 16:29:18 2010
@@ -38,7 +38,7 @@ import org.apache.ws.security.handler.Re
 import org.apache.ws.security.handler.WSHandlerConstants;
 import org.apache.ws.security.handler.WSHandlerResult;
 import org.apache.ws.security.util.WSSecurityUtil;
-import org.apache.ws.security.util.XMLUtils;
+import org.apache.xml.security.utils.XMLUtils;
 import org.w3c.dom.Document;
 
 import javax.security.auth.callback.CallbackHandler;
@@ -115,8 +115,7 @@ public class WSDoAllReceiver extends WSD
                 doc = sm.getSOAPEnvelope().getAsDocument();
                 if (doDebug) {
                     log.debug("Received SOAP request: ");
-                    log.debug(org.apache.axis.utils.XMLUtils
-                            .PrettyDocumentToString(doc));
+                    
log.debug(org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc));
                 }
             } catch (Exception ex) {
                 if (doDebug) {
@@ -210,8 +209,7 @@ public class WSDoAllReceiver extends WSD
             sPart.setCurrentMessage(os.toByteArray(), SOAPPart.FORM_BYTES);
             if (doDebug) {
                 log.debug("Processed received SOAP request");
-                log.debug(org.apache.axis.utils.XMLUtils
-                        .PrettyDocumentToString(doc));
+                
log.debug(org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc));
             }
             if (tlog.isDebugEnabled()) {
                 t3 = System.currentTimeMillis();

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java?rev=1025632&r1=1025631&r2=1025632&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java 
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java 
Wed Oct 20 16:29:18 2010
@@ -31,7 +31,7 @@ import org.apache.ws.security.WSSecurity
 import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.handler.WSHandlerConstants;
 import org.apache.ws.security.util.WSSecurityUtil;
-import org.apache.ws.security.util.XMLUtils;
+import org.apache.xml.security.utils.XMLUtils;
 import org.w3c.dom.Document;
 
 import java.io.ByteArrayOutputStream;

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java?rev=1025632&r1=1025631&r2=1025632&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java 
(original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java 
Wed Oct 20 16:29:18 2010
@@ -25,7 +25,7 @@ import org.apache.ws.security.SOAPConsta
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.WSSecurityException;
 import org.apache.ws.security.util.WSSecurityUtil;
-import org.apache.ws.security.util.XMLUtils;
+import org.apache.xml.security.utils.XMLUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 

Modified: webservices/wss4j/trunk/src/org/apache/ws/security/util/XMLUtils.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/util/XMLUtils.java?rev=1025632&r1=1025631&r2=1025632&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/util/XMLUtils.java 
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/util/XMLUtils.java Wed 
Oct 20 16:29:18 2010
@@ -21,19 +21,11 @@ package org.apache.ws.security.util;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.ws.security.WSConstants;
-import org.jcp.xml.dsig.internal.dom.DOMSubTreeData;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.xml.sax.InputSource;
 
-import javax.xml.crypto.NodeSetData;
-import javax.xml.crypto.OctetStreamData;
-import javax.xml.crypto.dsig.Transform;
-import javax.xml.crypto.dsig.TransformException;
-import javax.xml.crypto.dsig.XMLSignatureFactory;
-import javax.xml.crypto.dsig.spec.TransformParameterSpec;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
@@ -43,11 +35,7 @@ import javax.xml.transform.stream.Stream
 import javax.xml.transform.stream.StreamSource;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.IOException;
 import java.io.OutputStream;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.NoSuchAlgorithmException;
 
 public class XMLUtils {
     
@@ -116,48 +104,4 @@ public class XMLUtils {
         return new InputSource(uri);
     }
     
-    /**
-     * Outputs a DOM tree to an {...@link OutputStream}. <I>If an Exception is
-     * thrown during execution, it's StackTrace is output to System.out, but 
the
-     * Exception is not re-thrown.</I>
-     *
-     * @param contextNode root node of the DOM tree
-     * @param os the {...@link OutputStream}
-     * @param addPreamble
-     */
-    public static void outputDOM(Node contextNode, OutputStream os, boolean 
addPreamble) {
-
-       try {
-          if (addPreamble) {
-             os.write("<?xml version=\"1.0\" 
encoding=\"UTF-8\"?>\n".getBytes());
-          }
-
-          XMLSignatureFactory signatureFactory = 
XMLSignatureFactory.getInstance("DOM");
-          Transform c14nTransform =
-              signatureFactory.newTransform(
-                  WSConstants.C14N_WITH_COMMENTS, (TransformParameterSpec)null
-              );
-          
-          NodeSetData transformData = new DOMSubTreeData(contextNode, false);
-          OctetStreamData transformedData = 
-              (OctetStreamData)c14nTransform.transform(transformData, null);
-          
-          InputStream in = transformedData.getOctetStream();
-          int nextChar;
-          while ((nextChar = in.read()) != -1) {
-              os.write(nextChar);
-          }
-          os.flush();
-          in.close();
-       } catch (IOException e) {
-           e.printStackTrace();
-       } catch (NoSuchAlgorithmException e) {
-           e.printStackTrace();
-       } catch (InvalidAlgorithmParameterException e) {
-           e.printStackTrace();
-       } catch (TransformException e) {
-           e.printStackTrace();
-       }
-    }
-    
 }



---------------------------------------------------------------------
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