aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Access a web service from a j2ee component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Access a web service from a j2ee component" Watch "Access a web service from a j2ee component" New topic
Author

Access a web service from a j2ee component

Dasun Perera
Greenhorn

Joined: Jul 09, 2002
Posts: 13
Say we have a complex J2ee application which is running in a J2EE container. Which consists of all sorts of components such as jsp, servlets, stateless session beans, entity beans, MDBs etc. Some part of this application needs to access a web service running on a differrnt machine. What is the best way of doing this?. My main concern is accessing external web serive ultimately involves socket calls and it is not recomneded to initiate socket calls from a J2EE application.
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
Dasun,

With web services, I am quite sure you as a developer do not have to work with sockets directly. It is utilizing SOAP over http/https. In my opinion you should be able to invoke a web service from your Servlet, EJB or MDB's. You can checkout the web services tutorial from java.sun.com for some samples and tutorial.
[ December 25, 2007: Message edited by: Shailesh Kini ]

Shailesh Kini.
 
Consider Paul's rocket mass heater.
 
subject: Access a web service from a j2ee component