Author: heiko.braun(a)jboss.com
Date: 2008-02-21 05:42:56 -0500 (Thu, 21 Feb 2008)
New Revision: 5757
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
Log:
Fix JBWS-1973: MTOM/XOP attachments not inlined when using JAX-WS handlers
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2008-02-21
09:42:52 UTC (rev 5756)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2008-02-21
10:42:56 UTC (rev 5757)
@@ -31,12 +31,16 @@
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.PortInfo;
+import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
import org.jboss.ws.core.server.ServerHandlerDelegate;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -92,7 +96,13 @@
log.debug("callResponseHandlerChain: " + type);
HandlerChainExecutor executor = getExecutor(type);
MessageContext msgContext =
(MessageContext)MessageContextAssociation.peekMessageContext();
- return (executor != null ? executor.handleMessage(msgContext) : true);
+ boolean status = (executor != null ? executor.handleMessage(msgContext) : true);
+
+ MessageAbstraction msg =
((CommonMessageContext)msgContext).getMessageAbstraction();
+ if (type == HandlerType.ENDPOINT && (msg instanceof SOAPMessage))
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
@@ -112,7 +122,13 @@
log.debug("callFaultHandlerChain: " + type);
HandlerChainExecutor executor = getExecutor(type);
MessageContext msgContext =
(MessageContext)MessageContextAssociation.peekMessageContext();
- return (executor != null ? executor.handleFault(msgContext, ex) : true);
+ boolean status = (executor != null ? executor.handleFault(msgContext, ex) : true);
+
+ MessageAbstraction msg =
((CommonMessageContext)msgContext).getMessageAbstraction();
+ if (type == HandlerType.ENDPOINT && (msg instanceof SOAPMessage))
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
private List<Handler> getHandlerChain(EndpointMetaData epMetaData, HandlerType
type)
Show replies by date