2009/1/8 Shu Chao Wan <[email protected]> > > 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* CContainService*contains 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
Hi Susan I agree this looks like a fault to me. In these kinds of scenarios the composite level reference should not constrain the component level reference. I.e. The component reference may choose to exploit any of the methods defined in it's interface but the composite reference shouldn't restrict any of this behaviour. The composite reference may define extra methods however a particular component reference may never use them. I suggest you commit the test with a JIRA and we can use it to look into the problem. Regards Simon
