Author: david.boeren
Date: 2007-05-18 15:01:11 -0400 (Fri, 18 May 2007)
New Revision: 3144
Modified:
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
Log:
Changes for JBWS-1653
Modified:
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
---
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-05-18
15:29:32 UTC (rev 3143)
+++
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-05-18
19:01:11 UTC (rev 3144)
@@ -256,6 +256,13 @@
// Bind the request message
SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData,
epInv, unboundHeaders);
+
+ List ll = this.epMetaData.getHandlerMetaData(HandlerType.POST);
+ log.debug("NumberOfHandlers ofType POST fromConfigFiles=
"+ll.size());
+
+ // FIX: Update the HandlerRegistry
+ log.debug("Updating the HandlerRegistry...");
+ this.setConfigName(this.getConfigName());
// Add possible attachment parts
addAttachmentParts(reqMessage);
Modified:
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
---
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-05-18
15:29:32 UTC (rev 3143)
+++
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-05-18
19:01:11 UTC (rev 3144)
@@ -207,6 +207,7 @@
/**
* Sets SOAP Actor roles for this HandlerChain. This specifies the set of roles in
which this HandlerChain is to act
* for the SOAP message processing at this SOAP node. These roles assumed by a
HandlerChain must be invariant during
+
* the processing of an individual SOAP message through the HandlerChain.
* <p/>
* A HandlerChain always acts in the role of the special SOAP actor next. Refer to the
SOAP specification for the
@@ -244,6 +245,9 @@
{
boolean doNext = true;
+ if(type==HandlerType.POST)
+ log.debug("Requested Handlertype POST, for execution");
+
if (handlers.size() > 0)
{
if(log.isDebugEnabled()) log.debug("Enter: handleRequest");
@@ -262,6 +266,10 @@
for (; doNext && handlerIndex < handlers.size(); handlerIndex++)
{
HandlerEntry handlerEntry = (HandlerEntry)handlers.get(handlerIndex);
+
+ if(type==HandlerType.POST &&
handlerEntry.getType()==HandlerType.POST)
+ log.debug("FoundTheHandler with HandlerType=POST.");
+
if (type == HandlerType.ALL || type == handlerEntry.getType())
{
currHandler = handlerEntry.getHandler();
Modified:
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
---
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-05-18
15:29:32 UTC (rev 3143)
+++
branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-05-18
19:01:11 UTC (rev 3144)
@@ -26,7 +26,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
-import java.util.Iterator;
import javax.management.MBeanException;
import javax.xml.namespace.QName;
@@ -151,20 +150,14 @@
msgContext.setOperationMetaData(opMetaData);
oneway = opMetaData.isOneWay();
- // Unbind the request message
- epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
+ // We no longer call unbindRequestMessage here, per case 15726
}
handlersPass = handlersPass && callRequestHandlerChain(seInfo,
HandlerType.ENDPOINT);
handlersPass = handlersPass && callRequestHandlerChain(seInfo,
HandlerType.POST);
- // Check if protocol handlers modified the payload
- if (msgContext.isModified() == true)
- {
- if (log.isDebugEnabled())
- log.debug("Handler modified body payload, unbind message
again");
- epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
- }
+ // Unbind the request message
+ epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
if (handlersPass)
{
@@ -185,8 +178,8 @@
if (epMetaData.getType() == EndpointMetaData.Type.JAXWS)
msgContext.setProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY,
Boolean.TRUE);
- if (binding instanceof CommonSOAPBinding)
- XOPContext.setMTOMEnabled(((CommonSOAPBinding)binding).isMTOMEnabled());
+ if(binding instanceof CommonSOAPBinding)
+ XOPContext.setMTOMEnabled( ((CommonSOAPBinding)binding).isMTOMEnabled());
// Bind the response message
SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData,
epInv);
@@ -230,8 +223,7 @@
protected CommonMessageContext processPivot(CommonMessageContext requestContext)
{
- if (log.isDebugEnabled())
- log.debug("Begin response processing");
+ if(log.isDebugEnabled()) log.debug("Begin response processing");
// TODO: implement
return requestContext;
}
@@ -246,21 +238,9 @@
{
String faultString;
SOAPBody soapBody = reqMessage.getSOAPBody();
-
- Iterator bodyChildren = soapBody.getChildElements();
- SOAPBodyElement soapBodyElement = null;
-
- while (bodyChildren.hasNext() && soapBodyElement == null)
+ if (soapBody.getChildElements().hasNext())
{
- Object next = bodyChildren.next();
- if (next instanceof SOAPBodyElement)
- {
- soapBodyElement = (SOAPBodyElement)next;
- }
- }
-
- if (soapBodyElement != null)
- {
+ SOAPBodyElement soapBodyElement =
(SOAPBodyElement)soapBody.getChildElements().next();
Name soapName = soapBodyElement.getElementName();
faultString = "Endpoint " + epMetaData.getPortName() + " does
not contain operation meta data for: " + soapName;
}
@@ -273,10 +253,8 @@
// with a faultcode of "Client", unless a "MustUnderstand"
or "VersionMismatch" fault is generated.
if (soapHeader != null &&
soapHeader.examineMustUnderstandHeaderElements(Constants.URI_SOAP11_NEXT_ACTOR).hasNext())
{
-
QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
throw new SOAPFaultException(faultCode, faultString, null, null);
-
}
else
{
Show replies by date