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

Simon Laws commented on TUSCANY-3225:
-------------------------------------

I looked at this in a bit more detail...

Firstly the otest looks wrong to me. For the complex type defintion...

<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
    targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903";
    xmlns:test="http://docs.oasis-open.org/ns/opencsa/scatests/200903";
    xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903";
    elementFormDefault="qualified">

    <!-- A complex type -->
    <complexType name="ComplexType1">
                <sequence>
                <element name="firstData" type="string" />
                <element name="secondData" type="string" />
        </sequence>
    </complexType>

I would expect Test_ASM_5026.composite to contain

    <component name="TestComponent1">
                <implementation.composite name="test:TestComposite13"/>
        <service name="Service1">
                <interface.wsdl 
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
        </service>
        <property name="serviceName">service1</property>
        <!-- Property with complex type with a value declared using a 
subelement 
             with the correct XSD global element type -->
        <property name="complexType" element="test:globalElement1">
            <test:globalElement1>
                <test:firstData>complex1</test:firstData>
                <test:secondData>complex2</test:secondData>
            </test:globalElement1>
        </property>
    </component> 

Note that <test:firstData> etc are namespace qualified. This means that the 
source reference should look like...

    <component name="TestComposite13Component1">
                <implementation.composite name="test:TestComposite71"/>
        <service name="Service1">
                <interface.wsdl 
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
        </service>
        <property name="serviceName" source="$serviceName"/>
        <property name="serviceData1" source="$complexType/test:firstData"/>
        <property name="serviceData2" source="$complexType/test:secondData"/>
    </component>

Also need to check in the Tuscany code that we map $complexType to the correct 
root element. At the moment we just strip out the "value" element but don't 
make it a document element. 


> ASM_5026_TestCase failed to pass, it can't get the property value
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-3225
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3225
>             Project: Tuscany
>          Issue Type: Bug
>          Components: OASIS Compliance - TUSCANY
>    Affects Versions: Java-SCA-2.0
>            Reporter: Ku Jun Guo
>            Assignee: Simon Laws
>
> For the otest testcase 5026, it's used to test ASM50029, 
> If a component property value is declared using a child element of
> the <property/> element, the type of the property MUST be an
> XML Schema global element and the declared child element
> MUST be an instance of that global element.
> But the test result is :
> ASM_5026 request service1 operation1 invoked
> The expected is :
> ASM_5026 request service1 operation1 invokedcomplex1complex2
> It seems it failed to get the value from the following definition:
> <property name="complexType" element="test:globalElement1">
>             <test:globalElement1>
>               <firstData>complex1</firstData>
>               <secondData>complex2</secondData>
>             </test:globalElement1>
>         </property>

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