Servlet içine java istirahat WebService Çağrı nasıl WebService Yöntemi Benim Gereği içeride yukarıdaki WebService URL'yi çağırma olduğunui URL'yi yürütmek zaman bir java istirahat WebService URL <code>http://localhost:8080/WebServiceEx/rest/hello/dgdg</code></p> <p>var
bir dize döndürür bir Servlet, herhangi bir Yardım?
ServletCode:
public Class StoreServlet extends HttpServlet{
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException, ServletException {
//Invoke WebService and Get Response String Here
}
WebService Kodu: (- internet üzerinde bir öğretici için bakmak bu amaçlar için)
public class HelloWorldService {
@Context
private ServletContext context;
@GET
@Path("/{param}")
public Response getMsg(@PathParam("param") String msg) {
return Response.status(200).entity(msg).build();
}
}