You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Geoff Winn (JIRA)" <tu...@ws.apache.org> on 2007/02/13 15:08:05 UTC

[jira] Resolved: (TUSCANY-980) DataObject assigned into open property goes missing

     [ https://issues.apache.org/jira/browse/TUSCANY-980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geoff Winn resolved TUSCANY-980.
--------------------------------

    Resolution: Fixed

Test added to check for correct operation across data types.

> DataObject assigned into open property goes missing
> ---------------------------------------------------
>
>                 Key: TUSCANY-980
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-980
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>            Reporter: Caroline Maynard
>             Fix For: Cpp-M3
>
>
> I have a schema like so:
> <schema  
>   xmlns="http://www.w3.org/2001/XMLSchema">
>   
>   <element name="jungle">
>     <complexType>
>       <sequence>
>         <any minOccurs="0" maxOccurs="unbounded"/>
>       </sequence>
>     </complexType>
>   </element>
>   
>   <element name="mixedJungle">
>     <complexType mixed="true">
>       <sequence>
>         <any minOccurs="0" maxOccurs="unbounded"/>
>       </sequence>
>     </complexType>
>   </element>
>   
> </schema>
> and another one like so:
> <schema xmlns="http://www.w3.org/2001/XMLSchema">
>    <complexType name="snakeType">
>      <sequence>
>        <element name= "name" type="string"/>
>        <element name= "length" type="positiveInteger" />
>      </sequence>
>    </complexType>
>    <complexType name="bearType">
>      <sequence>
>        <element name= "name" type="string"/>
>        <element name= "weight" type="positiveInteger" />
>      </sequence>
>    </complexType>
>    <complexType name="pantherType">
>      <sequence>
>        <element name= "name" type="string"/>
>        <element name= "colour" type="string" />
>      </sequence>
>    </complexType>
> </schema>
> Now suppose I load BOTH schemas into the same DataFactory, create a document with root type jungle, create some animal types and then assign them into the jungle. When I save the document, I see:
> <?xml version="1.0" encoding="UTF-8"?>
> <jungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>   <bear xsi:type="bearType">
>     <name>Baloo</name>
>     <weight>700</weight>
>   </bear>
>   <panther xsi:type="pantherType">
>     <name>Bagheera</name>
>     <colour>inky black</colour>
>   </panther>
>   <snake xsi:type="snakeType">
>     <name>Kaa</name>
>     <length>25</length>
>   </snake>
> </jungle>
> This is good.
> Now I change the example so that the two schemas are loaded into DIFFERENT Data Factories, and run the same test. The saved document is now:
> <?xml version="1.0" encoding="UTF-8"?>
> <jungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>   <bear xsi:type="bearType" name="Baloo" weight="700"/>
>   <panther xsi:type="pantherType" name="Bagheera" colour="inky black"/>
>   <snake xsi:type="snakeType" name="Kaa" length="25"/>
> </jungle>
> so the elements have turned into attributes. 
> Finally, I change the test so that the document root is a mixedJungle instead of a jungle, that is, it is sequenced. No errors are reported, but my document comes out as:
> <?xml version="1.0" encoding="UTF-8"?>
> <mixedJungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
> Now the animals are completely missing. The outcome is the same regardless of whether I use one or two data factories, btw. 
> I am at revision 483149, so should have all the latest fixes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org