summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-27 00:57:57 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-27 00:57:57 +0000
commit19630f55f88287cae7fbdec2e3bf26b55e2c4f45 (patch)
tree676d18eb6039951d45db9e231913613d3c32c713 /java/sca/modules
parentb4f69551cb9d3f2369f194df236c883aba463f4c (diff)
Add checking for wrapper style
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@778941 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java b/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
index f13da1d6a1..647dc2021e 100644
--- a/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
+++ b/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
@@ -79,28 +79,29 @@ public class InterfaceContractMapperImpl implements InterfaceContractMapper {
DataType sourceOutputType = source.getOutputType();
DataType targetOutputType = target.getOutputType();
- // Note the target output type is now the source for checking
- // compatibility
- if (!isCompatible(targetOutputType, sourceOutputType, remotable)) {
- return false;
- }
-
boolean checkSourceWrapper = true;
List<DataType> sourceInputType = source.getInputType().getLogical();
if (source.isWrapperStyle() && source.getWrapper() != null) {
sourceInputType = source.getWrapper().getUnwrappedInputType().getLogical();
+ sourceOutputType = source.getWrapper().getUnwrappedOutputType();
checkSourceWrapper = false;
}
boolean checkTargetWrapper = true;
List<DataType> targetInputType = target.getInputType().getLogical();
if (target.isWrapperStyle() && target.getWrapper() != null) {
targetInputType = target.getWrapper().getUnwrappedInputType().getLogical();
+ targetOutputType = target.getWrapper().getUnwrappedOutputType();
checkTargetWrapper = false;
}
if (checkSourceWrapper != checkTargetWrapper) {
return true;
}
+
+ if (!isCompatible(targetOutputType, sourceOutputType, remotable)) {
+ return false;
+ }
+
if (sourceInputType.size() != targetInputType.size()) {
return false;
}