Skip to main content

Some examples of how to annotate XmlAccessorOrder ?

4 replies [Last post]
amarkel
Offline
Joined: 2004-05-13

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
amarkel
Offline
Joined: 2004-05-13

Apologies, the overridden names were picked up.

The definitions of the XmlType needed to be the
non-overridden names.

Arieh

amarkel
Offline
Joined: 2004-05-13

I did what Sekhar recommended.

However, I am performing 'overrides' of the tag names
relative to the get/set names.

The XmlType does not pick that up.

Arieh

amarkel
Offline
Joined: 2004-05-13

Just to clarify.

What I want to do is to be specific with regards to the
order in which entities are declared in the schema.

For example:

I want to define an 'foo' statement
and would like that the schema orders it first among the
tags.

Arieh

sekhar
Offline
Joined: 2003-06-25

@XmlAccessorOrder can't be used to control specific ordering of properties/fields within a class. For that you need to use @XmlType.propOrder. See javadocs for javax.xml.bind.annotation.XmlType for an example that shows the ordering of properties.