This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date Problem in Webservices

 
maoushuk Imran
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ve a weird problem while sending date through webservices. whatever date i'm setting is not sent properly. its always 1 day less than the original. Cod eis below with example.

calender = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
calender.setTime(objDocHeaderBean.getCreationDate());

if i print 'objDocHeaderBean.getCreationDate()' its correct (2009-06-30) . but when i send in webservices its one day less than the original (2009-06-29T00:00:00.000+00:00).

Please Help me @ the earliest. I think there is some problem with the UTC thing. Can any1 help me???
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you checked the serialized message on the wire (ie. the SOAP message, if it is a SOAP web service)?
Is the date correct there or do the error occur when the data is being serialized?
Have you seen the class javax.xml.datatype.XMLGregorianCalendar, which, as far as I know, is more suitable for use with web services? Perhaps giving this class a try can solve your problem.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic