【发布时间】:2017-12-05 18:00:59
【问题描述】:
我根据 Java EE 指南使用 JAX-WS 注释构建了一个 SOAP Web 服务。
@WebService( name = "PersonDataExposureService" )
public class PersonDataExposureWebServiceBean {
...
@WebMethod
public PersonList retrieveAllPeople() { ...
// get the data and return it ...
}
... more methods ...
}
使用 NetBeans 向导在 NetBeans 中构建的 Java EE 应用程序中将 Web 服务部署到 GlassFish。应用程序在与 Web 服务相同的 WAR 中部署并呈现 UI 并正常运行。
我正在尝试根据 Java EE 文档中的一些示例验证 SOAP Web 服务的可用性...
http://localhost:8080/DemoApplication-war/PersonDataExposureService?wsdl
或
http://localhost:8080/DemoApplication-war/PersonDataExposureService?retrieveAllPeople
其中 DemoApplication-war 是 NetBeans Java EE 向导生成的 WAR。
我收到一个错误:
HTTP Status 404 - Not Found
type Status report
message Not Found
description The requested resource is not available.
如何通过 URL 直接访问 Web 服务,让 WSDL 和 Web 服务方法直接在浏览器中呈现?
我做错了什么?
【问题讨论】:
标签: jakarta-ee soap netbeans jax-ws