Glassfish Java EE应用程序中的肥皂Web服务



我使用Java EE指南构建了肥皂Web服务。

@WebService( name = "PersonDataExposureService" )
public class PersonDataExposureWebServiceBean {
...
@WebMethod
public PersonList retrieveAllPeople() { ... 
    // get the data and return it ... 
}
... more methods ...
}

使用Netbean Wizard在Netbeans建造的Java EE应用程序中,将Web服务部署到Glassfish。在与Web服务的战争中,应用程序部署和UI已渲染并且功能正常。

我正在尝试根据Java EE文档中的某些示例验证SOAP Web服务的可用性。

http://localhost:8080/DemoApplication-war/PersonDataExposureService?wsdl

http://localhost:8080/DemoApplication-war/PersonDataExposureService?retrieveAllPeople

demapplication-war是Netbeans Java Ee Wizard产生的战争。

我遇到了一个错误:

HTTP Status 404 - Not Found
type Status report
message Not Found
description The requested resource is not available.

如何通过直接通过URL访问Web服务?

我在做什么错?

为NetBeans IDE中的战争树的" Web Services"部分的persondataexposerervice节点调用"测试Web服务"。

http://localhost:8080/DemoApplication-war/PersonDataExposureWebServiceBeanService?Tester

这允许从浏览器直接测试Web服务接口。

随后可以使用以下方式访问WSDL:

http://localhost:8080/DemoApplication-war/PersonDataExposureWebServiceBeanService?wsdl

重定向的命名有点令人困惑,但它起作用。尚不清楚为什么将其他"服务"附加到Web服务名称上。如果有人可以对生成的名称提供其他澄清,这将是有帮助的。

最新更新