hi, guys,

I'm testing conformance item ASM60008, and found something strange.

In ASM60008, it says that "The interfaces of the component references 
promoted by a composite reference MUST be the same, or if the composite 
reference itself declares an interface then all the component reference 
interfaces must be compatible with the composite reference interface. 
Compatible means that the component reference interface is the same or is 
a strict subset of the composite reference interface."

In order to verify this statement, I wrote a composite file like that
<composite>...
 <service name="AService" promote="AComponent"/>
        <component name="AComponent">
                <implementation.java
                        class=
"org.apache.tuscany.sca.vtest.assembly.composite.impl.AServiceImpl" />
                <reference name="b"/>
                <reference name="c">
                        <interface.java interface="
org.apache.tuscany.sca.vtest.assembly.composite.CService" />
                </reference> 
        </component>
        <reference name="c" promote="AComponent/c">
                <interface.java interface="
org.apache.tuscany.sca.vtest.assembly.composite.CContainService" />
        </reference>
        <reference name="b" promote="AComponent/b"/> 
 <service>
</composite>

Here, the interface CService is subset of interface CContainService, that 
is to say, interface CContainServicecontains more methods than interface 
CService does.

But when I load this composite file, I got warning message:
WARNING: Interface of composite reference AComponent/c must be compatible 
with the interface declared by promoted component reference.
Jan 8, 2009 4:46:41 PM 
org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl
WARNING: Incompatible interfaces on component reference and target: 
Composite = 
{http://assembly-tests}Assembly-sub-reference-interface-outer-Composite 
Reference = c Service = CComponent

It seems that this warning message conflicts with this conformance item, 
which causes that service can not be invoked correctly in the following 
test. 

I'm not sure which statement should be the right one. Thanks for your 
help.



Best Regards
Susan Wan (万淑超)
-------------------------
WebSphere Application Server System Verification Test, IBM China SoftWare 
Development Lab
Tel: 86-10-82453655 
E-mail: [email protected] 
Address: 3/F, Diamond Building, ZhongGuanCun Software Park , Dongbeiwang 
West Road No.8, ShangDi, Haidian District, Beijing 100193, PRC

Reply via email to