Author: dkulp
Date: Wed Oct 7 02:42:20 2009
New Revision: 822561
URL: http://svn.apache.org/viewvc?rev=822561&view=rev
Log:
Merged revisions 822559 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r822559 | dkulp | 2009-10-06 22:39:54 -0400 (Tue, 06 Oct 2009) | 1 line
[CXF-2384] IOExceptions should raise a WebServiceException
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java?rev=822561&r1=822560&r2=822561&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
Wed Oct 7 02:42:20 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/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java?rev=822561&r1=822560&r2=822561&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/JaxWsClientThreadTest.java
Wed Oct 7 02:42:20 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();