Examples of callRemote()


Examples of org.jrest4guice.client.JRestClient.callRemote()

    //通过JRestClient直接访问rest资源
    JRestClient client = new JRestClient();
    ModelMap<String, Object> urlParam = new ModelMap<String, Object>();
    urlParam.put("pageIndex", "1");
    urlParam.put("pageSize", "5");
    Object result = client.callRemote("http://localhost/full/resource/contacts",
        "get", urlParam);

    Page<Contact> page = (Page<Contact>) result;
    List<Contact> contacts = page.getResult();
    for (Contact ct : contacts)
View Full Code Here

Examples of org.jrest4guice.client.JRestClient.callRemote()

    List<Contact> contacts = page.getResult();
    for (Contact ct : contacts)
      System.out.println(ct.getName());

    System.out.println("==================================");
    List<Role> roles = (List<Role>) client.callRemote(
        "http://localhost/full/resource/security/cnoss/roles", "get", null);
    for (Role r : roles)
      System.out.println(r.getName());

    System.out.println("==================================");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.