dims 2002/10/09 05:15:45
Modified: java/src/org/apache/axis/client Call.java
java/src/org/apache/axis/i18n resource.properties
Log:
Interop4 testing...Throw AxisFault if we don't find the specified return param
Revision Changes Path
1.182 +10 -2 xml-axis/java/src/org/apache/axis/client/Call.java
Index: Call.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -r1.181 -r1.182
--- Call.java 8 Oct 2002 03:31:32 -0000 1.181
+++ Call.java 9 Oct 2002 12:15:45 -0000 1.182
@@ -1908,8 +1908,10 @@
// config at the top of this method, so don't need to do it
// here. Check for void return, though.
boolean findReturnParam = false;
+ QName returnParamQName = operation.getReturnQName();
+
if (!XMLType.AXIS_VOID.equals(returnType)) {
- if (operation.getReturnQName() == null) {
+ if (returnParamQName == null) {
// Assume the first param is the return
RPCParam param = (RPCParam)resArgs.get(0);
result = param.getValue();
@@ -1936,7 +1938,7 @@
// Check if this parameter is our return
// otherwise just add it to our outputs
if (findReturnParam &&
- operation.getReturnQName().equals(param.getQName())) {
+ returnParamQName.equals(param.getQName())) {
// found it!
result = value;
findReturnParam = false;
@@ -1944,6 +1946,12 @@
outParams.put(param.getQName(), value);
outParamsList.add(value);
}
+ }
+ // If we were looking for a particular QName for the return and
+ // didn't find it, throw an exception
+ if (findReturnParam) {
+ String returnParamName = returnParamQName.toString();
+ throw new AxisFault(Messages.getMessage("noReturnParam",
returnParamName));
}
}
} else {
1.11 +1 -0 xml-axis/java/src/org/apache/axis/i18n/resource.properties
Index: resource.properties
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/i18n/resource.properties,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- resource.properties 8 Oct 2002 03:31:33 -0000 1.10
+++ resource.properties 9 Oct 2002 12:15:45 -0000 1.11
@@ -1035,3 +1035,4 @@
noPortTypeFault=ERROR: Unable to match binding fault "{0}" from binding {2},
operation "{1}", to a PortType fault.
unNamedFault00=ERROR: Fault is missing a name= attribute in operation "{0}", in
binding {1}.
missingSoapFault00=ERROR: Missing <soap:fault> element inFault "{0}" in operation
"{0}", in binding {1}
+noReturnParam=Didn''t find specified return QName {0}!