• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Design pattern to consume an existing web service

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,

What would be an appropriate J2EE design pattern to interact with existing system which offers Web Service interface? Does this scenario necessitate the use of a design pattern?

Thanks,
Jomon
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it would be some kind of utility class I suppose.

The below link has the some information:
webpage

You can name it as some DAO as it is getting/sending data from/to a source, which is a web service in this case. I read some article and they have mentioned that a DAO is not necessarily used to get data from a traditional data source like Oracle DB. It can also interact with Db for information access.

Thanks & Regards,
Anil Chowdary K
 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, IMHO i dont find it as good option to use DAO as the naming convention. But that's my personal opinion.

Coming back to the original question :-
"Web Service Broker" Design pattern is meant for this purpose only ? isn't ?
 
Anil Chowdary
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Web Service Broker is for exposing a service. I dont think it is for consuming a service
 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct, I refered back my notes. its for exposing and not accessing. Thanks for the correction.

 
Jomon George
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the comments...
I decided to use a DAO class which will abstract the calls to the existing Web service system...What do you think?
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on an assignment (big smokes) which entails a similar concept, abstracting a web service behind a DAO is a good idea..because by definition a DAO is a data access object and data could be accessed from anywhere (Mainframe, Web Service, Database).

I have used this pattern in real life projects and it works really well...not when it comes to sun exam..not so sure
 
Jomon George
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As a second thought, considering performance reasons, I plan to consume/integrate web service in the presentation tier by using a POJO client class.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think a adapter fits perfect.
You don't want to change your business logic or frontend, if the web-service interface changes in future...this way you provide
a interface that won't change, if the webservice may be replaced by another technology.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adapter if you need to change the interafce or proxy of you need to add functionalities I guess.
 
Jomon George
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Alexandre and Wolfgang !
Do you think that integrating web services in presentation layer makes sense?
 
Alexandre Delalieu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jomon George wrote:
Do you think that integrating web services in presentation layer makes sense?



I don't think so except if you are using a rest/ajax architecture
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic