tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Edwards (JIRA)" <...@tuscany.apache.org>
Subject [jira] Commented: (TUSCANY-3362) Fixes needed to make ASM_12005 work
Date Thu, 05 Nov 2009 08:51:41 GMT

    [ https://issues.apache.org/jira/browse/TUSCANY-3362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773837#action_12773837
] 

Mike Edwards commented on TUSCANY-3362:
---------------------------------------

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....

> Fixes needed to make ASM_12005 work
> -----------------------------------
>
>                 Key: TUSCANY-3362
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3362
>             Project: Tuscany
>          Issue Type: Bug
>          Components: OASIS Compliance - OASIS
>    Affects Versions: Java-SCA-2.0
>            Reporter: Ramkumar Ramalingam
>             Fix For: Java-SCA-2.0
>
>
> 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>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message