This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes REST Web service makes call to another REST web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "REST Web service makes call to another REST web service" Watch "REST Web service makes call to another REST web service" New topic
Author

REST Web service makes call to another REST web service

Smari Oumaya
Greenhorn

Joined: Sep 29, 2010
Posts: 22
Hi all,
I'm wondering if a REST Web service can make call to another REST web service. If yes how? i should create a client for the second web service in the definition of the first?

thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
If you can write a class which executes a call to a REST web service and returns a result, then of course you can incorporate that class into any application, even a REST style service.

I don't understand the second part of your question at all.

Bill
Smari Oumaya
Greenhorn

Joined: Sep 29, 2010
Posts: 22
Thank you Bill my problem is resolved. Like a regular call to a REST web service, in the body of the service i must create an instance of the client of the web service.
 
Consider Paul's rocket mass heater.
 
subject: REST Web service makes call to another REST web service
 
Similar Threads
Tool for testing web service (REST, JSON)
Nested Web service
Check if CXF Webservice is alive
Web service method call behaviour?
Tomcat server only services 10 web service calls?