diff options
author | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-15 14:52:26 +0000 |
---|---|---|
committer | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-15 14:52:26 +0000 |
commit | 5fa13700d2f3ffbdad03d772f2e2398bb3371a36 (patch) | |
tree | 9f82cc56a7e28a24ffa53f063022c2f7faf3c9bc /sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca | |
parent | fa76bf91f5918d44c9d72c3d7ad8461210516e3d (diff) |
Test fix needed for TUSCANY-3832 changes, plus cleanup and adjustment from recent multiple output support.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1070928 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca')
2 files changed, 12 insertions, 8 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaInvoker.java b/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaInvoker.java index 0ad3b2240e..cd48d81b1a 100644 --- a/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaInvoker.java @@ -62,7 +62,8 @@ public class CorbaInvoker implements Invoker { request.setOperationsMap(operationsMap); if (msg.getOperation().getOutputType() != null) { Annotation[] notes = operationMethodMapping.get(msg.getOperation()).getAnnotations(); - request.setOutputType(msg.getOperation().getOutputType().getPhysical(), notes); + DataType returnType = msg.getOperation().getOutputType().getLogical().get(0); + request.setOutputType(returnType.getPhysical(), notes); } java.lang.Object[] args = msg.getBody(); if (args != null) { diff --git a/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/service/ComponentInvocationProxy.java b/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/service/ComponentInvocationProxy.java index 5babc25b07..923f9d7a7e 100644 --- a/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/service/ComponentInvocationProxy.java +++ b/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/service/ComponentInvocationProxy.java @@ -71,12 +71,16 @@ public class ComponentInvocationProxy implements InvocationProxy { OperationTypes operationTypes = new OperationTypes(); List<TypeTree> inputInstances = new ArrayList<TypeTree>(); // cache output type tree - if (operation.getOutputType() != null && operation.getOutputType().getPhysical() != null - && !operation.getOutputType().getPhysical().equals(void.class)) { - Annotation[] notes = operationMethodMapping.get(operation).getAnnotations(); - TypeTree outputType = - TypeTreeCreator.createTypeTree(operation.getOutputType().getPhysical(), notes); - operationTypes.setOutputType(outputType); + if (operation.getOutputType() != null) { + // Should only be one output, since this was created when we only supported one output. + DataType returnType = operation.getOutputType().getLogical().get(0); + Class<?> returnClass = returnType.getPhysical(); + if (returnClass != null && !returnClass.equals(void.class)) { + Annotation[] notes = operationMethodMapping.get(operation).getAnnotations(); + TypeTree outputType = + TypeTreeCreator.createTypeTree(returnClass, notes); + operationTypes.setOutputType(outputType); + } } // cache input types trees if (operation.getInputType() != null) { @@ -89,7 +93,6 @@ public class ComponentInvocationProxy implements InvocationProxy { inputInstances.add(inputType); i++; } - } operationTypes.setInputType(inputInstances); operationsCache.put(operation, operationTypes); |