Hi Daniel,

This seems like a very basic function that isn't working. What version of 
Tuscany are you using? I wonder if this has been broken, as a side effect 
of one of the recent generator changes? (we really need to get some static 
SDO regression tests into the build).

Please note that you need to regenerate you classes with the latest 
version of the generator, before running them.

Thanks,
Frank.

Daniel Peter <[EMAIL PROTECTED]> wrote on 07/16/2007 09:05:00 AM:

> I work with static generated SDO classes.
> When saving an object containing a list of nested objects to XML, 
> the nested objects are not correctly saved to XML.
> It looks like the toString method is called for the objects in the 
> nested list, insted of "xml save".
> 
> This is the sample output XML:
> 
>   <name>dept1</name>
>   <Employees>[EMAIL PROTECTED] (name: 
empl1)</Employees>
> </Output>
> 
> This is the corresponding xsd I used:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
>     targetNamespace="http://xyz.com";
>     xmlns:tns="http://xyz.com";
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>     <xsd:element name="department" type="DepartmentType"/>
>     <xsd:complexType name="DepartmentType">
>         <xsd:sequence>
>             <xsd:element name="name" type="xsd:string" />
>             <xsd:sequence>
>                 <xsd:element name="Employees" type="EmployeeType" 
> maxOccurs="unbounded"></xsd:element>
>             </xsd:sequence>
>         </xsd:sequence>
>     </xsd:complexType>
>     <xsd:complexType name="EmployeeType">
>         <xsd:sequence>
>             <xsd:element name="name" type="xsd:string" />
>         </xsd:sequence>
>     </xsd:complexType>
> </xsd:schema>
> 
> This is the test java code I used:
> 
>         DepartmentType d = XyzFactory.INSTANCE.createDepartmentType();
>         d.setName("dept1");
>         EmployeeType e = XyzFactory.INSTANCE.createEmployeeType();
>         e.setName("empl1");
>         d.getEmployees().add(e);
>         System.out.println(HelperProvider.getDefaultContext().
> getXMLHelper().save((DataObject)d, null, "Output"));
> 
> Thanks, 
> Daniel.
> 
> 
> 
> 
>       __________________________________  Alles was der Gesundheit 
> und Entspannung dient. BE A BETTER MEDIZINMANN! www.yahoo.de/clever

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to