Author: thomas.diesler(a)jboss.com
Date: 2007-04-12 14:17:38 -0400 (Thu, 12 Apr 2007)
New Revision: 2827
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
Log:
Fix WebServiceException handling
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
14:32:15 UTC (rev 2826)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-04-12
18:17:38 UTC (rev 2827)
@@ -288,27 +288,32 @@
*/
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)
{
- throw (SOAPFaultException)ex;
+ wsEx = (SOAPFaultException)ex;
}
else
{
- throw new SOAPFaultException(ex);
+ wsEx = new WebServiceException(ex);
}
}
else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
{
// FIXME: provide actual status code
- throw new HTTPException(-1);
+ wsEx = new HTTPException(-1);
+ wsEx.initCause(ex);
}
else
{
throw new WebServiceException("Unsuported binding: " + bindingId,
ex);
}
+
+ // Throw the web service exception
+ throw wsEx;
}
@Override
Show replies by date