Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web-service client and Session Beans ?

 
Luay Abdulraheem
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

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 ?

Thanks in advance,
 
Luay Abdulraheem
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any one?
 
Usman Ibrahim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can certainly consume a web service from SLSB. I would normally consume a web service from integration layer instead of presentation (Backing/Managed bean) layer.
 
Luay Abdulraheem
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply,

So what you mean that I can consume the web service from SLSB (My Proxy will be SLSB), and in the Component diagram it would be placed in the integration tier not in the business tier ?

If yes, then the question will be : implementing the web service consumer as a SLSB will be more complex and time-consuming than implementing it as a Backing Bean ?
 
Krzysztof Koziol
Ranch Hand
Posts: 133
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my design I put Adapter between system and SLSB. In the Component Diagram it will be placed in the integration tier.

The question is should I put Adapter and POJOs (not Entities) used by it in the Class Diagram or only in the Component Diagram?
 
Dumitru Postoronca
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Luay Abdulraheem
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>> ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic