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
Joined: Oct 04, 2006
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.