Re: XML save problem with static generated SDO classes

2007-07-16 Thread Daniel Peter
Hi Frank

I built this morning from the SVN head (was at revision 556544) in order to get 
the latest fixes, and generated the classes based on that.

Daniel.

- Ursprüngliche Mail 
Von: Frank Budinsky [EMAIL PROTECTED]
An: tuscany-user@ws.apache.org
Gesendet: Montag, den 16. Juli 2007, 15:18:28 Uhr
Betreff: Re: XML save problem with static generated SDO classes

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:
 
   namedept1/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]








  __ Wissenswertes zum Thema PC, Zubehör 
oder Programme. BE A BETTER INTERNET-GURU!  www.yahoo.de/clever

Re: XML save problem with static generated SDO classes

2007-07-16 Thread Frank Budinsky
Thanks Daniel. It sounds like I may have broken something with my latest 
fix. That's what you get for rushing :-)

I'll take a look and fix it, hopefully today.

We really need some good static test cases. You guys seem to be touching 
on a lot of function that has been exposing bugs in the generator. Is 
there any chance that you could contribute a test case that tests all the 
things that you've run into, so we could retry it whenever we change the 
generator? We could then continue to build on it over time to test new 
things that turn up.

Thanks, 
Frank




Daniel Peter [EMAIL PROTECTED] 
07/16/2007 10:26 AM
Please respond to
tuscany-user@ws.apache.org


To
tuscany-user@ws.apache.org
cc

Subject
Re: XML save problem with static generated SDO classes






Hi Frank

I built this morning from the SVN head (was at revision 556544) in order 
to get the latest fixes, and generated the classes based on that.

Daniel.

- Ursprüngliche Mail 
Von: Frank Budinsky [EMAIL PROTECTED]
An: tuscany-user@ws.apache.org
Gesendet: Montag, den 16. Juli 2007, 15:18:28 Uhr
Betreff: Re: XML save problem with static generated SDO classes

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:
 
   namedept1/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]








  __ Wissenswertes zum Thema PC, 
Zubehör oder Programme. BE A BETTER INTERNET-GURU!  www.yahoo.de/clever


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



Re: XML save problem with static generated SDO classes

2007-07-16 Thread Frank Budinsky
Daniel,

I just looked at it, and it turns out to be a bug in your XSD. You need to 
qualify references to types in the current schema.

The line that says:

  xsd:element name=Employees type=EmployeeType 

needs to be changed to this:

  xsd:element name=Employees type=tns:EmployeeType

The same problem is also on the global element declaration:

  xsd:element name=department type=DepartmentType/

It should be:

  xsd:element name=department type=tns:DepartmentType/

This is very common XSD error, that has been turning up a lot lately. 
Maybe we need to change the generator to throw an exception in this case. 
What it's currently doing is being tolerent of the error by mapping the 
unknown type to SDO type Object and continuing.

Frank

Frank Budinsky/Toronto/[EMAIL PROTECTED] wrote on 07/16/2007 11:12:33 AM:

 Thanks Daniel. It sounds like I may have broken something with my latest 

 fix. That's what you get for rushing :-)
 
 I'll take a look and fix it, hopefully today.
 
 We really need some good static test cases. You guys seem to be touching 

 on a lot of function that has been exposing bugs in the generator. Is 
 there any chance that you could contribute a test case that tests all 
the 
 things that you've run into, so we could retry it whenever we change the 

 generator? We could then continue to build on it over time to test new 
 things that turn up.
 
 Thanks, 
 Frank
 
 
 
 
 Daniel Peter [EMAIL PROTECTED] 
 07/16/2007 10:26 AM
 Please respond to
 tuscany-user@ws.apache.org
 
 
 To
 tuscany-user@ws.apache.org
 cc
 
 Subject
 Re: XML save problem with static generated SDO classes
 
 
 
 
 
 
 Hi Frank
 
 I built this morning from the SVN head (was at revision 556544) in order 

 to get the latest fixes, and generated the classes based on that.
 
 Daniel.
 
 - Ursprüngliche Mail 
 Von: Frank Budinsky [EMAIL PROTECTED]
 An: tuscany-user@ws.apache.org
 Gesendet: Montag, den 16. Juli 2007, 15:18:28 Uhr
 Betreff: Re: XML save problem with static generated SDO classes
 
 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:
  
namedept1/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]
 
 
 
 
 
 
 
 
   __ Wissenswertes zum Thema PC, 
 Zubehör oder Programme. BE A BETTER INTERNET-GURU!  www.yahoo.de/clever
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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