You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Caroline Maynard (JIRA)" <tu...@ws.apache.org> on 2006/12/07 13:05:21 UTC

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

DataObject assigned into open property goes missing
---------------------------------------------------

                 Key: TUSCANY-980
                 URL: http://issues.apache.org/jira/browse/TUSCANY-980
             Project: Tuscany
          Issue Type: Bug
          Components: C++ SDO
    Affects Versions: Cpp-current
            Reporter: Caroline Maynard


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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


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

Posted by "Caroline Maynard (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Caroline Maynard closed TUSCANY-980.
------------------------------------


> 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


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

Posted by "Geoff Winn (JIRA)" <tu...@ws.apache.org>.
     [ 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


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

Posted by "Geoff Winn (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472601 ] 

Geoff Winn commented on TUSCANY-980:
------------------------------------

I've just checked in some changes to sequence handling that fixes the case where a mixedJungle element appears to have no content, along with a test to demonstrate this (revision 506932).

Built and tested on XP and Linux.

> 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