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?
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).
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.
subject: Design Pattern for Web Service Consumer Component