From dac345d5480d52c4071c22fbdeba605dc1236cc0 Mon Sep 17 00:00:00 2001 From: scottkurz Date: Wed, 26 Jan 2011 01:18:02 +0000 Subject: Fix more issues with multiple outputs. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1063548 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/jaxws/JAXWSJavaInterfaceProcessor.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'sca-java-2.x/trunk/modules/interface-java-jaxws/src/main') diff --git a/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java b/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java index 8e65cca7e6..57f2b9c3a1 100644 --- a/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java +++ b/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java @@ -186,11 +186,7 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor { } ParameterMode mode = operation.getParameterModes().get(i); } - - // - // Note for BARE mapping this will NOT be WS-I compliant, but let's assume this is not the place to - // worry about non-compliance, and keep on going. - // + WebResult result = method.getAnnotation(WebResult.class); if (result != null) { String ns = getValue(result.targetNamespace(), tns); @@ -351,6 +347,19 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor { operation.setWrapper(wrapperInfo); } + + // In both bare and wrapped cases, remove OUT-only parameters from input DataType. + // This is a key point then because it's the last time in which the number of parameters in + // Java matches the number of logical inputs. After this, things will be out of synch, for + // example the number of parameter modes won't match the number of inputs. + List parmModes = operation.getParameterModes(); + List inputDTs = operation.getInputType().getLogical(); + for (int i = parmModes.size() - 1; i>=0; i--) { + if (parmModes.get(i).equals(ParameterMode.OUT)) { + inputDTs.remove(i); + } + } + } } -- cgit v1.2.3