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

[jira] Closed: (TUSCANY-1540) Abstract Static Base Types mixed with Dynamic Extended Types

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

Kelvin Goodson closed TUSCANY-1540.
-----------------------------------

    Resolution: Fixed

tests from patch added to the new toolsTest project 

> Abstract Static Base Types mixed with Dynamic Extended Types
> ------------------------------------------------------------
>
>                 Key: TUSCANY-1540
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1540
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-1.0
>            Reporter: Murtaza Goga
>             Fix For: Java-SDO-Next
>
>         Attachments: TUSCANY-1540-TestCases.patch
>
>
> Setting a property on a static data object with an object of a type extended in a dynamic model results in a ClassCastException.
> Scenario:
> Static schema-
>   <xsd:complexType name="CustomerType">
>     <xsd:all>
>       <xsd:element name="number" type="xsd:integer" />
>       <xsd:element form="unqualified" name="info" type="InfoType" />
>     </xsd:all>
>   </xsd:complexType>
> 	
>   <xsd:complexType name="InfoType" abstract="true"/>
> Dynamic Schema
> <xsd:complexType name="InfoType">
>   <xsd:complexContent>
>     <xsd:extension base="staticNS:InfoType">
>       <xsd:sequence>
>         <xsd:element name="zipcode" type="xsd:string" />
>       </xsd:sequence>
>     </xsd:extension>
>   </xsd:complexContent>
> </xsd:complexType>
> The following will fail:
> DataFactory factory = scope.getDataFactory();
> factory.create(CustomerType.class).setDataObject("info", factory.create("dynamicNS", "InfoType"));
> It should be legal to assign a property to an object if they are in the same hierachy.
> Steps to reproduce within Tuscany:
> Testcase org.apache.tuscany.sdo.test.ExtensibleTestCase will break if 'InfoType' defined in extensible/customer.xsd  is marked as abstract.

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