Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
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
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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://aspose.com/file-tools
 
subject: Webservices and the Timestamp class
 
Similar Threads
Accessing an internet web service from a secure LAN
training in CO
How to do WebServices in Jboss 3.2.3
A simple question
Is DRY enough to justify inheritance?