[英]How to set the wsdl generated webservice name?
I created a webservice with defined name: 我用定义的名称创建了一个Web服务:
@WebService(name = "MyService")
When I deploy that service, the wsdl is available at this service name: 当我部署该服务时,wsdl在以下服务名称下可用:
Endpoint address: http://localhost:8080/myproject/services/MyService?wsdl
BUT the wsdl content definition show a Service
keyword appended at my webservice that is already named *Service
. 但是wsdl内容定义显示了一个
Service
关键字,该关键字已附加到我的Webservice上,该关键字已经名为*Service
。
<wsdl:definitions name="MyServiceService">
How can I prevent the "Service" keyword being appended here? 如何防止在此处附加“ Service”关键字?
CXF will generate the value as name + "Service". CXF将生成值作为名称+“服务”。 To override this value, you can set the serviceName attribute on the
@WebService
annotation, eg 要覆盖此值,可以在
@WebService
批注上设置serviceName属性,例如
@WebService(name = "MyService", serviceName = "MyService")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.