From 19630f55f88287cae7fbdec2e3bf26b55e2c4f45 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 27 May 2009 00:57:57 +0000 Subject: Add checking for wrapper style git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@778941 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/interfacedef/impl/InterfaceContractMapperImpl.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'java/sca/modules') 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 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 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; } -- cgit v1.2.3