diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java')
3 files changed, 13 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingInvoker.java index 1673f3aefa..2463883b80 100644 --- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingInvoker.java @@ -140,7 +140,7 @@ public class RESTBindingInvoker implements Invoker { } if (operation.getOutputType() != null) { - responseType = operation.getOutputType().getPhysical(); + responseType = operation.getOutputType().getLogical().get(0).getPhysical(); } else { responseType = null; } diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/provider/JSONWireFormatServiceProvider.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/provider/JSONWireFormatServiceProvider.java index fcb311a105..754fdfc73e 100644 --- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/provider/JSONWireFormatServiceProvider.java +++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/provider/JSONWireFormatServiceProvider.java @@ -124,11 +124,13 @@ public class JSONWireFormatServiceProvider implements WireFormatProvider { // handle output types if (configureOutput) { - DataType outputType = operation.getOutputType(); - if (outputType != null) { - if (!SimpleJavaDataBinding.NAME.equals(outputType.getDataBinding())) { - outputType.setDataBinding(JSONDataBinding.NAME); - } + List<DataType> outputTypes = operation.getOutputType().getLogical(); + for ( DataType outputType : outputTypes) { + if (outputType != null) { + if (!SimpleJavaDataBinding.NAME.equals(outputType.getDataBinding())) { + outputType.setDataBinding(JSONDataBinding.NAME); + } + } } } } diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java index 32d718b509..01b439961c 100644 --- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java +++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/provider/XMLWireFormatServiceProvider.java @@ -127,9 +127,11 @@ public class XMLWireFormatServiceProvider implements WireFormatProvider { // handle output types if (configureOutput) { - DataType outputType = operation.getOutputType(); - if (outputType != null) { - outputType.setDataBinding(XMLStringDataBinding.NAME); + List<DataType> outputTypes = operation.getOutputType().getLogical(); + for ( DataType outputType : outputTypes ) { + if (outputType != null) { + outputType.setDataBinding(XMLStringDataBinding.NAME); + } } } } |