blob: bfb6c5246caa12b2e3117223442575d5c9fadbd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package com.orbekk.rpc;
import java.net.MalformedURLException;
import java.net.URL;
import com.googlecode.jsonrpc4j.JsonRpcHttpClient;
import com.googlecode.jsonrpc4j.ProxyUtil;
public class Client {
public static void main(String[] args) {
JsonRpcHttpClient client = null;
try {
client = new JsonRpcHttpClient(
new URL("http://10.0.0.96:10080/PingService.json"));
} catch (MalformedURLException e) {
e.printStackTrace();
}
PingService service = ProxyUtil.createProxy(
client.getClass().getClassLoader(),
PingService.class,
client);
System.out.println(service.ping());
}
}
|