cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r777196 - in /cxf/branches/2.1.x-fixes: ./ api/src/main/java/org/apache/cxf/endpoint/ rt/core/src/main/java/org/apache/cxf/endpoint/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/transports/http/src/main/java/org/apache/cxf/trans...
Date Thu, 21 May 2009 17:36:39 GMT
Author: dkulp
Date: Thu May 21 17:36:31 2009
New Revision: 777196

URL: http://svn.apache.org/viewvc?rev=777196&view=rev
Log:
Merged revisions 776429 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r776429 | dkulp | 2009-05-19 15:39:10 -0400 (Tue, 19 May 2009) | 4 lines
  
  Fix problems with async calls hanging if there is a read/connection
  timeout.
  Also allow passing a HTTPClientPolicy object in via request context to
  set timeouts and such
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
    cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/http_client_greeter.wsdl

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 21 17:36:31 2009
@@ -1 +1 @@
-/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218
+/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java
(original)
+++ cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/endpoint/ClientCallback.java
Thu May 21 17:36:31 2009
@@ -141,6 +141,9 @@
         if (cancelled) {
             throw new InterruptedException("Operation Cancelled");
         }
+        if (!done) {
+            throw new TimeoutException("Timeout Exceeded");
+        }
         if (exception != null) {
             throw new ExecutionException(exception);
         }

Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
Thu May 21 17:36:31 2009
@@ -637,6 +637,8 @@
                 chain.doInterceptStartingAfter(message, startingAfterInterceptorID);
             } else if (startingInterceptorID != null) {
                 chain.doInterceptStartingAt(message, startingInterceptorID);
+            } else if (message.getContent(Exception.class) != null) {
+                chain.getFaultObserver().onMessage(message);
             } else {
                 chain.doIntercept(message);
             }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
Thu May 21 17:36:31 2009
@@ -55,6 +55,7 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.frontend.MethodDispatcher;
 import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.service.model.BindingOperationInfo;
@@ -141,9 +142,12 @@
                 if (soapFault == null) {
                     throw new WebServiceException(ex);
                 }
-                
                 SOAPFaultException  exception = new SOAPFaultException(soapFault);
-                exception.initCause(ex);
+                if (ex instanceof Fault && ex.getCause() != null) {
+                    exception.initCause(ex.getCause());
+                } else {
+                    exception.initCause(ex);
+                }
                 throw exception;                
             } else {
                 throw new WebServiceException(ex);

Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Thu May 21 17:36:31 2009
@@ -492,18 +492,19 @@
         // The need to cache the request is off by default
         boolean needToCacheRequest = false;
         
+        HTTPClientPolicy csPolicy = getClient(message);
         HttpURLConnection connection = getConnectionFactory(currentURL)
-            .createConnection(getProxy(clientSidePolicy), currentURL);
+            .createConnection(getProxy(csPolicy), currentURL);
         connection.setDoOutput(true);  
         
         //TODO using Message context to decided HTTP send properties 
              
-        long timeout = clientSidePolicy.getConnectionTimeout();
+        long timeout = csPolicy.getConnectionTimeout();
         if (timeout > Integer.MAX_VALUE) {
             timeout = Integer.MAX_VALUE;
         }
         connection.setConnectTimeout((int)timeout);
-        timeout = clientSidePolicy.getReceiveTimeout();
+        timeout = csPolicy.getReceiveTimeout();
         if (timeout > Integer.MAX_VALUE) {
             timeout = Integer.MAX_VALUE;
         }
@@ -540,7 +541,7 @@
             }
             message.put("AUTH_VALUE", auth);
         }
-        if (getClient().isAutoRedirect()) {
+        if (csPolicy.isAutoRedirect()) {
             needToCacheRequest = true;
             LOG.log(Level.FINE, "AutoRedirect is turned on.");
         }
@@ -548,12 +549,12 @@
         // if chunking is enabled
         // TODO : ensure chunking can be enabled for non-empty PUTs - if requested
         if (connection.getRequestMethod().equals("POST")
-            && getClient().isAllowChunking()) {
+            && csPolicy.isAllowChunking()) {
             //TODO: The chunking mode be configured or at least some
             // documented client constant.
             //use -1 and allow the URL connection to pick a default value
             isChunking = true;
-            chunkThreshold = getClient().getChunkingThreshold();
+            chunkThreshold = csPolicy.getChunkingThreshold();
             if (chunkThreshold <= 0) {
                 chunkThreshold = 0;
                 connection.setChunkedStreamingMode(-1);                    
@@ -1449,7 +1450,7 @@
     ) throws IOException {
         
         // If we are not redirecting by policy, then we don't.
-        if (!getClient().isAutoRedirect()) {
+        if (!getClient(message).isAutoRedirect()) {
             return connection;
         }
 
@@ -1635,11 +1636,12 @@
         // Disconnect the old, and in with the new.
         connection.disconnect();
         
-        connection = getConnectionFactory(newURL).createConnection(getProxy(clientSidePolicy),
newURL);
+        HTTPClientPolicy cp = getClient(message);
+        connection = getConnectionFactory(newURL).createConnection(getProxy(cp), newURL);
         connection.setDoOutput(true);        
-        // TODO: using Message context to deceided HTTP send properties        
-        connection.setConnectTimeout((int)getClient().getConnectionTimeout());
-        connection.setReadTimeout((int)getClient().getReceiveTimeout());
+        // TODO: using Message context to deceided HTTP send properties
+        connection.setConnectTimeout((int)cp.getConnectionTimeout());
+        connection.setReadTimeout((int)cp.getReceiveTimeout());
         connection.setUseCaches(false);
         connection.setInstanceFollowRedirects(false);
 
@@ -1961,7 +1963,7 @@
 
                 HttpURLConnection oldcon = connection;
                 
-                HTTPClientPolicy policy = getClient();
+                HTTPClientPolicy policy = getClient(outMessage);
                 
                 // Default MaxRetransmits is -1 which means unlimited.
                 int maxRetransmits = (policy == null)
@@ -2013,8 +2015,11 @@
                     public void run() {
                         try {
                             handleResponseInternal();
-                        } catch (IOException e) {
-                            LOG.log(Level.WARNING, e.getMessage(), e);
+                        } catch (Exception e) {
+                            Message inMessage = new MessageImpl();
+                            inMessage.setExchange(outMessage.getExchange());
+                            inMessage.setContent(Exception.class, e);
+                            incomingObserver.onMessage(inMessage);
                         }
                     }
                 };

Modified: cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/PolicyUtils.java
Thu May 21 17:36:31 2009
@@ -73,6 +73,10 @@
      * @throws PolicyException if no compatible HTTPClientPolicy can be determined
      */
     public static HTTPClientPolicy getClient(Message message, HTTPClientPolicy confPolicy)
{
+        HTTPClientPolicy pol = message.get(HTTPClientPolicy.class);
+        if (pol != null) {
+            return intersect(pol, confPolicy);
+        }
         AssertionInfoMap amap =  message.get(AssertionInfoMap.class);
         if (null == amap) {
             return confPolicy;
@@ -200,7 +204,11 @@
      * @param client the client policy
      */
     public static void assertClientPolicy(Message message, HTTPClientPolicy client) {
-       
+        HTTPClientPolicy pol = message.get(HTTPClientPolicy.class);
+        if (pol != null) {
+            client = intersect(pol, client);
+        }
+
         AssertionInfoMap aim = message.get(AssertionInfoMap.class);
         if (null == aim) {
             return;

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
Thu May 21 17:36:31 2009
@@ -20,8 +20,11 @@
 package org.apache.cxf.systest.dispatch;
 
 import java.io.InputStream;
+import java.net.SocketTimeoutException;
 import java.net.URL;
 import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.namespace.QName;
@@ -47,9 +50,12 @@
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+import org.apache.hello_world_soap_http.BadRecordLitFault;
 import org.apache.hello_world_soap_http.GreeterImpl;
 import org.apache.hello_world_soap_http.SOAPService;
 import org.apache.hello_world_soap_http.types.GreetMe;
+import org.apache.hello_world_soap_http.types.GreetMeLater;
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -309,6 +315,32 @@
         }
         String responseValue3 = ((GreetMeResponse)tjbh.getResponse()).getResponseType();
         assertTrue("Expected string, " + expected, expected.equals(responseValue3));
+        
+        GreetMeLater later = new GreetMeLater();
+        later.setRequestType(1000);
+        
+        HTTPClientPolicy pol = new HTTPClientPolicy();
+        pol.setReceiveTimeout(100);
+        disp.getRequestContext().put(HTTPClientPolicy.class.getName(), pol);
+        Response<Object> o = disp.invokeAsync(later);
+        try {
+            o.get(10, TimeUnit.SECONDS);
+            fail("Should have gotten a SocketTimeoutException");
+        } catch (ExecutionException ex) {
+            assertTrue(ex.getCause() instanceof SocketTimeoutException);
+        }
+
+        later.setRequestType(20000);
+        pol.setReceiveTimeout(20000);
+        disp.getRequestContext().put(HTTPClientPolicy.class.getName(), pol);
+        o = disp.invokeAsync(later);
+        try {
+            o.get(100, TimeUnit.MILLISECONDS);
+            fail("Should have gotten a SocketTimeoutException");
+        } catch (TimeoutException ex) {
+            //ignore - expected
+        }
+
     }
 
     @Test

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/interceptor/InterceptorFaultTest.java
Thu May 21 17:36:31 2009
@@ -44,7 +44,6 @@
 import org.apache.cxf.greeter_control.GreeterService;
 import org.apache.cxf.greeter_control.PingMeFault;
 import org.apache.cxf.greeter_control.types.FaultLocation;
-import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.phase.PhaseComparator;
 import org.apache.cxf.phase.PhaseManager;
@@ -67,7 +66,6 @@
 
     private static final QName SOAP_FAULT_CODE = new QName("http://schemas.xmlsoap.org/soap/envelope/",
                                                            "Server");
-    private static final String FAULT_CODE = "COULD_NOT_SEND";
     private static final String FAULT_MESSAGE = "Could not send Message.";
     
     private static final String CONTROL_PORT_ADDRESS = 
@@ -261,10 +259,7 @@
             if (!expectOnewayFault) {
                 fail("Oneway operation unexpectedly failed.");
             }
-            Throwable cause = ex.getCause();
-            Fault f = (Fault)cause;
-            assertEquals(FAULT_CODE, f.getCode());
-            assertEquals(FAULT_MESSAGE, f.getMessage());
+            assertEquals(FAULT_MESSAGE, ex.getMessage());
         }
         
         try {

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
Thu May 21 17:36:31 2009
@@ -75,7 +75,7 @@
                         } catch (SOAPFaultException expected) {
                             //expected.getCause().printStackTrace();
                             MalformedURLException mue = (MalformedURLException)expected
-                                .getCause().getCause();
+                                .getCause();
                             if (mue == null || mue.getMessage() == null) {
                                 throw expected;
                             }

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
Thu May 21 17:36:31 2009
@@ -26,7 +26,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebServiceException;
 
-import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.schema_validation.SchemaValidation;
 import org.apache.schema_validation.SchemaValidationService;
@@ -77,9 +76,8 @@
             validation.setComplexStruct(complexStruct);
             fail("Set ComplexStruct hould have thrown ProtocolException");
         } catch (WebServiceException e) {
-            assertTrue(e.getCause() instanceof Fault);
             String expected = "'{\"http://apache.org/schema_validation/types\":elem2}' is
expected.";
-            assertTrue(e.getCause().getMessage().indexOf(expected) != -1);
+            assertTrue(e.getMessage(), e.getMessage().indexOf(expected) != -1);
         }
 
         OccuringStruct occuringStruct = new OccuringStruct();
@@ -94,9 +92,8 @@
             validation.setOccuringStruct(occuringStruct);
             fail("Set OccuringStruct hould have thrown ProtocolException");
         } catch (WebServiceException e) {
-            assertTrue(e.getCause() instanceof Fault);
             String expected = "'{\"http://apache.org/schema_validation/types\":varFloat}'
is expected.";
-            assertTrue(e.getCause().getMessage().indexOf(expected) != -1);
+            assertTrue(e.getMessage().indexOf(expected) != -1);
         }
 
         try {
@@ -107,10 +104,9 @@
             validation.getComplexStruct("Hello");
             fail("Get ComplexStruct should have thrown ProtocolException");
         } catch (WebServiceException e) {
-            assertTrue(e.getCause() instanceof Fault);
             String expected = "'{\"http://apache.org/schema_validation/types\":elem2}' is
expected.";
-            assertTrue("Found message " + e.getCause().getMessage(), 
-                       e.getCause().getMessage().indexOf(expected) != -1);
+            assertTrue("Found message " + e.getMessage(), 
+                       e.getMessage().indexOf(expected) != -1);
         }
 
         try {
@@ -121,9 +117,8 @@
             validation.getOccuringStruct("World");
             fail("Get OccuringStruct should have thrown ProtocolException");
         } catch (WebServiceException e) {
-            assertTrue(e.getCause() instanceof Fault);
             String expected = "'{\"http://apache.org/schema_validation/types\":varFloat}'
is expected.";
-            assertTrue(e.getCause().getMessage().indexOf(expected) != -1);
+            assertTrue(e.getMessage().indexOf(expected) != -1);
         }
     }
 

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
Thu May 21 17:36:31 2009
@@ -151,8 +151,9 @@
 
         try {
             greeter.greetMe("cxf");
+            fail("Didn't get the exception");
         } catch (Exception ex) {
-            assertTrue(ex.getCause() instanceof SocketTimeoutException);
+            assertTrue(ex.getCause().getClass().getName(), ex.getCause() instanceof SocketTimeoutException);
         }
      
         // pingMe - policy attached to binding operation fault should have no effect

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/http_client_greeter.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/http_client_greeter.wsdl?rev=777196&r1=777195&r2=777196&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/http_client_greeter.wsdl
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/policy/http_client_greeter.wsdl
Thu May 21 17:36:31 2009
@@ -143,7 +143,7 @@
         <wsdl:operation name="greetMe">
             <wsp:Policy xmlns:wsp="http://www.w3.org/2006/07/ws-policy">
                 <http-conf:client xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
-                    ReceiveTimeout="2000"/>
+                    ReceiveTimeout="1000"/>
             </wsp:Policy>
             <soap:operation soapAction="" style="document"/>
             <wsdl:input name="greetMeRequest">



Mime
View raw message