aspose file tools
The moose likes Web Services and the fly likes Webservices and the Timestamp class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Webservices and the Timestamp class" Watch "Webservices and the Timestamp class" New topic
Author

Webservices and the Timestamp class

Hernan Thiers
Greenhorn

Joined: Mar 24, 2010
Posts: 4
Greetings.
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
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
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: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Webservices and the Timestamp class
 
Similar Threads
Is DRY enough to justify inheritance?
training in CO
How to do WebServices in Jboss 3.2.3
A simple question
Accessing an internet web service from a secure LAN