数据在java jersey web服务中存储为null

时间:2016-01-21 11:14:23

标签: java json web-services post jersey

您好我使用java jersey创建了Web服务。我正在使用查询参数。但是如果我传递参数,则数据最终结果将存储为空值。

here is my code.

@Path("/val")
public class RESTservice {
@POST
@Path("/store")
public Response getMsg(
@QueryParam("city") final String city,
@QueryParam("locality")final String locality)
StoreIntoHDFS obj = new StoreIntoHDFS(city,locality);
String response1 = obj.storeAddress();
return Response.status(200).entity(response1.toString()).build();
}
}

JSON Structure

data - > array
{ 
  page_1 
        {
         parameters
        }
 }
}

数据为空值。欢迎任何帮助。

0 个答案:

没有答案