scheu 2002/06/25 10:48:35
Modified: java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
Log:
Fix for Bugzilla defect: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10223
Problem: Stub is incorrect if operation has a single parameter that is OUT and no
return type.
This is a TCK compliance issue.
Fixed Stub generation.
Revision Changes Path
1.73 +8 -11
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
Index: JavaStubWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- JavaStubWriter.java 20 Jun 2002 20:35:48 -0000 1.72
+++ JavaStubWriter.java 25 Jun 2002 17:48:35 -0000 1.73
@@ -618,13 +618,16 @@
if (allOuts > 0) {
pw.println(" else {");
if (allOuts == 1) {
- if (parms.inouts == 1) {
- // There is only one output and it is an inout, so the resp
object
- // must go into the inout holder.
+ if (parms.returnType != null) {
+ writeOutputAssign(pw, "return ",
+ parms.returnType, "resp");
+ }
+ else {
+ // The resp object must go into a holder
int i = 0;
Parameter p = (Parameter) parms.list.get(i);
- while (p.getMode() != Parameter.INOUT) {
+ while (p.getMode() == Parameter.IN) {
p = (Parameter) parms.list.get(++i);
}
String javifiedName = Utils.xmlNameToJava(p.getName());
@@ -636,12 +639,6 @@
p.getType(),
"output.get(" + qnameName + ")");
}
- else {
- // (parms.outputs == 1)
- // There is only one output and it is the return value.
- writeOutputAssign(pw, "return ",
- parms.returnType, "resp");
- }
}
else {
// There is more than 1 output. Get the outputs from
getOutputParams.
@@ -657,7 +654,7 @@
"output.get(" + qnameName + ")");
}
}
- if (parms.outputs > 0) {
+ if (parms.returnType != null) {
writeOutputAssign(pw, "return ",
parms.returnType,
"resp");