JAXB Binding to change xs: date to xs: dateTime?

I need to access an invalid web service where some fields in the WSDL are of type xs: date, but I have to fill them in as xs: dateTime.

Can I use a JAXB binding file to change the type of a field in WSDL?

Excerpt from WSDL:

<xs:sequence> <xs:element name="startTime" type="xs:date" /> <xs:element name="stopTime" type="xs:date" /> </xs:sequence> 
+4
source share
1 answer

You can use the @XmlSchemaType annotation to customize the XML presentation:

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

For more information see

+1
source

Source: https://habr.com/ru/post/1345747/


All Articles