diff options
author | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-26 01:18:02 +0000 |
---|---|---|
committer | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-26 01:18:02 +0000 |
commit | dac345d5480d52c4071c22fbdeba605dc1236cc0 (patch) | |
tree | c63f2f6803ec3f22357558d58f55ddfe3e753af6 /sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java | |
parent | 875e50908c2630d263661af492654cd44bef2d65 (diff) |
Fix more issues with multiple outputs.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1063548 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java index 542b9d556e..8d80898071 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java @@ -753,39 +753,22 @@ public class Interface2WSDLGenerator { Method method = ((JavaOperation)operation).getJavaMethod(); /* - * Making this change, though not understanding: - * - * 1. Whether we can assume JAXWSJavaInterfaceProcessor was already used to process - * - * 2. What the purpose is of calling getElementInfo() when we already have an ElementInfo - * + * Making this change, though not understanding + * whether we can assume JAXWSJavaInterfaceProcessor was already used to process */ if (input) { - Class<?>[] paramTypes = method.getParameterTypes(); - for (int i = 0, inputsSeen = 0; i < paramTypes.length; i++) { - ParameterMode mode = operation.getParameterModes().get(i); - if (!mode.equals(ParameterMode.OUT)) { - DataType dataType = operation.getInputType().getLogical().get(i); - elements.set(inputsSeen, getElementInfo(paramTypes[i], dataType, elements.get(inputsSeen).getQName(), helpers)); - inputsSeen++; - } + List<DataType> inputDTs = operation.getInputType().getLogical(); + for (int i = 0; i < inputDTs.size(); i++) { + DataType nextInput = inputDTs.get(i); + elements.set(i, getElementInfo(nextInput.getPhysical(), nextInput, elements.get(i).getQName(), helpers)); } + } else { - int outputsSeen = 0; - Class<?> returnType = method.getReturnType(); - if (returnType != Void.TYPE) { - DataType dataType = operation.getOutputType().getLogical().get(0); - elements.set(outputsSeen++, getElementInfo(returnType, dataType, elements.get(0).getQName(), helpers)); + List<DataType> outputDTs = operation.getOutputType().getLogical(); + for (int i = 0; i < outputDTs.size(); i++) { + DataType nextOutput = outputDTs.get(i); + elements.set(i, getElementInfo(nextOutput.getPhysical(), nextOutput, elements.get(i).getQName(), helpers)); } - Class<?>[] paramTypes = method.getParameterTypes(); - for (int i = 0; i < paramTypes.length; i++) { - ParameterMode mode = operation.getParameterModes().get(i); - if (!mode.equals(ParameterMode.IN)) { - DataType dataType = operation.getOutputType().getLogical().get(i); - elements.set(outputsSeen, getElementInfo(paramTypes[i], dataType, elements.get(outputsSeen).getQName(), helpers)); - outputsSeen++; - } - } } } return part; |