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..."...


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


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.


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:


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...


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


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:


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


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!