In a previous article, we have created SOAP Web service with JAX-WS API. Also, we have covered different ways to consume or test SOAP Web Service. Today we will add one more method to test the SOAP Web Service. Do you know that we can test SOAP Web Service using eclipse, Yes, It’s true.

Let’s understand with example SOAP Web Service [http://localhost:8080/StockWebservice/stockendpoint?wsdl] we created in previous article.

Example :

Latest eclipse versions comes with Web Services Explorer, With that we can test SOAP Web Service.

To Launch, Go to Run > Launch the Web Services Explorer.

Launch Web Services Explorer
Launch Web Services Explorer

Web Service Explorer runs on localhost with the inbuilt jetty server of the eclipse. The interface will look like.

Web Services Explorer
Web Services Explorer

Select wsdl icon option from top right side.

Enter wsdl and click on Go.

Web Services Explorer
Web Services Explorer

Explorer interface has a three main tab items.

  1. Navigator

    Navigator shows structure of Web Service and all available requests/services from the Web Service.

  2. Action

    Action window is used to invoke request/service with required parameters. User can input available parameters from action tab.

  3. Status

    Status window shows result of invoked method of action tab.

Let’s invoke getStockPrice service from Navigator. Click on getStockPrice mathod and provide input parameter value in Action tab. Here we have provided Stock Name parameter as ‘Google’. Click on Go.

Invoke Service
Invoke Service

As we can see that result of the action is present in the status tab. We can also see SOAP Envelop from changing Source to Form in status tab.

That’s all for Testing of SOAP Web Service from Eclipse, Hope you like it, Keep reading and sharing !! :)

Leave a Reply

Your email address will not be published. Required fields are marked *