summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties1
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java26
2 files changed, 15 insertions, 12 deletions
diff --git a/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
index 580b0861b1..01d050bb3c 100644
--- a/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
+++ b/otest/newlayout/tuscany-test-runner/src/test/resources/tuscany-oasis-sca-tests-errors.properties
@@ -72,6 +72,7 @@ ASM_8009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oas
ASM_8010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8010Component2, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite63] - Interface of composite service Service1 must be subset of the interface declared by promoted component service. Callback operation not found on target
ASM_8011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite62] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Callback operation not found on target
ASM_8012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8012Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite64] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference.
+ASM_8014=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent2, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Joe and {http://docs.oasis-open.org/ns/opencsa/sca/200912}confidentiality.transport are mutually exclusive
ASM_8017=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8017Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite72] - Interface of composite service Service1a must be subset of the interface declared by promoted component service. Callback interface doesn't match
ASM_8018=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestClient Service = TestInvocation
ASM_8019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8019, Artifact: Test_ASM_8019.composite] - The interface.wsdl interface {http://test.sca.oasisopen.org/}Service1 element can only have a remotable attribute with the value "true" as WSDL interface are assumed to be remotable by default. The value that was found is: false.
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
index 2a88a48c8c..9c4da518d7 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
@@ -105,10 +105,7 @@ public class CompositePolicyBuilderImpl extends ComponentPolicyBuilderImpl imple
}
for (Endpoint ep : componentService.getEndpoints()) {
- if (componentService.getInterfaceContract() != null) {
- // Inherit from the component.service.interface
- inherit(ep, null, true, componentService.getInterfaceContract().getInterface());
- }
+
// Inherit from binding
inherit(ep, null, true, ep.getBinding());
@@ -116,7 +113,12 @@ public class CompositePolicyBuilderImpl extends ComponentPolicyBuilderImpl imple
// Inherit from composite/component/service
inherit(ep, null, true, ep.getService(), ep.getComponent(), composite );
-
+ if (componentService.getInterfaceContract() != null) {
+ // Inherit from the component.service.interface
+ // Do not check mutual exclusion here.. interfaces do not follow normal rules
+ // of the structural hierarchy (Policy spec 4.10)
+ inherit(ep, null, false, componentService.getInterfaceContract().getInterface());
+ }
// Replace profile intents with their required intents
// Replace unqualified intents if there is a qualified intent in the list
@@ -159,19 +161,19 @@ public class CompositePolicyBuilderImpl extends ComponentPolicyBuilderImpl imple
}
for (EndpointReference epr : componentReference.getEndpointReferences()) {
-
- // Inherit from the component.reference.interface
- if (componentReference.getInterfaceContract() != null) {
- inherit(epr, null, true, componentReference.getInterfaceContract().getInterface());
- }
-
+
// Inherit from binding
inherit(epr, null, true, epr.getBinding());
// Inherit from composite/component/reference
inherit(epr, null, true, epr.getReference(), epr.getComponent(), composite);
-
+ // Inherit from the component.reference.interface
+ if (componentReference.getInterfaceContract() != null) {
+ // Do not check mutual exclusion here.. interfaces do not follow normal rules
+ // of the structural hierarchy (Policy spec 4.10)
+ inherit(epr, null, true, componentReference.getInterfaceContract().getInterface());
+ }
// Replace profile intents with their required intents
// Replace unqualified intents if there is a qualified intent in the list