【问题标题】:Tomcat, help generating wsdl with reference to static variableTomcat,参考静态变量帮助生成wsdl
【发布时间】:2019-04-03 05:16:48
【问题描述】:

在我的 webapp for tomcat 中为 2 个端点中的 1 个生成 wsdl 时出现问题。未编译的 jws 文件有错误(error: java.lang.RuntimeException: No compiler found in your classpath!(可能需要添加tools.jar))。

我已经将它指向静态变量调用Authorisation.jws(无法编译的文件)文件生成Login.jws 文件。你能像这样在 webapps 中调用静态变量吗?如果不是,正确的程序是什么?

public class Authorisation{

    //Authorises inputted session key with current active session keys
    public Boolean authorise(String key)
    {
        for (int i = 0; i < Login.KEYS.length; i++)
        {
            if (key.equals(Login.KEYS[i]))
            {
                return true;
            }
        }
        return false;
    }
}

【问题讨论】:

    标签: java web-services tomcat


    【解决方案1】:

    我已经解决了。如果有人遇到类似问题,解决方案是 jws 文件无法引用其他文件中的静态变量,因此您必须使用静态变量创建一个包并将它们放在 WEB-INF/classes 文件夹中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多