*
The moose likes Web Services and the fly likes Using webservices in J2EE web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using webservices in J2EE web application" Watch "Using webservices in J2EE web application" New topic
Author

Using webservices in J2EE web application

Manikandan Parthasarathi
Greenhorn

Joined: Jul 29, 2008
Posts: 16
We have a Java/J2EE enterprise application which gets details from backend systems via webservice. The webservice have their own data model.

My question is

1. Is it a good practice to use the AS-IS data model retrieved from the webservice response?
2. Or to have our own data model and map the details retrieved from response?

could you please help me with the above?

P.S. we will use 40-60% of the data retrieved from the webservice response.


Regards
Manikandan
SCJP 5 , SCWCD 5
Arun Chidam
Ranch Hand

Joined: May 08, 2006
Posts: 79
Manikandan Parthasarathy wrote:We have a Java/J2EE enterprise application which gets details from backend systems via webservice. The webservice have their own data model.

My question is

1. Is it a good practice to use the AS-IS data model retrieved from the webservice response?
2. Or to have our own data model and map the details retrieved from response?

could you please help me with the above?

P.S. we will use 40-60% of the data retrieved from the webservice response.


Hi Manikandan,

can you please explain what is AS-IS data model??, you mean build the data model in sync with the response XML(i.e mapping table column properties with XML element properties) or build the data model with more generic structure and map the retrieved XML to fit your table structure.

If it is option-1, then it will serve the purpose for shorterm, but when the response xml changes or new properties are added then altering the data structure will be painful.

We have a similar kind of communication with our client, we store the XML(both sent and recieved XML) in a sepearate table as varchar, and later we retrieve the XML to populate data to our more generic/customized data model...hope this helps....


SCJP 1.4, SCWCD 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using webservices in J2EE web application