cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r553810 - in /incubator/cxf/trunk: rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/ systests/src/test/java/org/apache/cxf/systest/ws/addressing/ systests/src/test/java/org/apache/cxf/systes...
Date Fri, 06 Jul 2007 09:25:37 GMT
Author: andreasmyth
Date: Fri Jul  6 02:25:33 2007
New Revision: 553810

URL: http://svn.apache.org/viewvc?view=rev&rev=553810
Log:
Fixed addressing 2004/08 URIs for anonymous and no responses.
[JIRA CXF-769] Refactored the recently introduced keep-alive workaround for system tests on
HP-UX and applied it to Windows XP also.

Modified:
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/ConnectionHelper.java

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
Fri Jul  6 02:25:33 2007
@@ -317,9 +317,9 @@
         public static final String WSA_NAMESPACE_NAME = 
             "http://schemas.xmlsoap.org/ws/2004/08/addressing";
         public static final String WSA_ANONYMOUS_ADDRESS = 
-            WSA_NAMESPACE_NAME + "/anonymous";
+            WSA_NAMESPACE_NAME + "/role/anonymous";
         public static final String WSA_NONE_ADDRESS =
-            WSA_NAMESPACE_NAME + "/none";
+            WSA_NAMESPACE_NAME + "/role/none";
         public static final ObjectFactory WSA_OBJECT_FACTORY = 
             new ObjectFactory();
         public static final String WS_ADDRESSING_PACKAGE =

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java Fri Jul
 6 02:25:33 2007
@@ -74,10 +74,10 @@
         new QName(WSRM_NAMESPACE_NAME, WSRM_ACK_REQUESTED_NAME);
     
     private static final String WSA_ANONYMOUS_ADDRESS = 
-        WSA_NAMESPACE_NAME + "/anonymous";
+        WSA_NAMESPACE_NAME + "/role/anonymous";
     
     private static final String WSA_NONE_ADDRESS =
-        WSA_NAMESPACE_NAME + "/none";
+        WSA_NAMESPACE_NAME + "/role/none";
     
     private static final String RMASSERTION_NAME = "RMAssertion";
     

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
Fri Jul  6 02:25:33 2007
@@ -37,7 +37,8 @@
     private static final String CONFIG;
     static {
         CONFIG = "org/apache/cxf/systest/ws/addressing/cxf" 
-            + ("HP-UX".equals(System.getProperty("os.name")) ? "-hpux" : "")
+            + (("HP-UX".equals(System.getProperty("os.name"))
+                || "Windows XP".equals(System.getProperty("os.name"))) ? "-hpux" : "")
             + ".xml";
     }
     

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java
Fri Jul  6 02:25:33 2007
@@ -94,9 +94,7 @@
         final Greeter greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         Client client = ClientProxy.getClient(greeter);
         List<ServiceInfo> sis = client.getEndpoint().getService().getServiceInfos();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java
Fri Jul  6 02:25:33 2007
@@ -105,9 +105,7 @@
         final Greeter greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         // oneway
 
@@ -156,9 +154,7 @@
         final Greeter greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         // oneway
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java
Fri Jul  6 02:25:33 2007
@@ -98,10 +98,8 @@
         
         BasicGreeterService gs = new BasicGreeterService();
         final Greeter greeter = gs.getGreeterPort();
-        LOG.fine("Created greeter client.");
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        LOG.fine("Created greeter client.");     
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         // oneway
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
Fri Jul  6 02:25:33 2007
@@ -108,10 +108,7 @@
         final Greeter greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
         // oneway
 
         greeter.greetMeOneWay("CXF");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
Fri Jul  6 02:25:33 2007
@@ -108,9 +108,7 @@
         final Greeter greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         // oneway
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
Fri Jul  6 02:25:33 2007
@@ -89,9 +89,7 @@
 
         DocLitBare greeter = service.getSoapPort();
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
        
         BareDocumentResponse bareres = greeter.testDocLitBare("MySimpleDocument");
         assertNotNull("no response for operation testDocLitBare", bareres);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
Fri Jul  6 02:25:33 2007
@@ -102,9 +102,7 @@
         final Greeter greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
        
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         class TwowayThread extends Thread {
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
Fri Jul  6 02:25:33 2007
@@ -167,9 +167,7 @@
         greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         greeter.greetMeOneWay("once");
 
@@ -1314,9 +1312,7 @@
         greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
 
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         if (!useDecoupledEndpoint) {
             return;

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
Fri Jul  6 02:25:33 2007
@@ -110,9 +110,7 @@
         
         LOG.fine("Created greeter client.");
  
-        if ("HP-UX".equals(System.getProperty("os.name"))) {
-            ConnectionHelper.setKeepAliveConnection(greeter, true);
-        }
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
 
         Client c = ClientProxy.getClient(greeter);
         HTTPConduit hc = (HTTPConduit)(c.getConduit());

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/ConnectionHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/ConnectionHelper.java?view=diff&rev=553810&r1=553809&r2=553810
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/ConnectionHelper.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/ConnectionHelper.java
Fri Jul  6 02:25:33 2007
@@ -29,17 +29,24 @@
  * 
  */
 public final class ConnectionHelper {
-    
+
     private ConnectionHelper() {
     }
     
     public static void setKeepAliveConnection(Object proxy, boolean keepAlive) {
-        Client client = ClientProxy.getClient(proxy);
-        HTTPConduit hc = (HTTPConduit)client.getConduit();
-        HTTPClientPolicy cp = hc.getClient();
-        cp.setConnection(keepAlive ? ConnectionType.KEEP_ALIVE : ConnectionType.CLOSE);
+        setKeepAliveConnection(proxy, keepAlive, true);
     }
-    
+
+    public static void setKeepAliveConnection(Object proxy, boolean keepAlive, boolean force)
{
+        if (force || "HP-UX".equals(System.getProperty("os.name"))
+            || "Windows XP".equals(System.getProperty("os.name"))) {
+            Client client = ClientProxy.getClient(proxy);
+            HTTPConduit hc = (HTTPConduit)client.getConduit();
+            HTTPClientPolicy cp = hc.getClient();
+            cp.setConnection(keepAlive ? ConnectionType.KEEP_ALIVE : ConnectionType.CLOSE);
+        }
+    }
+
     public static boolean isKeepAliveConnection(Object proxy) {
         Client client = ClientProxy.getClient(proxy);
         HTTPConduit hc = (HTTPConduit)client.getConduit();



Mime
View raw message