简体   繁体   中英

How to set the wsdl generated webservice name?

I created a webservice with defined name:

@WebService(name = "MyService")

When I deploy that service, the wsdl is available at this service name:

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:definitions name="MyServiceService">

How can I prevent the "Service" keyword being appended here?

CXF will generate the value as name + "Service". To override this value, you can set the serviceName attribute on the @WebService annotation, eg

@WebService(name = "MyService", serviceName = "MyService")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM