我有一个 Jersey REST 服务,它调用其他几个 REST 服务并将它们的返回组合成一个新的返回。我的单元测试通过了,但在集成中我收到了 400 Bad Request 并且无法弄清楚是谁在返回它。Jersey 是否解析输入并返回 400?
@GET
@Path("/existing/{name}")
@Produces( MediaType.APPLICATION_JSON )
def namedFriction( @PathParam("name") String name, @Context HttpServletRequest request ) {
Cookie ssoToken = HTTPUtils.getSSOCookie(request)
def results = frictionBuilderService.checkCatalogForName(name, ssoToken)
def requestUrl = HttpUtil.getBaseContextUrl( request )
if ( results != null ) return frictionBuilderService.formatFriction(results, requestUrl)
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build() )
}