cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r533310 - in /incubator/cxf/trunk: rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/ systests/src/test/java/org/apache/cxf/systest/factory_pattern/ systests/src/test/java/org/apache/cxf/systest/interceptor/ systests/src/test/java/...
Date Sat, 28 Apr 2007 07:16:42 GMT
Author: andreasmyth
Date: Sat Apr 28 00:16:40 2007
New Revision: 533310

URL: http://svn.apache.org/viewvc?view=rev&rev=533310
Log:
Reference parameter only decoded when addressing properties present.
Re-enabled MultiplexClientServerTest.
Fixed sporadic failure of InterceptorFaultTest.

Modified:
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.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/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/ControlImpl.java

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?view=diff&rev=533310&r1=533309&r2=533310
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
Sat Apr 28 00:16:40 2007
@@ -339,7 +339,7 @@
                                                        headerElement, 
                                                        unmarshaller));
                             }
-                        } else if (headerElement.hasAttribute(IS_REFERENCE_PARAM_ATTR_NAME))
{
+                        } else if (null != headerElement.getAttribute(IS_REFERENCE_PARAM_ATTR_NAME))
{
                             if (null == referenceParameterHeaders) {
                                 referenceParameterHeaders = new HashSet<Element>();
                             }
@@ -351,7 +351,7 @@
                         }
                     }
                 }
-                if (null != referenceParameterHeaders) {
+                if (null != referenceParameterHeaders && null != maps) {
                     decodeReferenceParameters(referenceParameterHeaders, maps, unmarshaller);
                 }
                 restoreExchange(message, maps);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java?view=diff&rev=533310&r1=533309&r2=533310
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java
Sat Apr 28 00:16:40 2007
@@ -35,13 +35,11 @@
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
-
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 
 
-@Ignore
+
 public class MultiplexClientServerTest extends AbstractBusClientServerTestBase {
     
     public static class Server extends AbstractBusTestServerBase {        

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java?view=diff&rev=533310&r1=533309&r2=533310
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
Sat Apr 28 00:16:40 2007
@@ -149,7 +149,7 @@
         // all interceptors pass
 
         greeter.greetMeOneWay("one");
-        assertEquals("one", greeter.greetMe("two"));
+        assertEquals("TWO", greeter.greetMe("two"));
         try {
             greeter.pingMe();
             fail("Expected PingMeFault not thrown.");
@@ -182,7 +182,7 @@
         // all interceptors pass
 
         greeter.greetMeOneWay("one");
-        assertEquals("one", greeter.greetMe("two"));
+        assertEquals("TWO", greeter.greetMe("two"));
         try {
             greeter.pingMe();
             fail("Expected PingMeFault not thrown.");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java?view=diff&rev=533310&r1=533309&r2=533310
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
Sat Apr 28 00:16:40 2007
@@ -122,7 +122,6 @@
             greeter.sayHi();
             fail("Did not receive expected PolicyException.");
         } catch (WebServiceException wex) {
-            wex.printStackTrace();
             PolicyException ex = (PolicyException)wex.getCause();
             assertEquals("INCOMPATIBLE_HTTPCLIENTPOLICY_ASSERTIONS", ex.getCode());
         }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java?view=diff&rev=533310&r1=533309&r2=533310
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
Sat Apr 28 00:16:40 2007
@@ -27,7 +27,6 @@
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.greeter_control.AbstractGreeterImpl;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
@@ -74,10 +73,6 @@
         
         Endpoint.publish(address, implementor);
         LOG.info("Published greeter endpoint.");
-        
-        if (implementor instanceof AbstractGreeterImpl) {
-            ((AbstractGreeterImpl)implementor).setGreeting(null);
-        }
         
         return true;        
     }

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=533310&r1=533309&r2=533310
==============================================================================
--- 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
Sat Apr 28 00:16:40 2007
@@ -59,6 +59,7 @@
             bus.getOutFaultInterceptors().add(out);
             
             GreeterImpl implementor = new GreeterImpl();
+            implementor.useLastOnewayArg(true);
             implementor.setDelay(5000);
             String address = "http://localhost:9020/SoapContext/GreeterPort";
             Endpoint.publish(address, implementor);

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=533310&r1=533309&r2=533310
==============================================================================
--- 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
Sat Apr 28 00:16:40 2007
@@ -652,7 +652,7 @@
         RMManager manager = greeterBus.getExtension(RMManager.class);
         manager.getRMAssertion().getBaseRetransmissionInterval().setMilliseconds(new BigInteger("2000"));
         
-        assertEquals("ONE", greeter.greetMe("one"));
+        greeter.greetMe("one");
         try {
             greeter.greetMe("two");
             fail("Expected fault.");

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java?view=diff&rev=533310&r1=533309&r2=533310
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
Sat Apr 28 00:16:40 2007
@@ -38,8 +38,9 @@
 
     private static final Logger LOG = Logger.getLogger(AbstractGreeterImpl.class.getName());
     private long delay;
-    private String greeting;
+    private String lastOnewayArg;
     private boolean throwAlways;
+    private boolean useLastOnewayArg;
     private int pingMeCount;
      
     public long getDelay() {
@@ -50,8 +51,12 @@
         delay = d;
     }
 
-    public void setGreeting(String g) {
-        greeting = g;
+    public void resetLastOnewayArg() {
+        lastOnewayArg = null;
+    }
+
+    public void useLastOnewayArg(Boolean use) {
+        useLastOnewayArg = use;
     }
 
     public void setThrowAlways(boolean t) {
@@ -69,7 +74,7 @@
         }
         String result = null;
         synchronized (this) {
-            result = null == greeting ? arg0.toUpperCase() : greeting;
+            result = useLastOnewayArg ? lastOnewayArg : arg0.toUpperCase();
         }
         LOG.fine("returning: " + result);
         return result;
@@ -87,7 +92,7 @@
 
     public void greetMeOneWay(String arg0) {
         synchronized (this) {
-            greeting = arg0;
+            lastOnewayArg = arg0;
         }
         LOG.fine("Executing operation greetMeOneWay with parameter: " + arg0);
     }

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/ControlImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/ControlImpl.java?view=diff&rev=533310&r1=533309&r2=533310
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/ControlImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/ControlImpl.java
Sat Apr 28 00:16:40 2007
@@ -87,7 +87,7 @@
             }
         }
         if (implementor instanceof AbstractGreeterImpl) {
-            ((AbstractGreeterImpl)implementor).setGreeting(null);
+            ((AbstractGreeterImpl)implementor).resetLastOnewayArg();
         }
         
         return null != greeterBus; 



Mime
View raw message