Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access a web service from a j2ee component

 
Dasun Perera
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic