cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r822559 - in /cxf/trunk: rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
Date Wed, 07 Oct 2009 02:39:54 GMT
Author: dkulp
Date: Wed Oct  7 02:39:54 2009
New Revision: 822559

URL: http://svn.apache.org/viewvc?rev=822559&view=rev
Log:
[CXF-2384] IOExceptions should raise a WebServiceException

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java?rev=822559&r1=822558&r2=822559&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java Wed
Oct  7 02:39:54 2009
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.jaxws;
 
+import java.io.IOException;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -130,7 +131,9 @@
                     throw ex.fillInStackTrace();
                 }
             }
-            
+            if (ex instanceof Fault && ex.getCause() instanceof IOException) {
+                throw new WebServiceException(ex.getMessage(), ex.getCause());
+            }
             if (getBinding() instanceof HTTPBinding) {
                 HTTPException exception = new HTTPException(HttpURLConnection.HTTP_INTERNAL_ERROR);
                 exception.initCause(ex);

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java?rev=822559&r1=822558&r2=822559&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
(original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
Wed Oct  7 02:39:54 2009
@@ -27,7 +27,7 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
-import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.WebServiceException;
 
 import org.apache.cxf.endpoint.ClientImpl;
 import org.apache.cxf.jaxws.JaxWsClientProxy;
@@ -72,7 +72,7 @@
                                      .get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY));
                         try {
                             greeter.greetMe("Hi");
-                        } catch (SOAPFaultException expected) {
+                        } catch (WebServiceException expected) {
                             //expected.getCause().printStackTrace();
                             MalformedURLException mue = (MalformedURLException)expected
                                 .getCause();



Mime
View raw message