File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Webservices and the Timestamp class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservices and the Timestamp class" Watch "Webservices and the Timestamp class" New topic

Webservices and the Timestamp class

Hernan Thiers

Joined: Mar 24, 2010
Posts: 4
Currently I'm working on a SOA system where the persistence is based on ORM and all dates (datetime) are recognized as java.sql.Timestamp objects. The issue comes up when I try to build web services under the JAX-RPC 1.1 specifications that doesn't allow this class.
My question is what would be the best solution: to try a different attribute type from my Entity Relationship Model and so in the ORM class diagram or to develop web services with a newer specification??

Thanks in advance! Hope that I can explain myself in English well
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
There are two approaches I would consider:
1. Use JAX-WS instead of JAX-RPC.
JAXB, which is the API responsible for marshalling and unmarshalling of XML data with JAX-WS, allows for custom mappings.
If possible, I would immediately replace JAX-RPC with JAX-WS even though I opted for the option below. There are many other benefits with JAX-WS.
2. Use some kind of intermediary beans.
Web service invocations result in intermediary beans. When data is to be persisted, a persistent entity is populated with data from one or more intermediary beans.
Best wishes!

My free books and tutorials:
I agree. Here's the link:
subject: Webservices and the Timestamp class
It's not a secret anymore!