Search code examples
javaxsdjaxbweblogicjax-ws

jax-ws datetime parsing difference on weblogic 11g and weblogic 12c


I have a curious behaviour on a web service deployed on weblogic 11g and weblogic 12c

For a field of type xsd:datetime declared as below in the wsdl :

xmlns:xs="http://www.w3.org/2001/XMLSchema"

<xs:element name="startDate" type="xs:dateTime" minOccurs="0"/>

On weblogic 11g, the time is not necessary :

<startDate>2015-02-20</startDate>

Whereas on weblogic 12c, the field is considered null with the same input, I need to add the time to have the web service working properly :

<startDate>2015-02-20T00:00:00</startDate>

Solution

  • I finally found that clients calling the web service give the correct format of date (with a default value for hours : 2015-02-20T00:00:00 (as they are based on a wsdl specifiying a datetime format).

    The problem was only on SoapUI, where you can manually put a date without putting an hour.