Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 664
tsukanomon Avatar asked Oct 04 '13 11:10

tsukanomon


People also ask

What is WSDL URL?

What is a WSDL? WSDL, or Web Service Description Language, is an XML based definition language. It's used for describing the functionality of a SOAP based web service. WSDL files are central to testing SOAP-based services. SoapUI uses WSDL files to generate test requests, assertions and mock services.

How do I find the WSDL URL in SoapUI?

Start soapUI, click on File -> New WSDL Project, specify the Project name and your initial WSDL that you would like to test, click OK. It will appear in the left side frame, expand your project, so, you can see your WSDL, then right click on the WSDL and click on "Check WS-I compliance".

How do I find the Web service URL?

The WebService URL has the format http or https://<MyServiceName>/RelativityWebAPI/. When you display a Relativity page, you see the web service name listed in the address bar on the browser.


2 Answers

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
like image 123
david99world Avatar answered Sep 29 '22 11:09

david99world


To add to answer of david99world, you can look for the endpoint url-pattern in sun-jaxws.xml configuration file present in WEB-INF dir.

The file may have a definition like:

<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">

    <endpoint name="ws/MyService" implementation="com.test.ws.services.MyService"
        url-pattern="/ws/MyService" enable-mtom="false" />

</endpoints>
like image 44
Ujjwal Avatar answered Sep 29 '22 10:09

Ujjwal