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
java soap web-services


source to share


No one has answered this question yet

See similar questions:

12
JAX-WS and Joda-Time?

or similar:

3324
How to generate random integers in a specific range in Java?
1655
How do I generate a random alphanumeric string?
562
java.util.Date for XMLGregorianCalendar
1
Xmlgregoriancalendar in "yyyy-MM-dd" when generating XML SOAP request
0
Date is not valid in web service response
0
wsimport generating empty classes (pojos) from wsdl
0
wsimport does not generate the same files as wsgen
0
JAXB changes not reflecting soap response
0
what is the problem with converting date to XMLGregorianCalendar
-1
WSIMPORT- Unable to create non-static inner classes in client stubs



All Articles
Loading...
X
Show
Funny
Dev
Pics