title: cxf 2.7.7 under Windows can't process dateTime Elements
body: <p>In my wsdl I am defining birthDate element like so:</p>
  
  <pre><code>&lt;xs:element minOccurs="0" name="birthDate" type="xs:dateTime"/&gt;
  </code></pre>
  
  <p>What happens when this element in the soap envelope exists but is empty i.e.</p>
  
  <pre><code>&lt;birthDate&gt;&lt;/birthDate&gt;
  </code></pre>
  
  <p>I get the following exception</p>
  
  <pre><code>org.apache.cxf.interceptor.Fault: Unmarshalling Error:  
  </code></pre>
  
  <p>and further down in the stack</p>
  
  <pre><code>Caused by: javax.xml.bind.UnmarshalException
   - with linked exception:
  [com.sun.istack.SAXParseException2; lineNumber: 0; columnNumber: 0; ]
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:372)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:349)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:842)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:101)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder$2.run(JAXBEncoderDecoder.java:870)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:868)
      ... 33 more
  Caused by: com.sun.istack.SAXParseException2; lineNumber: 0; columnNumber: 0; 
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:691)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:687)
      at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:585)
      at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:559)
      at com.sun.xml.bind.v2.runtime.FilterTransducer.parse(FilterTransducer.java:84)
      at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:247)
      at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:514)
      at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.text(InterningXmlVisitor.java:93)
      at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:338)
      at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:216)
      at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:185)
      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:370)
      ... 39 more
  Caused by: javax.xml.bind.UnmarshalException: 
   - with linked exception:
  [java.lang.IllegalArgumentException: ]
      ... 53 more
  Caused by: java.lang.IllegalArgumentException: 
      at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parseAndSetYear(XMLGregorianCalendarImpl.java:2887)
      at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parse(XMLGregorianCalendarImpl.java:2773)
      at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl.&lt;init&gt;(XMLGregorianCalendarImpl.java:435)
      at com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(DatatypeFactoryImpl.java:536)
      at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:583)
      ... 49 more
  </code></pre>
  
  <p>However whenever element is not present or set to something i.e.</p>
  
  <pre><code>&lt;birthDate&gt;1907-07-16T19:20:30&lt;/birthDate&gt;
  </code></pre>
  
  <p>everything works fine.</p>
  
  <p>What adds to the confusion is the fact that this issue appears only when working under Windows. There are no issues under Linux.</p>
  
  <p>What could cause this weirdness? How can I work around it?</p>
  
  <p>Thank you.</p>