Call_csip.java [src/java/client/example] Revision: 8619948192a367567dc988cdbc535281973b1f25  Date: Fri Dec 30 12:14:41 MST 2022
/*
 * 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));
    }
}