This rule flags references to any of the following schema types: http://www.w3.org/2001/XMLSchema:duration, http://www.w3.org/2001/XMLSchema:dateTime, http://www.w3.org/2001/XMLSchema:time, http://www.w3.org/2001/XMLSchema:date, http://www.w3.org/2001/XMLSchema:gYearMonth, http://www.w3.org/2001/XMLSchema:gYear, NAMESPACE:gMonth, http://www.w3.org/2001/XMLSchema:gDay
These schema types and their JAX-RPC related Java types
java.util.String
and
java.util.Calendar
are not supported by JAX-WS.
Migration to JAX-WS and JAXB will require
the
use of those schema types with the supported Java type
javax.xml.datatype.XMLGregorianCalendar
instead.
An example of a JAX-RPC Calendar class looks like:
An example of a JAX-WS XMLGregorianCalendar class looks like:
As you can see from the example above the input parameter has changes from type
java.util.Calendar
to
javax.xml.datatype.XMLGregorianCalendar
.
This is because the WSDL specified these parameters to be of type,
xsd:dateTime
, JAX-RPC maps this data type to
java.util.Calendar
, while JAX-WS and JAXB maps it to
javax.xml.datatype.XMLGregorianCalendar
.