• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a web service operation from a servlet

 
Alex Parvan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i wanted to ask this...

I have a servlet and web service on the same server, and i want to call a WS operation from the servlet.
How do i do this ?

Thanks,
Alex
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to write a Client depending on the type of webservice (Soap/REST).
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can guarantee that they will always be on the same server, then you can factor out the business logic from the WS into their own classes, and then use those classes directly from within the servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic