You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <tu...@ws.apache.org> on 2006/10/19 11:36:36 UTC

[jira] Updated: (TUSCANY-873) CopyHelper::copy fails when the data object being copied contains open content

     [ http://issues.apache.org/jira/browse/TUSCANY-873?page=all ]

Simon Laws updated TUSCANY-873:
-------------------------------

    Attachment: sdoclone.txt

apply to commonj/sdo

> CopyHelper::copy fails when the data object being copied contains open content
> ------------------------------------------------------------------------------
>
>                 Key: TUSCANY-873
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-873
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-M2
>         Environment: Windows XP
>            Reporter: Simon Laws
>         Attachments: sdoclone.txt
>
>
> With schemafree.xsd : 
> <schema xmlns="http://www.w3.org/2001/XMLSchema" 
>         targetNamespace="GenericNS" 
>         xmlns:tns="GenericNS">
>     
>     <complexType name="GenericType">
>         <sequence>
>             <any namespace="##any"/>
>         </sequence>
>     </complexType>
>         
>  </schema>
> And a C++ app that uses SDO as follows:
>         DataFactoryPtr mdg  = DataFactory::getDataFactory();
>         XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg);
>        myXSDHelper->defineFile("schemafree.xsd");
>         XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
>         DataObjectPtr root = mdg->create("GenericNS", "GenericType");       
>         root->setInteger("mystring", 12);
>        DataObjectPtr rootCopy = CopyHelper::copy(root);
> The app fails at the last line with:
>       Cannot find property:mystring
> This is failing because  CopyHelper::copy() uses DataObjectImpl::set???(Property&, value) to copy primitive types.  The first thing that this does is get the index of the property as it exists on the target data object of the copy. Of course the property doesn't exist because the property is added as an open property, i.e. in a place where open properties are allowed. The fix is to create a new internal method that creates a new open property in this situation. 
> I'm looking at this now so hope to propose a patch in due course. 

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