XML – JAXB Binding XS: Date is changed to XS: DateTime?

I have to access a flawed web service where some fields in the WSDL have type xs:date but I have to fill them as xs:dateTime.

Is it possible to use JAXB Bindings files to change the type of fields in WSDL?

Snippet of WSDL:




You can use the @XmlSchemaType annotation to configure the XML representation:

@XmlElement(name = "date- of-birth")
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar dateOfBirth;

For more information, please refer to

> http: //bdoughan.blogspot.com/2011/01/jaxb-and-datetime-properties.html

I have to access a flawed web service, where the Some fields have type xs:date but I have to fill them as xs:dateTime.

Is it possible to use JAXB Bindings files to change the type of fields in WSDL?

Snippet of WSDL:




< p>You can use the @XmlSchemaType annotation to configure the XML representation:

@XmlElement(name = "date-of-birth")
@XmlSchemaType( name = "date")
protected XMLGregorianCalendar dateOfBirth;

For more information, please see

> http://bdoughan.blogspot.com/2011/01/ jaxb-and-datetime-properties.html

Leave a Comment

Your email address will not be published.