Author: darran.lofthouse(a)jboss.com
Date: 2009-01-12 09:36:00 -0500 (Mon, 12 Jan 2009)
New Revision: 9009
Modified:
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
Log:
Allow faultCode and faultString to be passed from WS-Security handler to calling client.
Modified:
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-01-12
14:06:42 UTC (rev 9008)
+++
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-01-12
14:36:00 UTC (rev 9009)
@@ -171,7 +171,7 @@
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
BindingExt binding = (BindingExt)getBindingProvider().getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type), false);
executorMap.put(type, executor);
MessageContext msgContext =
(MessageContext)MessageContextAssociation.peekMessageContext();
Modified:
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2009-01-12
14:06:42 UTC (rev 9008)
+++
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2009-01-12
14:36:00 UTC (rev 9009)
@@ -595,7 +595,7 @@
private boolean callRequestHandlerChain(QName portName, HandlerType type)
{
BindingExt binding = (BindingExt)bindingProvider.getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type), false);
executorMap.put(type, executor);
MessageContext msgContext =
(MessageContext)MessageContextAssociation.peekMessageContext();
Modified:
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2009-01-12
14:06:42 UTC (rev 9008)
+++
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2009-01-12
14:36:00 UTC (rev 9009)
@@ -61,10 +61,14 @@
protected int falseIndex = -1;
// True if the current direction is outbound
protected Boolean isOutbound;
+ // True if this is for the server/endpoint side, used to determine client side
specific
+ // conformance requirements.
+ private boolean serverSide;
- public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler>
unsortedChain)
+ public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler>
unsortedChain, boolean serverSide)
{
this.epMetaData = epMetaData;
+ this.serverSide = serverSide;
// Sort handler logical handlers first
List<Handler> sortedChain = new ArrayList<Handler>();
@@ -264,9 +268,17 @@
// the client MUST be passed on to the application. If the exception in question is a
subclass of WebService-
// Exception then an implementation MUST rethrow it as-is, without any additional
wrapping, otherwise it
// MUST throw a WebServiceException whose cause is set to the exception that was
thrown during handler processing.
- private void processHandlerFailure(Exception ex)
+ private void processHandlerFailure(RuntimeException ex)
{
log.error("Exception during handler processing", ex);
+
+ // If this call is server side then the conformance requirement specific to
+ // clients can be avoided.
+ if (serverSide == true)
+ {
+ throw ex;
+ }
+
if (ex instanceof WebServiceException)
{
throw (WebServiceException)ex;
Modified:
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2009-01-12
14:06:42 UTC (rev 9008)
+++
stack/native/branches/dlofthouse/JBWS-1999/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2009-01-12
14:36:00 UTC (rev 9009)
@@ -161,8 +161,8 @@
{
if (type == HandlerType.ALL)
throw new IllegalArgumentException("Invalid handler type: " + type);
-
- HandlerChainExecutor executor = new HandlerChainExecutor(sepMetaData,
getHandlerChain(sepMetaData, type));
+
+ HandlerChainExecutor executor = new HandlerChainExecutor(sepMetaData,
getHandlerChain(sepMetaData, type), true);
if (type == HandlerType.PRE)
preExecutor.set(executor);
else if (type == HandlerType.ENDPOINT)
Show replies by date