Hello
I'm new to Castor and I was trying to use it for marshalling javabeans to XML
easily.
It all works fine except, it seems, when a field is a JDK 1.5 enum:
public class User {
String getName();
RefDataState getState();
..
where RefDataState is:
public enum RefDataState implements CodeEnum {
ACTIVE("ACT"),
INACTIVE("INA");
private String code;
private RefDataState(final String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
// the setXXX method also exist.
and CodeEnum:
public interface CodeEnum {
String getCode();
}
The xml generated by the most basic use of castor:
LocalConfiguration.getInstance().getProperties().setProperty("org.exolab.castor.indent",
"true");
Marshaller.marshal(user, new FileWriter("castor-user.xml"));
is as follows:
<user>
<name>....</name>
</user>
There is NO <state> element... WHY?
Many thanks for your help,
Let me know if you need more info.
Regards from London
Benoit
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------