samedi 31 mai 2014

JAX WS: Webserver not returning latest changes


Vote count:

0




I started to learn Restful Web services using Java. I set up my eclipse. Configured Tomcat in it. Below is my latest code



@Path("/v1/status/*")
public class V1_status {

@GET
@Produces(MediaType.TEXT_HTML)
public String returnTitle(){
return("<h1>This is a Text</h1>");
}

@Path("/version")
@GET
@Produces(MediaType.TEXT_HTML)
public String returnVersion(){
return("<h1>This is Version 2</h1>");
}
}


When I am trying to hit my webservice using localhost:8080/com.rahul.webservertest/api/v1/status/version It should return "This is Version 2". However its returning "This is Version 1" which was my old code. Trust me, I republished it after the change and restarted tomcat. Even if I comment out the whole method "returnVersion" and publish and restart, its returning "This is Version 1" when it should say, "Method Not Allowed" or something. What am I doing wrong?



asked 1 min ago

rahul

1,692





Aucun commentaire:

Enregistrer un commentaire