Call_csip.java [src/java/client/example] Revision: Date:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package client.example;
import csip.utils.Client;
import org.codehaus.jettison.json.JSONObject;
/**
*
* @author od
*/
public class Call_csip {
public static void main(String[] args) throws Exception {
String req = "{\n"
+ " \"metainfo\": {\n"
+ " },\n"
+ " \"parameter\": [ \n"
+ " {\n"
+ " \"name\": \"temp\",\n"
+ " \"value\": 25\n"
+ " }\n"
+ " ]\n"
+ "}";
JSONObject res = new Client().doPOST("http://localhost:8080/csip-example/m/simpleservice/1.0", new JSONObject(req));
System.out.println(res.toString(4));
}
}