You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Richard Mah (JIRA)" <de...@tuscany.apache.org> on 2008/08/11 22:32:44 UTC

[jira] Updated: (TUSCANY-2538) Tuscany object model does not handle unknown content in composite files.

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

Richard Mah updated TUSCANY-2538:
---------------------------------

    Attachment: MyComposite.composite

Hi Simon,

I've attached a simple composite file with a few "unknown content".  Below is the text of the composite file:
----------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
	name="MyComposite" targetNamespace="http://MyComposite.com">
	<reference name="reference" unknownAttribute="attrValue" />
	<component name="component" />
	<unknownElement unknownAttr="attrValue2">
		<subUnknownElement subUnknownElement="attrValue3" />
	</unknownElement>
</composite>
----------------------------------------------------------------------------------------------------------------------
The following content will be lost when the compostie file is loaded and written back to file:
1)On the Reference Element, the attribute:
                unknownAttribute="attrValue"

2)The entire child and subchild of the Composite Element:
                	<unknownElement unknownAttr="attrValue2">
		<subUnknownElement subUnknownElement="attrValue3" />
	</unknownElement>

Thanks Simon.

> Tuscany object model does not handle unknown content in composite files.
> ------------------------------------------------------------------------
>
>                 Key: TUSCANY-2538
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2538
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>            Reporter: Richard Mah
>         Attachments: MyComposite.composite
>
>
> Tuscany object model does not handle unknown content in composite files.
> Unknown content in composite files are not persisted when the Tuscany model is loaded.  As a result, the unknown content is lost when I write the composite back to file.
> As an example, say I don't include the Tuscany models which model EJB bindings.  If I load a composite file which contains EJB bindings and write it back to file, I lose all of my EJB bindings.  In this example, there's no expectation to work with the EJB bindings via the Tuscany model in a "first class way".  Perhaps some generic get/set/edit methods but at the very least, persist the content of the EJB bindings in the Tuscany model and write them back out to file.

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


Re: [jira] Updated: (TUSCANY-2538) Tuscany object model does not handle unknown content in composite files.

Posted by Raymond Feng <en...@gmail.com>.
I guess we can add a generic UnknownElementStaxProcessor to read the unknown 
element into DOM (or AXIOM) and add it to the getExtensions() list. The 
unknown elements/attributes will be only valid where <xsd:any> or 
<xsd:anyAttribute> is declared in the XSD for SCDLs.

Thanks,
Raymond
--------------------------------------------------
From: "Richard Mah (JIRA)" <de...@tuscany.apache.org>
Sent: Monday, August 11, 2008 1:32 PM
To: <de...@tuscany.apache.org>
Subject: [jira] Updated: (TUSCANY-2538) Tuscany object model does not handle 
unknown content in composite files.

>
>     [ 
> https://issues.apache.org/jira/browse/TUSCANY-2538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Richard Mah updated TUSCANY-2538:
> ---------------------------------
>
>    Attachment: MyComposite.composite
>
> Hi Simon,
>
> I've attached a simple composite file with a few "unknown content".  Below 
> is the text of the composite file:
> ----------------------------------------------------------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> name="MyComposite" targetNamespace="http://MyComposite.com">
> <reference name="reference" unknownAttribute="attrValue" />
> <component name="component" />
> <unknownElement unknownAttr="attrValue2">
> <subUnknownElement subUnknownElement="attrValue3" />
> </unknownElement>
> </composite>
> ----------------------------------------------------------------------------------------------------------------------
> The following content will be lost when the compostie file is loaded and 
> written back to file:
> 1)On the Reference Element, the attribute:
>                unknownAttribute="attrValue"
>
> 2)The entire child and subchild of the Composite Element:
>                <unknownElement unknownAttr="attrValue2">
> <subUnknownElement subUnknownElement="attrValue3" />
> </unknownElement>
>
> Thanks Simon.
>
>> Tuscany object model does not handle unknown content in composite files.
>> ------------------------------------------------------------------------
>>
>>                 Key: TUSCANY-2538
>>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2538
>>             Project: Tuscany
>>          Issue Type: Bug
>>          Components: Java SCA Assembly Model
>>            Reporter: Richard Mah
>>         Attachments: MyComposite.composite
>>
>>
>> Tuscany object model does not handle unknown content in composite files.
>> Unknown content in composite files are not persisted when the Tuscany 
>> model is loaded.  As a result, the unknown content is lost when I write 
>> the composite back to file.
>> As an example, say I don't include the Tuscany models which model EJB 
>> bindings.  If I load a composite file which contains EJB bindings and 
>> write it back to file, I lose all of my EJB bindings.  In this example, 
>> there's no expectation to work with the EJB bindings via the Tuscany 
>> model in a "first class way".  Perhaps some generic get/set/edit methods 
>> but at the very least, persist the content of the EJB bindings in the 
>> Tuscany model and write them back out to file.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>