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

0

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

Share.

About Author

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director for Fusion Middleware. Consultant, trainer and instructor on diverse areas including Oracle Database (SQL & PLSQL), Service Oriented Architecture, BPM, ADF, Java in various shapes and forms and many other things. Author of the Oracle Press book: Oracle SOA Suite 11g Handbook. Frequent presenter on conferences such as JavaOne, Oracle OpenWorld, ODTUG Kaleidoscope, Devoxx and OBUG. Presenter for Oracle University Celebrity specials.

Leave a Reply