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 2006/05/05 12:29:27 UTC
[jira] Created: (TUSCANY-304) XML Helper serialization of Sequences
- values appear twice
XML Helper serialization of Sequences - values appear twice
-----------------------------------------------------------
Key: TUSCANY-304
URL: http://issues.apache.org/jira/browse/TUSCANY-304
Project: Tuscany
Type: Bug
Components: Java SDO Implementation
Environment: windows, sun java 5 jre
Reporter: Kelvin Goodson
For a class generated from the following schema
<xsd:complexType name="RepeatingChoice">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="a" type="xsd:string" />
<xsd:element name="b" type="xsd:int" />
</xsd:choice>
</xsd:complexType>
the following snippet ...
RepeatingChoice rc = SequenceFactory.INSTANCE.createRepeatingChoice();
List as = rc.getA();
List bs = rc.getB();
bs.add(new Integer(1));
as.add("foo");
as.add("bar");
bs.add(new Integer(2));
XMLHelper.INSTANCE.save((DataObject)rc, TEST_NAMESPACE, "rc", baos);
generates ...
<?xml version="1.0" encoding="ASCII"?>
<sequences:rc xmlns:sequences="http://www.example.com/sequences">
<b>1</b>
<a>foo</a>
<a>bar</a>
<b>2</b>
<a>foo</a>
<a>bar</a>
<b>1</b>
<b>2</b>
</sequences:rc>
So it seems both the Sequence and the a and b properties which delegate to the Sequence are being serialized.
--
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
[jira] Resolved: (TUSCANY-304) XML Helper serialization of
Sequences - values appear twice
Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-304?page=all ]
Frank Budinsky resolved TUSCANY-304:
------------------------------------
Resolution: Invalid
I can't reproduce the problem, so I'm assuming it's only a bug with the -noEMF generator option that you're working on.
Make sure that the underlying EAttributes for "a" and "b" are generated as "volatile", "transient", and "derived". From the symptom you describe, I suspect they're not in your case.
Frank.
> XML Helper serialization of Sequences - values appear twice
> -----------------------------------------------------------
>
> Key: TUSCANY-304
> URL: http://issues.apache.org/jira/browse/TUSCANY-304
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Environment: windows, sun java 5 jre
> Reporter: Kelvin Goodson
>
> For a class generated from the following schema
> <xsd:complexType name="RepeatingChoice">
> <xsd:choice maxOccurs="unbounded" minOccurs="0">
> <xsd:element name="a" type="xsd:string" />
> <xsd:element name="b" type="xsd:int" />
> </xsd:choice>
> </xsd:complexType>
> the following snippet ...
> RepeatingChoice rc = SequenceFactory.INSTANCE.createRepeatingChoice();
>
> List as = rc.getA();
> List bs = rc.getB();
>
> bs.add(new Integer(1));
> as.add("foo");
> as.add("bar");
> bs.add(new Integer(2));
> XMLHelper.INSTANCE.save((DataObject)rc, TEST_NAMESPACE, "rc", baos);
> generates ...
> <?xml version="1.0" encoding="ASCII"?>
> <sequences:rc xmlns:sequences="http://www.example.com/sequences">
> <b>1</b>
> <a>foo</a>
> <a>bar</a>
> <b>2</b>
> <a>foo</a>
> <a>bar</a>
> <b>1</b>
> <b>2</b>
> </sequences:rc>
> So it seems both the Sequence and the a and b properties which delegate to the Sequence are being serialized.
--
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