Author: thomas.diesler(a)jboss.com
Date: 2007-04-13 02:25:37 -0400 (Fri, 13 Apr 2007)
New Revision: 2828
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
Log:
Prevent double wrap of WebServiceException
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-04-12
18:17:38 UTC (rev 2827)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-04-13
06:25:37 UTC (rev 2828)
@@ -288,32 +288,33 @@
*/
private void handleRemoteException(OperationMetaData opMetaData, Exception ex)
{
- WebServiceException wsEx;
String bindingId = opMetaData.getEndpointMetaData().getBindingId();
if (bindingId.startsWith(SOAPBinding.SOAP11HTTP_BINDING) ||
bindingId.startsWith(SOAPBinding.SOAP12HTTP_BINDING))
{
if (ex instanceof SOAPFaultException)
{
- wsEx = (SOAPFaultException)ex;
+ throw (SOAPFaultException)ex;
}
+ else if (ex instanceof WebServiceException)
+ {
+ throw (WebServiceException)ex;
+ }
else
{
- wsEx = new WebServiceException(ex);
+ throw new WebServiceException(ex);
}
}
else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
{
// FIXME: provide actual status code
- wsEx = new HTTPException(-1);
+ WebServiceException wsEx = new HTTPException(-1);
wsEx.initCause(ex);
+ throw wsEx;
}
else
{
throw new WebServiceException("Unsuported binding: " + bindingId,
ex);
}
-
- // Throw the web service exception
- throw wsEx;
}
@Override
Show replies by date