【问题标题】:Glassfish does not detect the JAX-WS endpointGlassfish 未检测到 JAX-WS 端点
【发布时间】:2021-12-05 02:58:48
【问题描述】:

您好,我在 glassfish 服务器中遇到问题 我已经使用 intellij 部署了我的应用程序,它成功地向我展示了 Hello World 的第一页,当我添加到 url 时,显示了 404page 服务的名称

这是网络服务的代码

 package test;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(serviceName = "HelloService")
public class Hello {
    public Hello() {
    }

    @WebMethod()
    public int calcul (int a , int b){
        return a+b;
    }

}

web.xml

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
  <display-name>Archetype Created Web Application</display-name>
</web-app>

index.jsp

<html>
<body>
<h1>Test the application the problem is that the glassfish can't access to the webservers</h1>
<h2>Hello World!</h2>
</body>
</html>

This is when I run the application for the first time

This is when I add the webservice name to the url

This is the Glassfish5 GUI showing it doesn't detect the components of the new webservices

【问题讨论】:

    标签: glassfish http-status-code-404 jax-ws


    【解决方案1】:

    在我一次又一次地尝试之后 我在其他 WAR 文件中发现 web.xml 不存在 所以我删除了 web.xml 文件并

    【讨论】:

    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-28
    • 2011-04-28
    • 1970-01-01
    • 2013-02-21
    相关资源
    最近更新 更多