WSImport generates XMLGregorianCalendar instead of Date

I am creating a SOAP web service, but came across the following problem, my DRO class looks like this, but when I create a service client for testing, in the generated classes with WSImport, the generated property type becomes XMLGregorianCalendar, how can I tell WSImport not to change the type data?

@XmlRootElement(name = "players")
public class Players {
    List<Player> player;
    Date generated;

    @XmlAttribute
    @XmlSchemaType(name = "date")
    public Date getGenerated(){
        return this.generated;
    }

    public void setGenerated(Date value){
        this.generated = value;
    }

    @XmlElement
    public List<Player> getPlayer() {
        return this.player;
    }

    public void setPlayer(List<Player> value) {
        this.player = value;
    }
}

      

EDIT My current solution is based on this thread I wonder if there are any other ways?

+3


source to share





All Articles