문제

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

도움이 되었습니까?

해결책

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

Javadoc

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top