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.
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 ]
subject: Access a web service from a j2ee component