aspose file tools*
The moose likes Web Services and the fly likes Design Pattern for Web Service Consumer Component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Design Pattern for Web Service Consumer Component" Watch "Design Pattern for Web Service Consumer Component" New topic
Author

Design Pattern for Web Service Consumer Component

Alka Parveen
Greenhorn

Joined: Oct 29, 2007
Posts: 5
Hey,
I want to build a component more like a library which consumes the web service and provide some re usable functions to interact with it. I want to build this library to use with all the applications that was previously using that web service. I am new to designing the web service consumer components so, kindly help me with the design that is feasible for this structure. Which kind of design pattern i can use for it or any specific implementation of it?

Thanks for all your help,

Regards,
Alka
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Basically what you are proposing to implement is a Business Delegate which in itself uses aspects of the Facade and Adapter pattern. Business Delegates are used to decouple the core business logic from the complexity of dealing with distributed functionality that may be exposed as EJBs, Message beans, or web services, etc.

The main challenge you will be facing is that most SOAP web service toolkits will provide their own infrastructure code. Each application server development environment will have its own SOAP toolkit and infrastructure code - so as a rule any "component" built with these tools will not be portable between application servers much less to standalone clients. If portability is a requirement, you either have to use an independent SOAP toolkit that is redistributed with your client package or develop your own infrastructure code based on a lower level API like SAAJ or even URLConnections with the XML APIs (both of which will duplicate features that are already present in the various development environments).

See also: Portable J2EE 1.4 Web Services?

Facade pattern and Web services
Alka Parveen
Greenhorn

Joined: Oct 29, 2007
Posts: 5
Thanks peer.

Portability is not actually the requirement (atleast not for now). I will be using this library or component on one application server(Weblogic) only with other applications(portlets) deployed on that. I am very new to web services so if you have found any issues previously with any of these kind of stuff that can help, kindly share.

Thanks for all your help.

Regards,
Alka
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Design Pattern for Web Service Consumer Component