Ibm mobilefirst 如何在worklight中使用json web服务
适配器的xml文件(HofDetails.xml)是:Ibm mobilefirst 如何在worklight中使用json web服务,ibm-mobilefirst,worklight-adapters,Ibm Mobilefirst,Worklight Adapters,适配器的xml文件(HofDetails.xml)是: <protocol>http</protocol> <domain>172.16.32.44</domain> <port>8080</port> @GET @Path("/module/{Eid}/{bhamashahid}/{aadhar_id}/{mobileNo}") @Produces(MediaType.APPLICATION_JSON) p
<protocol>http</protocol>
<domain>172.16.32.44</domain>
<port>8080</port>
@GET
@Path("/module/{Eid}/{bhamashahid}/{aadhar_id}/{mobileNo}")
@Produces(MediaType.APPLICATION_JSON)
public String getAll(@PathParam("Eid") String eid,@PathParam("bhamashahid") String bhamashahid,@PathParam("aadhar_id") String aadhar,@PathParam("mobileNo") String mobileNo) {
// return JsonObject.toJsonString();
}
我的web服务的定义如下:
<protocol>http</protocol>
<domain>172.16.32.44</domain>
<port>8080</port>
@GET
@Path("/module/{Eid}/{bhamashahid}/{aadhar_id}/{mobileNo}")
@Produces(MediaType.APPLICATION_JSON)
public String getAll(@PathParam("Eid") String eid,@PathParam("bhamashahid") String bhamashahid,@PathParam("aadhar_id") String aadhar,@PathParam("mobileNo") String mobileNo) {
// return JsonObject.toJsonString();
}
您没有实际解释您遇到的问题。
问题是什么 此外,您似乎没有实际处理响应。
像这样的怎么样:
var response = WL.Server.invokeHttp(input);
response.someProperty = "something";
return response;
您到底遇到了什么问题?你不能得到JSON响应还是怎么了?