JAXB - Setting Date format in marshaller application
843834Nov 24 2003 — edited Mar 10 2004I am using the JAXB marshaller to create content that I POST to a page on a foreign web site.
Everything looks OK other than I get my locale specific date format
<Date>2003-11-24+2:00</Date>
The foregn application doesnt recognise this date format and wants
<Date>2003/11/24</Date>
I can construct a SimpleDateFormat to do this,
DateFormat df=new SimpleDateFormat("yyyy/MM/dd");
Where and how do I tell JAXB or the marshaller to use this format?
I need to be able to customize the date format in several other places in my code as well, each remote machine has its own I18N settings, and I cannot control their format strings.
I need to run the application both as a Client(java command line application) and from within JBoss as a Servlet.
Thanks
Chris Rowse