I have a JAXB class like this:
public class Game {
private Date startTime;
@XmlElement
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
}
which results in an .xsd
where startTime has type xsd:datetime
. I want it to be xsd:time
. xsd:time
maps to XmlGregorianCalendar
, but the reverse mapping maps to xsd:anySimpleType
which isn't very helpful.
I've tried various arguments to @XmlElement(type=...)
to no avail. Any pointers would be greatly appreciated.
If it makes a difference, this is a type used by JAX-WS.