Search code examples
javaweb-servicestomcatjax-ws

How to get the URL of my WSDL?


I have created a very simple web service using Netbeans, Java EE6, JAX-WS and TomCat. It just have one @WebMethod getWsdlURL(), which is supposed to return the URL of my wsdl, and it should be something similar to:

http://192.168.70.44:8088/SimpleWebService/WebService?wsdl

However I don't have any idea on how to do that.

Can anyone help me?


Solution

  • Don't add your own service to return the URL. Depend on the runtime, that already supplies it.

    Just open the url in a browser. The url would be....

    http://<hostname>:<port>/<webappname>/<servletEndpoint>?wsdl