Details

      Description

      Index: Contribution1/src/main/resources/TestComposite5.composite
      ===================================================================
      — Contribution1/src/main/resources/TestComposite5.composite (revision 372)
      +++ Contribution1/src/main/resources/TestComposite5.composite (working copy)
      @@ -15,18 +15,18 @@
      xmlns:test="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
      name="TestComposite5">

      • <service name="Service1" promote="TestComponent1/Service1">
      • <interface.wsdl interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
        + <service name="Service1" promote="TestComponent1/Service1">
        + <interface.java interface="org.oasisopen.sca.test.Service1"></interface.java>
        </service>

      <property name="serviceName" type="string"/>

      <component name="TestComponent1">

      • <implementation.composite name="test:TestComposite5"/>
        + <implementation.java class="org.oasisopen.sca.test.service1Impl"/>
        <service name="Service1">
      • <interface.wsdl interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
        + <interface.java interface="org.oasisopen.sca.test.Service1"></interface.java>
        </service>
      • <property name="serviceName">servicex</property>
        + <property name="serviceName" source="$serviceName"/>
        </component>

      </composite>

        Activity

        Hide
        Mike Edwards added a comment -

        First, when logging a JIRA for any of the OASIS tests can you PLEASE describe the problem. Just posting a list of fixes tells very little - the failure MAY be a result of Tuscany doing something wrong, not the testcase.

        Second, these changes are unacceptable. TestComposite5.composite in Contribution1 is design to be "language independent" - that is, it must not contain references to any artifacts that are specific to an implementation language. So any implementation must be a composite and any interface must be a WSDL. Replacing interface.wsdl with interface.java violates this principle. So does replacing implementation.composite with implementation.java.

        The final proposed change of the value for the property makes no sense to me - the fixed value originally present was intended to uniquely identify this composite from other versions of the same composite that exist in the test suite and which might get used if the runtime has contribution resolution mechanisms that violate the spec.

        When I run this test against the latest code, the test fails. The failure reported by Tuscany is:

        "Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1" in TestComposite5.composite

        Let's pick the bones out of this error.

        ASM_12005_TestCase specifies that the following Contributions are used in conjunction with the root composite Test_ASM_12005.composite:

        "ASM_12005", "Contribution1", "General", "General" + _Lang

        which means when running with Java as the language:

        "ASM_12005", "Contribution1", "General", "General_Java

        Looking at contribution ASM_12005

        Test_ASM_12005.composite has a component TestComponent1 that has as implementation "test2:TestComposite5" where the test2 namespace is the "2nd" composites namespace for the test suite, ie.

        xmlns:test2="http://docs.oasis-open.org/ns/opencsa/scatests/2009032"

        The sca-contribution.xml file for contribution ASM_12005 has:

        <import namespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"/>
        <import namespace="http://docs.oasis-open.org/ns/opencsa/scatests/2009032" location="Contribution1"/>
        <import namespace="http://test.sca.oasisopen.org/"/> <!-- WSDL namespace -->

        ...note that there is a specific import for the "test2" namespace explicitly from the "Contribution1" contribution, which is the nub of the test.

        OK, so let's turn our attention to contribution Contribution1. It contains TestComposite5.composite, which is declared in the "test2" namespace, but which in turn uses a) the main "test" namespace for an implementation.composite and b) WSDLs for the interfaces it declares (Service1 in both cases).

        The sca-contribution.xml in Contribution1 is like this:

        <import namespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"/> <!-- Composites -->
        <import namespace="http://test.sca.oasisopen.org/"/> <!-- WSDL files -->
        <export namespace="http://docs.oasis-open.org/ns/opencsa/scatests/2009032"/> <!-- Composites 2nd namespace -->

        ...so here, "test2" is being exported, but "test" and the WSDL namespace are being imported - the design is that these namespaces will resolve to General and General_Java

        So far, so good. Where does the reference to "test:TestComposite5" resolve?

        Looking in contribution "General", there is no TestComposite5.composite in the "test" namespace.
        Looking in contribution "General_Java", there is a TestComposite5.composite in the "test" namespace.

        Looking at TestComposite5.composite in "General_Java", it offers a service called "Service1" but which offers the service interface:

        <interface.java interface="org.oasisopen.sca.test.Service2"/>

        Note that this is Service2 NOT Service1

        So the real error is that composite TestComposite5.composite in Contribution1 wants an interface Service1 while the TestComposite5.composite it uses from General_Java has an interface Service2. These two interfaces are by design incompatible and as a result, we correctly get the error that Tuscany gives for this testcase as currently laid out....

        I'll post separately for a fix....

        Show
        Mike Edwards added a comment - First, when logging a JIRA for any of the OASIS tests can you PLEASE describe the problem. Just posting a list of fixes tells very little - the failure MAY be a result of Tuscany doing something wrong, not the testcase. Second, these changes are unacceptable. TestComposite5.composite in Contribution1 is design to be "language independent" - that is, it must not contain references to any artifacts that are specific to an implementation language. So any implementation must be a composite and any interface must be a WSDL. Replacing interface.wsdl with interface.java violates this principle. So does replacing implementation.composite with implementation.java. The final proposed change of the value for the property makes no sense to me - the fixed value originally present was intended to uniquely identify this composite from other versions of the same composite that exist in the test suite and which might get used if the runtime has contribution resolution mechanisms that violate the spec. When I run this test against the latest code, the test fails. The failure reported by Tuscany is: "Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1" in TestComposite5.composite Let's pick the bones out of this error. ASM_12005_TestCase specifies that the following Contributions are used in conjunction with the root composite Test_ASM_12005.composite: "ASM_12005", "Contribution1", "General", "General" + _Lang which means when running with Java as the language: "ASM_12005", "Contribution1", "General", "General_Java Looking at contribution ASM_12005 Test_ASM_12005.composite has a component TestComponent1 that has as implementation "test2:TestComposite5" where the test2 namespace is the "2nd" composites namespace for the test suite, ie. xmlns:test2="http://docs.oasis-open.org/ns/opencsa/scatests/2009032" The sca-contribution.xml file for contribution ASM_12005 has: <import namespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"/> <import namespace="http://docs.oasis-open.org/ns/opencsa/scatests/2009032" location="Contribution1"/> <import namespace="http://test.sca.oasisopen.org/"/> <!-- WSDL namespace --> ...note that there is a specific import for the "test2" namespace explicitly from the "Contribution1" contribution, which is the nub of the test. OK, so let's turn our attention to contribution Contribution1. It contains TestComposite5.composite, which is declared in the "test2" namespace, but which in turn uses a) the main "test" namespace for an implementation.composite and b) WSDLs for the interfaces it declares (Service1 in both cases). The sca-contribution.xml in Contribution1 is like this: <import namespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"/> <!-- Composites --> <import namespace="http://test.sca.oasisopen.org/"/> <!-- WSDL files --> <export namespace="http://docs.oasis-open.org/ns/opencsa/scatests/2009032"/> <!-- Composites 2nd namespace --> ...so here, "test2" is being exported, but "test" and the WSDL namespace are being imported - the design is that these namespaces will resolve to General and General_Java So far, so good. Where does the reference to "test:TestComposite5" resolve? Looking in contribution "General", there is no TestComposite5.composite in the "test" namespace. Looking in contribution "General_Java", there is a TestComposite5.composite in the "test" namespace. Looking at TestComposite5.composite in "General_Java", it offers a service called "Service1" but which offers the service interface: <interface.java interface="org.oasisopen.sca.test.Service2"/> Note that this is Service2 NOT Service1 So the real error is that composite TestComposite5.composite in Contribution1 wants an interface Service1 while the TestComposite5.composite it uses from General_Java has an interface Service2. These two interfaces are by design incompatible and as a result, we correctly get the error that Tuscany gives for this testcase as currently laid out.... I'll post separately for a fix....
        Hide
        Mike Edwards added a comment -

        The correct fix for the problem with ASM_12005_TestCase is that TestComposite5.composite in contribution Contribution1 needs to have an implementation.composite that offers a service Service1 with an interface typed by the Service1 interface.

        TestComposite1.composite in General_xxxx (eg General_Java) offers exactly this interface.

        So the required change in TestComposite5.composite is:

        • <implementation.composite name="test:TestComposite5"/>
          + <implementation.composite name="test:TestComposite1"/>

        I've done this in the OASIS SVN now.

        Show
        Mike Edwards added a comment - The correct fix for the problem with ASM_12005_TestCase is that TestComposite5.composite in contribution Contribution1 needs to have an implementation.composite that offers a service Service1 with an interface typed by the Service1 interface. TestComposite1.composite in General_xxxx (eg General_Java) offers exactly this interface. So the required change in TestComposite5.composite is: <implementation.composite name="test:TestComposite5"/> + <implementation.composite name="test:TestComposite1"/> I've done this in the OASIS SVN now.
        Hide
        Mike Edwards added a comment -

        Fixed in revision 373 in the OASIS Assembly SVN repository

        Show
        Mike Edwards added a comment - Fixed in revision 373 in the OASIS Assembly SVN repository

          People

          • Assignee:
            Unassigned
            Reporter:
            Ramkumar Ramalingam
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development