JDeveloper 11gR2: New option Test WebService in WSDL editor – quickest route to implement and test JAX-WS SOAP WebService

It is just a little feature addition – this ‘Test WebService’ button in the WSDL Editor in JDeveloper 11g Release 2 that was released last week. But it can be quite useful all the same. When you inspect a WSDL document in JDeveloper – either one that exists as a file in JDeveloper or one that is generated on the fly from the JAX-WS annotations in a Java Class, you can invoke that WebService from the HTTP Analyzer tool by simply pressing this new button:

Image

This article will demonstrate the very rapid creation of a JAX-WS WebService using a very simple Java Class. Subsequently, this WebService is tested from the WSDL editor that shows the WSDL for this JAX-WS WebService,

The steps used here are very straightforward:

1. Create a (simple) Java Class and add JAX-WS annotations to declare the class a WebService and specify the WebMethods:

Image

2. Show the WSDL for the WebService defined through these annotations (it will be generated on the fly)

Image

3. The WSDL Editor opens with the generated WSDL; press on the icon to test the web service

Image

4. The HTTP Analyzer opens – primed to invoke the web service implemented by the Java Class

Image

5. Now before the WebService can actually be invoked, it must be running somewhere. That is simple to achieve: simply run the Java Class Calculator:

Image

6. So now the WebService can be invoked. The response is received and the test is complete:

Image