Skip navigation

Hi again...

 

I've been working on the JBoss Tools Web Service Tester and have just recently added the ability to select a WSDL file to populate the endpoint/action URLs and generate a Sample SOAP message when testing JAX-WS services. I'm still working on figuring out how to connect to a UDDI v3 registry to browse and select an operation from a published service in that context, but in the meantime you have a way to test your WSDL-based web services a bit easier...

 

Before I provide an example, I want to bring up a great resource for publicly-accessible web services from around the world - XMethods.net. If you haven't checked it out, it provides some great services that you can use to test tools like the WS Tester. A few that I found that are very useful for testing are:

 

So let's start with the Google Search Results one, which has a WSDL at http://www.ecubicle.net/gsearch_rss.asmx?WSDL.

 

If we look at the WS Tester, it has a new button - "Get from WSDL..."...

ws_tester_get_from_wsdl_060410.jpg

So I click on the "Get from WSDL..." button and see the "Select WSDL" dialog:

ws_tester_select_wsdl_dialog_060410.jpg

In the "WSDL URI:" field, I paste my WSDL URL in and it populates the three fields - Service, Port, and Operation. If there is more than one SOAP port available (such as SOAP and SOAP12), you can select it in the list and the operation list will change accordingly. In this case, there's just one operation available, but you have a vertical scroll bar on the right of the list to pick and choose.

ws_tester_select_wsdl_dialog_google_search_060410.jpg

When I hit OK, it does a number of things with the WSDL. It searches through the WSDL for the endpoint and action URLs, but more importantly it will try and generate a valid sample of the SOAP Request message. Even if the WSDL has multiple imports and/or imports schemas, it should (knock on wood) generate even complex messages fairly well. (If it doesn't, please let me know by putting in a JIRA.)

 

So in this case, it comes back populating the WS Tester with these values:

ws_tester_select_wsdl_dialog_google_search2_060410.jpg

If I change the values a bit...

  • searchPage becomes an empty value (delete the "?")
  • gQuery becomes "JBoss Web Services"
  • numOfResults becomes an empty value (delete the "?")

 

And hit Invoke...

ws_tester_select_wsdl_dialog_google_search3_060410.jpg

If I copy the response into an XML file and clean it up a bit, it looks pretty good:

ws_tester_select_wsdl_dialog_google_search4_060410.jpg

So if you look at a web service with multiple operations like the CDYNE Weather service (WSDL at http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl), you have more options in the operation list:

ws_tester_select_wsdl_dialog_weather_060410.jpg

And I was able to get the forecast for my city:

ws_tester_select_wsdl_dialog_weather2_060410.jpg

So if you have a WSDL file or a URL to a WSDL file, you should be able to use the WS Tester to test it now.

 

Next step is to get some sort of facility into the mix so you can browse a UDDI repository for the service.

 

This is checked into the JBoss Tools trunk now, so you should be able to play with it. Let me know what you think!

 

--Fitz

Filter Blog

By date:
By tag: