diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-14 22:34:32 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-14 22:34:32 +0000 |
commit | da521c2a4e5904efcec4c702d4c90e18e0e8745d (patch) | |
tree | 236e29656cc292ac8757347232bc99dd447c68aa /sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main | |
parent | ebc9f8e8938b56b0564ca447fef38ba42db689dd (diff) |
TUSCANY-3664 Add support for multiple operation output types
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1035091 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main')
2 files changed, 9 insertions, 7 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCDatabindingHelper.java b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCDatabindingHelper.java index f9b37f30b2..fc43835b9b 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCDatabindingHelper.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCDatabindingHelper.java @@ -52,12 +52,14 @@ public class JSONRPCDatabindingHelper { } } } - DataType outputType = operation.getOutputType(); - if (outputType != null) { - if (!SimpleJavaDataBinding.NAME.equals(outputType.getDataBinding()) || - outputType.getPhysical() == BigDecimal.class ) { - outputType.setDataBinding(JSONDataBinding.NAME); - } + + for (DataType outputType : operation.getOutputType().getLogical() ) { + if (outputType != null) { + if (!SimpleJavaDataBinding.NAME.equals(outputType.getDataBinding()) || + outputType.getPhysical() == BigDecimal.class ) { + outputType.setDataBinding(JSONDataBinding.NAME); + } + } } } } diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java index 1e4292e66a..7ecfa83893 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java @@ -328,7 +328,7 @@ public class JSONRPCServiceServlet extends JSONRPCServlet { result = responseMessage.getBody(); return result.toString().getBytes("UTF-8"); } else { - if (jsonOperation.getOutputType() == null) { + if (jsonOperation.getOutputType().getLogical().get(0) == null) { // void operation (json-rpc notification) try { JSONObject jsonResponse = new JSONObject(); |