Nin*_*ale 10
是.有可能的.
您可以在Swing桌面应用程序中使用(访问和读取)REST Web服务.
你可以使用它来实现它HTTPClient.
一个例子 - http://www.mkyong.com/webservices/jax-rs/restful-java-client-with-apache-httpclient/
在这里使用Spring RestTemplate示例.
RestTemplate rest = new RestTemplate()
rest.postForObject("http://localhost:8080/WebApp/ServiceName", requestBean, Response.class);
Run Code Online (Sandbox Code Playgroud)
这应该返回一个Response类型的对象.对于RestTemplate支持的其他HTTP操作,请参阅Spring文档.
| 归档时间: |
|
| 查看次数: |
13333 次 |
| 最近记录: |