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

Kelvin Goodson closed TUSCANY-304.
----------------------------------


> XML Helper serialization of Sequences - values appear twice
> -----------------------------------------------------------
>
>                 Key: TUSCANY-304
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-304
>             Project: Tuscany
>          Issue 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to