aspose file tools*
The moose likes Servlets and the fly likes Calling a web service operation from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling a web service operation from a servlet" Watch "Calling a web service operation from a servlet" New topic
Author

Calling a web service operation from a servlet

Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
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


"Quoting yourself is stupid" - Me
Chinna Eranna
Ranch Hand

Joined: Dec 08, 2009
Posts: 174

You have to write a Client depending on the type of webservice (Soap/REST).


- Chinna
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a web service operation from a servlet
 
Similar Threads
Web Service question - Need your suggestion.
How to call a web service from a servlet........
.NET service consumption from Java servlet
web servirce help
Pizza and Servlets