Question

I'm creating a bottom-up web service from a java class using Apache CXF

In the java class, I am using java.util.Date and java.util.Calendar for two fields

When the WSDL is generated by CXF, both the elements have type="xs:dateTime". How do I generate the element to have a type of type="xs:date" instead?

I am using JAXB2.2.5

Was it helpful?

Solution

You can override this behavior with @XmlSchemaType(name="date") annotation.

Javadoc

Maps a Java type to a simple schema built-in type.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top