Author: jim.ma
Date: 2010-03-31 05:09:06 -0400 (Wed, 31 Mar 2010)
New Revision: 11907
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/server/ServiceEndpointInvoker.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
Log:
[JBPAPP-3408]:check if RPC/Lit return value in client side
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
06:45:05 UTC (rev 11906)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31
09:09:06 UTC (rev 11907)
@@ -400,7 +400,7 @@
binding.unbindResponseMessage(opMetaData, resMessage, epInv,
unboundHeaders);
}
- //JBWS-2969: check if the rpc/lit input paramter is null
+ //JBWS-2969: check if the RPC/Lit input/output paramter is null
if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC &&
opMetaData.isRPCLiteral())
{
if (epInv.getResponseParamNames() != null)
@@ -415,7 +415,15 @@
}
}
}
- }
+
+ if (opMetaData.getReturnParameter() != null &&
epInv.getReturnValue() == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" +
opName
+ + "] return value can not be null");
+ }
+ }
+
+
retObj = syncOutputParams(inputParams, epInv);
}
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
06:45:05 UTC (rev 11906)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31
09:09:06 UTC (rev 11907)
@@ -213,7 +213,7 @@
reqMessage = msgContext.getMessageAbstraction();
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
- //JBWS-2969:check if the rpc/lit input paramter is null
+ //JBWS-2969:check if the RPC/Lit input paramter is null
if (opMetaData.getEndpointMetaData().getType() !=
EndpointMetaData.Type.JAXRPC
&& opMetaData.isRPCLiteral() &&
sepInv.getRequestParamNames() != null)
{
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2010-03-31
06:45:05 UTC (rev 11906)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2010-03-31
09:09:06 UTC (rev 11907)
@@ -48,11 +48,22 @@
}
public void testSync() throws Exception
- {
+ {
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/dar?wsdl");
AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
Date start = new Date();
- client.run(false);
+ try
+ {
+ client.run(true);
+ }
+ catch (Exception e)
+ {
+ if (e.getMessage().indexOf("return value can not be null") == -1)
+ {
+ throw e ;
+ }
+ // do nothing, ingore the expected WebServiceException, See JBWS2969
+ }
Date stop = new Date();
assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
}
@@ -62,7 +73,18 @@
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/dar?wsdl");
AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
Date start = new Date();
- client.run(true);
+ try
+ {
+ client.run(true);
+ }
+ catch (Exception e)
+ {
+ if (e.getMessage().indexOf("return value can not be null") == -1)
+ {
+ throw e ;
+ }
+ //do nothing, ingore the expected WebServiceException, See JBWS2969
+ }
Date stop = new Date();
assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
}
Show replies by date