【发布时间】:2014-02-24 16:21:20
【问题描述】:
我正在 Glassfish 4 应用服务器中开发 SOAP Web 服务。 SOAP 服务本身正在运行,但我想在指定的上下文或路径下发布它。但我找不到任何解决方案如何做到这一点。
这是我的服务:
@WebService(
serviceName = "HelloPersonService",
targetNamespace = "http://example.nl/hellopersonservice/1.0",
portName = "HelloPersonServicePort",
wsdlLocation = "WEB-INF/wsdl/my.wsdl",
endpointInterface="my.HelloPersonServicePortType")
public class HelloPersonServiceImpl
implements HelloPersonServicePortType {
@Override
public HelloPersonServiceResponseType greetPerson(HelloPersonServiceRequestType helloPersonServiceRequest) {
return null;
}
}
在此网址下提供服务的那一刻:
/webservice/HelloPersonService
但我想将其移至:
/webservice/collection/HelloPersonService
你知道怎么做吗?
非常感谢, 有
【问题讨论】:
-
您可以在 web.xml 中更改您的上下文根
-
@JakubHr 这与上下文根无关。请参阅我的帖子“/%context%/%path%/%service%”。
标签: java web-services soap jax-ws