[英]Method not implemented when calling a WebService on Weblogic 10.3
[英]Calling a Post method of a webservice
我有3个端点的Web服务。 如下 -
GET /Game/getGameAll/ (com.service.rest.Game)
GET /Game/getGameById/{gameId} (com.service.rest.Game)
POST /Game/updateGame/{gameId}/{isAvailable} (com.service.rest.Game)
为了测试,我使用-
localhost:8080/Game/getGameAll/
localhost:8080/Game/getGameById/1000
而且效果很好。
但是在执行更新功能时-
localhost:8080/Game/updateGame/1000/true
它给我一个错误404:方法未找到。
但是,如果我将注释从post更改为get。 它执行。
//@POST : If this is changed to Get, it works! But not with @POST.
@GET
@Path(value = "/updateGame/{gameId}/{isAvailable}")
@Produces(MediaType.APPLICATION_JSON)
public Game updateGame(
@PathParam(value = "gameId") Integer gameId,
@PathParam(value = "isAvailable") int isAvailable) { ..
.
}
如何执行Web服务的Post方法?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.