diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-10 10:16:04 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-10 10:16:04 +0000 |
commit | f64f55f30b79bb8970347ff6ff503ce19a8ccdaf (patch) | |
tree | 9fa3283030ca205440edec12faf7288fed776a03 /branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core | |
parent | d1401fc172527ba931135d5583c02005dcaf2d84 (diff) |
TUSCANY-2398 doc/lit/bare wsdl on service and interface.java on reference
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@693770 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core')
2 files changed, 17 insertions, 12 deletions
diff --git a/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java b/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java index 71694c0a0a..fb5f939edb 100644 --- a/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java +++ b/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java @@ -133,7 +133,8 @@ public class Input2InputTransformer extends BaseTransformer<Object[], Object[]> // Check if the source operation is wrapped DataType<List<DataType>> sourceType = context.getSourceDataType(); Operation sourceOp = context.getSourceOperation(); - boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle(); + boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null; + boolean sourceBare = sourceOp != null && !sourceOp.isWrapperStyle() && sourceOp.getWrapper() == null; // Find the wrapper handler for source data WrapperHandler sourceWrapperHandler = null; @@ -143,19 +144,20 @@ public class Input2InputTransformer extends BaseTransformer<Object[], Object[]> // Check if the target operation is wrapped DataType<List<DataType>> targetType = context.getTargetDataType(); Operation targetOp = (Operation)context.getTargetOperation(); - boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle(); + boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null; + boolean targetBare = targetOp != null && !targetOp.isWrapperStyle() && targetOp.getWrapper() == null; // Find the wrapper handler for target data WrapperHandler targetWrapperHandler = null; String targetDataBinding = getDataBinding(targetOp); targetWrapperHandler = getWrapperHandler(targetDataBinding, targetWrapped); - if ((!sourceWrapped) && targetWrapped) { + if ((!sourceWrapped && !sourceBare) && targetWrapped) { // Unwrapped --> Wrapped WrapperInfo wrapper = targetOp.getWrapper(); - ElementInfo wrapperElement = wrapper.getInputWrapperElement(); + // ElementInfo wrapperElement = wrapper.getInputWrapperElement(); - Class<?> targetWrapperClass = wrapper != null ? wrapper.getInputWrapperClass() : null; + // Class<?> targetWrapperClass = wrapper != null ? wrapper.getInputWrapperClass() : null; if (source == null) { // Empty child elements @@ -207,14 +209,14 @@ public class Input2InputTransformer extends BaseTransformer<Object[], Object[]> true); return new Object[] {targetWrapper}; - } else if (sourceWrapped && (!targetWrapped)) { + } else if (sourceWrapped && (!targetWrapped && !targetBare)) { // Wrapped to Unwrapped Object sourceWrapper = source[0]; Object[] target = null; - List<ElementInfo> childElements = sourceOp.getWrapper().getInputChildElements(); + // List<ElementInfo> childElements = sourceOp.getWrapper().getInputChildElements(); if (targetWrapperHandler != null) { - ElementInfo wrapperElement = sourceOp.getWrapper().getInputWrapperElement(); + // ElementInfo wrapperElement = sourceOp.getWrapper().getInputWrapperElement(); // FIXME: This is a workaround for the wsdless support as it passes in child elements // under the wrapper that only matches by position if (sourceWrapperHandler.isInstance(sourceWrapper, sourceOp, true)) { diff --git a/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java b/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java index 71253f00b4..8d586905c4 100644 --- a/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java +++ b/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java @@ -154,7 +154,8 @@ public class Output2OutputTransformer extends BaseTransformer<Object, Object> im try { DataType<DataType> sourceType = context.getSourceDataType(); Operation sourceOp = context.getSourceOperation(); - boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle(); + boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null; + boolean sourceBare = sourceOp != null && !sourceOp.isWrapperStyle() && sourceOp.getWrapper() == null; WrapperHandler sourceWrapperHandler = null; String sourceDataBinding = getDataBinding(sourceOp); @@ -162,12 +163,14 @@ public class Output2OutputTransformer extends BaseTransformer<Object, Object> im DataType<DataType> targetType = context.getTargetDataType(); Operation targetOp = (Operation)context.getTargetOperation(); - boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle(); + boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null; + boolean targetBare = targetOp != null && !targetOp.isWrapperStyle() && targetOp.getWrapper() == null; + WrapperHandler targetWrapperHandler = null; String targetDataBinding = getDataBinding(targetOp); targetWrapperHandler = getWrapperHandler(targetDataBinding, targetWrapped); - if ((!sourceWrapped) && targetWrapped) { + if ((!sourceWrapped &&!sourceBare) && targetWrapped) { // Unwrapped --> Wrapped WrapperInfo wrapper = targetOp.getWrapper(); ElementInfo wrapperElement = wrapper.getOutputWrapperElement(); @@ -211,7 +214,7 @@ public class Output2OutputTransformer extends BaseTransformer<Object, Object> im child = mediator.mediate(response, sourceType.getLogical(), argType, context.getMetadata()); targetWrapperHandler.setChildren(targetWrapper, new Object[] {child}, targetOp, false); return targetWrapper; - } else if (sourceWrapped && (!targetWrapped)) { + } else if (sourceWrapped && (!targetWrapped && !targetBare)) { // Wrapped to Unwrapped Object sourceWrapper = response; List<ElementInfo> childElements = sourceOp.getWrapper().getOutputChildElements(); |