Author: jim.ma
Date: 2010-03-31 09:57:29 -0400 (Wed, 31 Mar 2010)
New Revision: 11909
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
Log:
[JBPAPP-3984]:refactor the previous fix
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31
10:55:29 UTC (rev 11908)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31
13:57:29 UTC (rev 11909)
@@ -288,10 +288,11 @@
{
for (QName qname : epInv.getRequestParamNames())
{
- Object obj = epInv.getRequestParamValue(qname);
- if (obj == null)
+ ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
+ if (paramMetaData.getMode().equals(ParameterMode.IN) &&
epInv.getRequestParamValue(qname) == null)
{
- throw new WebServiceException("The RPC/Literal Operation [" +
opName + "] Parameter can not be null");
+ throw new WebServiceException("The RPC/Literal Operation [" +
opMetaData.getQName()
+ + "] parameters can not be null");
}
}
}
@@ -400,22 +401,9 @@
binding.unbindResponseMessage(opMetaData, resMessage, epInv,
unboundHeaders);
}
- //JBWS-2969: check if the RPC/Lit input/output paramter is null
+ //JBWS-2969: check if the RPC/Lit output paramter is null
if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC &&
opMetaData.isRPCLiteral())
- {
- if (epInv.getResponseParamNames() != null)
- {
- for (QName qname : epInv.getResponseParamNames())
- {
- Object obj = epInv.getResponsePayLoadParamValue(qname);
- if (obj == null)
- {
- throw new WebServiceException("The RPC/Literal Operation
[" + opName
- + "] response parameters can not be null");
- }
- }
- }
-
+ {
if (opMetaData.getReturnParameter() != null &&
epInv.getReturnValue() == null)
{
throw new WebServiceException("The RPC/Literal Operation [" +
opName
@@ -423,7 +411,6 @@
}
}
-
retObj = syncOutputParams(inputParams, epInv);
}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-31
10:55:29 UTC (rev 11908)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-31
13:57:29 UTC (rev 11909)
@@ -172,17 +172,7 @@
}
return paramValue;
}
-
- public Object getResponsePayLoadParamValue(QName xmlName) throws SOAPException
- {
- if (log.isDebugEnabled())
- log.debug("getResponseParamValue: " + xmlName);
- Object paramValue = resPayload.get(xmlName);
- ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
- paramValue = transformPayloadValue(paramMetaData, paramValue);
- return paramValue;
- }
-
+
public void setReturnValue(Object value)
{
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31
10:55:29 UTC (rev 11908)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31
13:57:29 UTC (rev 11909)
@@ -28,6 +28,7 @@
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.rpc.server.ServletEndpointContext;
import javax.xml.soap.Name;
@@ -64,6 +65,7 @@
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.common.JavaUtils;
import org.jboss.wsf.spi.SPIProvider;
@@ -216,11 +218,12 @@
//JBWS-2969:check if the RPC/Lit input paramter is null
if (opMetaData.getEndpointMetaData().getType() !=
EndpointMetaData.Type.JAXRPC
&& opMetaData.isRPCLiteral() &&
sepInv.getRequestParamNames() != null)
- {
+ {
+
for (QName qname : sepInv.getRequestParamNames())
{
- Object obj = sepInv.getRequestParamValue(qname);
- if (obj == null)
+ ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
+ if (paramMetaData.getMode().equals(ParameterMode.IN) &&
sepInv.getRequestParamValue(qname) == null)
{
throw new WebServiceException("The RPC/Literal Operation
[" + opMetaData.getQName()
+ "] parameters can not be null");
Show replies by date