Suppose that you are implementing an application that consumes web services from an external system.
Question: what is the right way to implement a web client (Proxy) in an enterprise application ? I'm asking because most of the blogs are mentioning that it should be a Backing Bean and @WebServiceRef dependency injection to obtain a reference to the service JAX-WS proxy factory class, without saying anything about using Session Beans ! And as you may all know that session beans are a major requirement in the assignment. Are session beans used in any way to consume web services ? or are they used somewhere else in the middle ? Sorry, but I don't have previous experience in this particular area
Another question depending on the previous one: In the Component Diagram, should the web client (Proxy) be considered in the integration tier or somewhere else ?
Krzysztof Koziol wrote:In my design I put Adapter between system and SLSB. In the Component Diagram it will be placed in the integration tier.
I believe you should think of it as a Proxy instead of Adapter. Proxy hides remoteness (your use-case) as opposed to Adapter that allows old code to be used with new classes (adapts one interface to another).
Joined: May 18, 2011
Bottom line: this Proxy will be implemented as a SLSB ? I will definitely show it in the Integration tier in the Component diagram, but in the Class diagram, will this class be stereotyped <<Stateless>> ?