diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-14 22:31:42 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-14 22:31:42 +0000 |
commit | 5670f96c39fb938bfc6951dcb87d623a2d03bf8d (patch) | |
tree | 3c8a65b905e4ccf77d32c75c541d22d06cbf73f6 /sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca | |
parent | eec2e27511654d899e2fcc81172dd97d490f6699 (diff) |
TUSCANY-3664 Add support for multiple operation output types
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1035089 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca')
2 files changed, 7 insertions, 7 deletions
diff --git a/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java b/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java index a866c5b8e1..a57a0b4678 100644 --- a/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java +++ b/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java @@ -82,7 +82,7 @@ public class JAXWSAsyncInterfaceProcessor implements JavaInterfaceVisitor { */ private static boolean isJAXWSAsyncPoolingOperation(Operation operation, Operation asyncOperation) { - if (asyncOperation.getOutputType() == null || Response.class != asyncOperation.getOutputType().getPhysical()) { + if (asyncOperation.getOutputType().getLogical().get(0) == null || Response.class != asyncOperation.getOutputType().getLogical().get(0).getPhysical()) { // The return type is not Response<T> return false; } @@ -101,8 +101,8 @@ public class JAXWSAsyncInterfaceProcessor implements JavaInterfaceVisitor { } //a return type of Response<R> where R is the return type of M - DataType<?> operationOutputType = operation.getOutputType(); - DataType<?> asyncOperationOutputType = asyncOperation.getOutputType(); + DataType<?> operationOutputType = operation.getOutputType().getLogical().get(0); + DataType<?> asyncOperationOutputType = asyncOperation.getOutputType().getLogical().get(0); if (operationOutputType != null && asyncOperationOutputType != null) { Class<?> asyncReturnTypeClass = (Class<?>)asyncOperationOutputType.getPhysical(); @@ -149,7 +149,7 @@ public class JAXWSAsyncInterfaceProcessor implements JavaInterfaceVisitor { */ private static boolean isJAXWSAsyncCallbackOperation(Operation operation, Operation asyncOperation) { - if (asyncOperation.getOutputType() == null || Future.class != asyncOperation.getOutputType().getPhysical()) { + if (asyncOperation.getOutputType().getLogical().get(0) == null || Future.class != asyncOperation.getOutputType().getLogical().get(0).getPhysical()) { // The return type is not Future<?> return false; } @@ -173,7 +173,7 @@ public class JAXWSAsyncInterfaceProcessor implements JavaInterfaceVisitor { Class<?> asyncLastParameterTypeClass = asyncOperationInputType.get(size).getPhysical(); if (asyncLastParameterTypeClass == AsyncHandler.class) { //now check the actual type of the AsyncHandler<R> with R - Class<?> returnType = operation.getOutputType().getPhysical(); + Class<?> returnType = operation.getOutputType().getLogical().get(0).getPhysical(); Class<?> asyncActualLastParameterTypeClass = Object.class; if (genericParamType instanceof ParameterizedType) { ParameterizedType asyncLastParameterType = (ParameterizedType)genericParamType; 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 735f8cf269..74b2b53543 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 @@ -306,8 +306,8 @@ public class JAXWSJavaInterfaceProcessor implements JavaInterfaceVisitor { name = getValue(name, "return"); QName element = new QName(ns, name); - if (operation.getOutputType() != null) { - Object logical = operation.getOutputType().getLogical(); + if ((operation.getOutputType() != null) && ( operation.getOutputType().getLogical().get(0) != null)) { + Object logical = operation.getOutputType().getLogical().get(0).getLogical(); QName type = null; if (logical instanceof XMLType) { ((XMLType)logical).setElementName(element); |