Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help! - javax.xml.bind.MarshalException Date and Gregorian Calendar

843833Jun 20 2010 — edited Jun 23 2010
I am now developing a JAX-WS web service client with NETBEAN 6.8 against our vendor's exposed Web services.

There is a XML schema element use basic xs:date while in generated java class it's a Gregorian calendar type.

Everything went fine until I ran into the following error message.

javax.xml.bind.MarshalException - with linked exception: [org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '2010-06-17T00:00:00+09:30' is not a valid value for 'date'.

Obviously, I can't modify anything an add correct annotation to Vendor's Java classes. What can I do on my site.

Can I use JAXB binding language and XMLAdaptor to convert that element's type xs:date to xs:dateTime?

Please shed light. Really new in this technology.

Thank you.

David
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2010
Added on Jun 20 2010
8 comments
669 views