I have a WSDL that specifies an element’s type to be xs:date.
When I use Apache CXF to generate the Java classes, it renders the variable as an javax.xml.datatype.XMLGregorianCalendar (all good so far).
When CXF renders an XML document containing this, it renders it in this form (where -06:00 represents the time zone):
2000-01-18-06:00
How can I configure CXF not to render the timezone?
By default wsdl’s
xsd:dategets mapped toXMLGregorianCalendar. If this is not what you want then if you are using CXF’swsdl to javatool then you can provide a binding file to override this default mapping:You can refer to http://cxf.apache.org/docs/wsdl-to-java.html section “How to map xsd:dateTime to java.util.Date?” for more details.