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

Yang ZHONG updated TUSCANY-447:
-------------------------------

    Attachment: fidelity.xsd
                fidelity.xml

XML isn't correctly loaded, although attribute 
"AttributeWithSDOPropertySDOOppositePropertyType" model may have a problem 
since oppositeProperty doesn't exist within propertyType.

In addition, XMLHelper#save should have used 
XSDHelper#getLocalName/getNamespaceURI(spec 2.1) for Property 
"AttributeWithSDONameSDOName".

"fidelity.xsd" and "fidelity.xml" are attached for the following Test Case.

int sdotest::testFidelity()
{
   DataFactoryPtr mdg  = DataFactory::getDataFactory();

   XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
   xsh->defineFile("fidelity.xsd");
   XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
   XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("fidelity.xml");
   DataObjectPtr root = myXMLDocument->getRootDataObject();
   DataObjectPtr attributes = root->getDataObject("ComplexTypeAttributesTest");
   const char* p = attributes->getCString("AttributeWithSDOPropertyType");
   if(strcmp(p, "idvalue0"))
       return 0;
   p = 
attributes->getCString("AttributeWithSDOPropertySDOOppositePropertyType");
   if(strcmp(p, "idvalue0"))
       return 0;

   return 1;
}

> AttributeWithSDOPropertyType and 
> AttributeWithSDOPropertySDOOppositePropertyType not supported
> ----------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-447
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-447
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>         Environment: Windows XP
>            Reporter: Simon Laws
>             Fix For: Cpp-current
>
>         Attachments: fidelity.xml, fidelity.xsd
>
>
> reading 
>   <ComplexTypeAttributesTest Attribute="Attribute" 
>                              
> AttributeWithDefaultValue="AttributeWithDefaultValueDefaultValue" 
>                              
> AttributeWithFixedValue="AttributeWithFixedValueFixedValue" 
>                              
> AttributeWithSDOAliasName="AttributeWithSDOAliasName" 
>                              
> AttributeWithSDODataType="AttributeWithSDODataType" 
>                              AttributeWithSDOName="AttributeWithSDODataType" 
>                              
> AttributeWithSDOPropertySDOOppositePropertyType="idvalue0" 
>                              AttributeWithSDOPropertyType="idvalue0" 
>                              AttributeWithSDOString="AttributeWithSDOString" 
>                              tns:AttributeReference="AttributeReference"
> and writing out again gives rise to 
>       <ComplexTypeAttributesTest Attribute="Attribute"
>               AttributeWithSDONameSDOName="AttributeWithSDODataType"
>               AttributeWithSDOAliasName="AttributeWithSDOAliasName"
>               
> AttributeWithDefaultValue="AttributeWithDefaultValueDefaultValue"
>               AttributeWithFixedValue="AttributeWithFixedValueFixedValue"
>               AttributeReference="AttributeReference"
>               AttributeWithSDOString="AttributeWithSDOString"
>               AttributeWithSDODataType="AttributeWithSDODataType" />

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to