wood burning stoves 2.0*
The moose likes Web Services and the fly likes big picture.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "big picture.." Watch "big picture.." New topic
Author

big picture..

Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516
Hi,

I have an ok-idea of what web services are.

I would like to know basic stuff just to be able to see the technologies in a big picture.

Lets say I have JSPs + Servlets using EJBs.

If I create a Web Service, would my logic be my EJBs? The web service is just another way to access my logic, right?

Also, If this is true, and my fonctionalities are now accessible by web services, should my jsp+servlet access them via the web service instead of going directly to the EJBs?

Thanks in advance,
Alex
[ April 19, 2006: Message edited by: Alex Turcot ]
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by Alex Turcot:
If I create a Web Service, would my logic be my EJBs? The web service is just another way to access my logic, right?

Technically JAX-RPC can generate endpoints that are based on either on a servlet or an EJB. However Axis only supports the servlet version; a J2EE 1.4 compliant application server has to support both.
However just like (EJB) components should be at a higher granularity than objects, Web services should at a higher level of granularity than a component (hence the name "service"). Ideally you want your Web services to exchange context complete XML documents (usually referred to as a Document-oriented Web service). Simply exposing existing EJB stateless session beans is less than ideal and the currently rampant practice of using Web services for RPC really is a misapplication of the technology (considering the overhead).
Originally posted by Alex Turcot:
Also, If this is true, and my fonctionalities are now accessible by web services, should my jsp+servlet access them via the web service instead of going directly to the EJBs?

No - if you plan on consuming the service internally you should expose it through an alternate interface that can be accessed more efficiently. XML marshalling can become a performance concern.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: big picture..
 
Similar Threads
What, besides servlets and jsp, may be used for web-application?
webservice vs. EJB, and wscompile
Will SCBCD improve my skills more than others?
Web Service Architecture Question
Web services and J2EE