Author: alessio.soldano(a)jboss.com
Date: 2008-03-17 14:09:35 -0400 (Mon, 17 Mar 2008)
New Revision: 5987
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
Log:
[JBWS-1941] Fixing exception handling + tck 5 failures
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2008-03-17
18:06:02 UTC (rev 5986)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2008-03-17
18:09:35 UTC (rev 5987)
@@ -63,7 +63,6 @@
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.extensions.wsrm.RMConstant;
-import org.jboss.ws.extensions.wsrm.server.RMInvocationHandler;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -223,7 +222,7 @@
}
catch (InvocationTargetException th)
{
- // Unwrap the throwable raised by the service endpoint implementation
+ //Unwrap the throwable raised by the service endpoint implementation
Throwable targetEx = th.getTargetException();
throw (targetEx instanceof Exception ? (Exception)targetEx : new
UndeclaredThrowableException(targetEx));
}
@@ -269,14 +268,14 @@
faultType[0] = null;
}
}
- catch (RuntimeException ex)
+ catch (Exception ex)
{
// Reverse the message direction
processPivotInternal(msgContext, direction);
-
+
+ CommonBinding binding = bindingProvider.getCommonBinding();
try
{
- CommonBinding binding = bindingProvider.getCommonBinding();
binding.bindFaultMessage(ex);
// call the fault handler chain
@@ -291,6 +290,7 @@
catch (RuntimeException subEx)
{
log.warn("Exception while processing handleFault: ", ex);
+ binding.bindFaultMessage(subEx);
ex = subEx;
}
throw ex;
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2008-03-17
18:06:02 UTC (rev 5986)
+++
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2008-03-17
18:09:35 UTC (rev 5987)
@@ -474,7 +474,7 @@
}
catch (Exception ex)
{
- MessageAbstraction resMessage = msgContext.getMessageAbstraction();
+ MessageAbstraction resMessage =
MessageContextAssociation.peekMessageContext().getMessageAbstraction();
// In case we have an exception before the invoker is called
// we create the fault message here.
@@ -494,7 +494,7 @@
{
try
{
- MessageAbstraction resMessage = msgContext.getMessageAbstraction();
+ MessageAbstraction resMessage =
MessageContextAssociation.peekMessageContext().getMessageAbstraction();
if (resMessage != null)
{
if (resMessage.isFaultMessage())
Show replies by date