commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Jordanov" <>
Subject RE: Problem: BeanWriter not enforcing the element list order inBetwixt
Date Thu, 23 Mar 2006 12:38:36 GMT
Hi Robert,

You were right! Creating another betwixt file for the listItem object
solved the problem! So simple and elegant!

Thank you very much,

Nikolay Jordanov - Consultant
t +44 (0) 1483 816325 | m +44 (0) 7738397002
a Detica | Surrey Research Park | Guildford | GU2 7YP | UK

-----Original Message-----
From: robert burrell donkin
Sent: 22 March 2006 22:52
To: Jakarta Commons Users List
Subject: Re: Problem: BeanWriter not enforcing the element list order

On Tue, 2006-03-21 at 20:24 +0000, Nikolay Jordanov wrote:
> Hi,

hi Nikolay

> I am using a betwixt file to describe how to convert a Java complex 
> type POJO (containing lists of other objects contained in ArrayLists) 
> into XML. I need to ensure that the order of all attributes is 
> preserved in the XML, as it must conform to a rigid XSD.
> BeanWriter enforces the order in all of the component objects within 
> the top level POJO objects correctly, as defined in the betwixt config

> file, but when it comes to elements contained in a List object, they 
> are rendered in the resulting XML in alphabetical order, instead of in

> the order described in the betwixt file.
> Is this an issue with betwixt's handling of Lists, or am I missing a 
> crucial piece of configuration?

i'm not 100% sure: it's a lot easier for me if you can provide a test
case. it means that i can just import the source, run the test and see
exactly what's not right. it also allows me to verify directly whether
the problem has already been fixed.

i think that your problem is that you need to create separate dot
betwixt files for GetCTNHistoryResponse and GCTNHRespHistoryListItem. 

- robert

To unsubscribe, e-mail:
For additional commands, e-mail:

This message should be regarded as confidential. If you have received this email in error
please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by an authorised
signatory.  The contents of this email may relate to dealings with other companies within
the Detica Group plc group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message