简体   繁体   English

使用GWT的Rest Service代理访问错误

[英]Rest service proxy accessing error using GWT

I have a Rest web service. 我有一个Rest Web服务。 I access it by using a java application and its package structure is given below. 我通过使用Java应用程序访问它,其包结构在下面给出。

src.app ->App.gwt.xml src.app-> App.gwt.xml

src.app.source->RestProxyClass.java// to access the Rest Application src.app.source-> RestProxyClass.java//访问Rest应用程序

Following is App.gwt.xml file contents 以下是App.gwt.xml文件的内容

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to="App">
    <source path="source"/>
</module>

Using this java application I can access Rest web service. 使用此Java应用程序,我可以访问Rest Web服务。

I took this projects jar and add to GWT project. 我拿着这个项目jar并添加到GWT项目。 I add this jar file to library and select the jar from Order and Export. 我将此jar文件添加到库中,然后从“订单和导出”中选择jar。 I got this package in Referenced Libraries 我在参考库中得到了这个软件包

then I add this following code in .gwt.xml file 然后我在.gwt.xml文件中添加以下代码

<inherits name="app.App" />

But run time I got the following error : 但是运行时出现以下错误:

No source code is available for type app.source.RestProxyClass; did you forget to inherit a required module?

Following is GWT code 以下是GWT代码

public class RestProxyAccessClient implements EntryPoint {

    public void onModuleLoad() {
RestProxyClass app=new RestProxyClass();
        try {
            //restProxy.check();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
}

确保*.java文件打包在JAR中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从Web服务REST启动GWT - How to start GWT from web service REST 使用OkHttp进行翻新以调用REST服务时出错 - Error using Retrofit with OkHttp for calling REST service 使用 Jax 生成 Proxy web 服务客户端时出错 - Error when using Jax to generate Proxy web service client 从http和Google Chrome扩展程序简单REST客户端访问WCF服务时出现500间隔服务器错误 - 500 Interval Server Error while accessing WCF service from http and Google Chrome Extension Simple REST Client 使用asihttprequest访问Web服务时找不到方法错误 - method not found error while accessing web service using asihttprequest 在没有Servlet的情况下访问REST Web服务 - Accessing REST web service without servlet 使用WSO2 ESB代理服务时,如何在REST服务的URL中传递动态参数? - How do I pass a dynamic parameter as a part of the URL of a REST service while using WSO2 ESB Proxy Service? ExtJS 4-访问REST代理和/或存储中的自定义响应标头? - ExtJS 4 - Accessing custom reponse headers within REST proxy and/or store? 使用REST Server在codeigniter中发布Web服务不起作用并显示错误 - Post Web Service in codeigniter using REST Server not working and showing error 访问php Web服务时出错 - Error in accessing php web service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM