Chris
Chris

Reputation: 33

How to call RESTful web service remotely

I have been reading tutorials on how to build REST web services using Jersey and Tomcat. I have made a small test web service in Eclipse, deployed it on a Tomcat server and when I call the URI http://localhost:8080/TestService/rest/HelloWorld/ from browser it works fine.

My question is how do I make a call to this web service from another PC. I tried replacing 'localhost' with the public IP (168.58.x.x) and call it via browser of another PC, I am not getting a response. I am not sure if I am missing to do something here or I am doing something wrong.

Upvotes: 3

Views: 2543

Answers (1)

Dude Lebowski
Dude Lebowski

Reputation: 159

You should redirect the correct port on your router, too.

  1. Log in to your router
  2. Find Network > NAT > Port Forwarding
  3. Add a rule for your web Service that redirect the port 8080 to your local (LAN) ip

Upvotes: 1

Related Questions