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 26 27 28 29 | 1. package edu.ucar.cisl.gwtRESTTutorialView.client; 2. import com.google.gwt.user.client.rpc.IsSerializable; 3. public class RESTfulWebServiceException extends Exception implements IsSerializable { 4. private static final long serialVersionUID = 1L; 5. private String message; 6. public RESTfulWebServiceException() { 7. } 8. public RESTfulWebServiceException(String message) { 9. super(message); 10. this.message = message; 11. } 12. public RESTfulWebServiceException(Throwable cause) { 13. super(cause); 14. } 15. public RESTfulWebServiceException(String message, Throwable cause) { 16. super(message, cause); 17. this.message = message; 18. } 19. public String getMessage() { 20. return message; 21. } 22. } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1. package edu.ucar.cisl.gwtRESTTutorialView.client; 2. import com.google.gwt.core.client.GWT; 3. import com.google.gwt.user.client.rpc.RemoteService; 4. import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; 5. @RemoteServiceRelativePath("RESTfulWebServiceProxy") 6. public interface RESTfulWebServiceProxy extends RemoteService { 7. public static class Util { 8. public static RESTfulWebServiceProxyAsync getInstance() { 9. RESTfulWebServiceProxyAsync 10. rs=(RESTfulWebServiceProxyAsync)GWT.create(RESTfulWebServiceProxy.class); 11. return rs; 12. } 13. } 14. 15. public String invokeGetRESTfulWebService(String uri, String contentType) 16. throws RESTfulWebServiceException; 17. } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |