Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Java-SCA-2.x
-
None
Description
When I ran the otest for SCA 2.x, the ASM_5021_TestCase failed to pass.
It's testing the item [ASM50014]:
If @autowire="true", the autowire procedure MUST only be used
if no target is identified by any of the other ways listed above. It is
not an error if @autowire="true" and a target is also defined
through some other means, however in this case the autowire
procedure MUST NOT be used.
the composite is like :
<component name="TestComponent1">
<implementation.composite name="test:TestComposite7"/>
<service name="Service1">
<interface.wsdl interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property name="serviceName">service1</property>
<reference name="Reference1" autowire="true">
<interface.wsdl interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
<binding.sca uri="TestComponent3/Service1"/>
</reference>
</component>
<!-- This component is the target identified by the Component Type -->
<component name="TestComponent2">
<implementation.composite name="test:TestComposite1"/>
<service name="Service1">
<interface.wsdl interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property name="serviceName">service2</property>
</component>
<!-- This component is the target identified by the reference -->
<component name="TestComponent3">
<implementation.composite name="test:TestComposite1"/>
<service name="Service1">
<interface.wsdl interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property name="serviceName">service3</property>
</component>
From my test, the reference1 was wired to both TestComponent2 and TestComponent3.
The expected result is :
ASM_5021 request service1 operation1 invoked service3 operation1 invoked
but the actual result is :
ASM_5021 request service1 operation1 invoked service2 operation1 invoked service3 operation1 invoked