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

Dan Becker commented on TUSCANY-2898:
-------------------------------------

I just started debugging on this one. Some preliminary information. It appears 
the complex data is being read correctly. I see the complex data type 
"ComplexType1" elements and values being read correctly. However, it seems the 
CompositeProcessor loses its state when getting the END_ELEMENTs. This is very 
tricky to debug because some processors read and process the end elements while 
others do not.

> SCA 1.x failed to get the property value for the complex type
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2898
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2898
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.3.1
>            Reporter: Ku Jun Guo
>            Assignee: Dan Becker
>
> When I ran the stest case for SCA 1.x, I found it failed
> <!-- Tests that where a <component/> <property/> has its value set by means 
>      of a child <value/> element, that the type of the <value/> element 
> matches 
>      the type declared for the <property/> element   -->
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
>            targetNamespace="http://oasis/tests";
>            xmlns:tns="http://oasis/tests";
>            xmlns:test="http://oasis/tests";
>            name="TEST_ASM_0025">
>            
>     <component name="TestClient">
>               <implementation.composite name="tns:TestClient_0002"/>
>               <service name="TestInvocation">
>                       <interface.java interface="test.TestInvocation"/>
>             <binding.ws/>
>               </service>
>         <reference name="reference1" target="TestComponent1/Service1" />
>         <property name="testName">ASM_0025</property>
>     </component>
>     
>     <component name="TestComponent1">
>               <implementation.composite name="tns:TestComposite12"/>
>         <service name="Service1">
>               <interface.java interface="test.Service1"/>
>         </service>
>         <property name="serviceName">service1</property>
>         <!-- Property with complex type with a value declared using a 
> <value/> subelement -->
>         <property name="complexType" type="test:ComplexType1">
>           <ComplexType1Value type="test:ComplexType1">
>               <test:firstData>complex1</test:firstData>
>               <test:secondData>complex2</test:secondData>
>             </ComplexType1Value>
>             
>         <!--
>             <value>
>               <firstData>complex1</firstData>
>               <secondData>complex2</secondData>
>             </value>
>             -->
>         </property>
>     </component> 
>     
> </composite>
> TestComposite12.composite:: 
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
>            targetNamespace="http://oasis/tests";            
>            xmlns:test="http://oasis/tests";
>            name="TestComposite12">
>            
>       <service name="Service1" promote="TestComponent1/Service1">
>               <interface.java interface="test.Service1"></interface.java>
>       </service>
>     <property name="serviceName" type="string"/>
>     
>     <property name="complexType" type="test:ComplexType1"/>
>  
>     <component name="TestComponent1">
>               <implementation.java class="test.service1Impl5"/>
>         <service name="Service1">
>               <interface.java interface="test.Service1"/>
>         </service>
>         <property name="serviceName" source="$serviceName"/>
>         <property name="serviceData1" source="$complexType/firstData"/>
>         <property name="serviceData2" source="$complexType/secondData"/>
>     </component>
> </composite>
> service1Impl5.java :
> @Service(Service1.class)
> public class service1Impl5 implements Service1 {
>       
>       @Property
>       public String serviceName = "service1";
>       @Property
>       public String serviceData1;
>       @Property
>       public String serviceData2;
>       public String operation1(String input) {
>               return serviceName + " operation1 invoked" + serviceData1 + 
> serviceData2;
>       }
> }
> Test_Types.xsd:
> <schema xmlns="http://www.w3.org/2001/XMLSchema"; 
>     targetNamespace="http://oasis/tests";
>     xmlns:test="http://oasis/tests";
>     xmlns:sca="http://www.osoa.org/xmlns/sca/1.0";
>     elementFormDefault="qualified">
>     <!-- A complex type -->
>     <complexType name="ComplexType1">
>           <element name="firstData" type="string" />
>         <element name="secondData" type="string" />
>     </complexType>
>     
>     <!-- A global element with a complex type -->
>     <element name="globalElement1" type="test:ComplexType1"/>
>        
> </schema>
> Anything wrong with my artifacts?

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

Reply via email to