Annotating Java code for web service creation
When we identify the piece of Java code to become exposed as a web service, the decoration part needs to take place. This recipe will explain how to annotate the Java code in order to become as useful as a web service.
Getting ready
This recipe will be based on the code we created in the Defining the service interface and Preparing the service implementation recipes.
How to do it…
The following are the steps required to annotate Java code for web service creation:
In the JDeveloper project, select the class (
BookLibraryImpl.java
) and right-click on it. Choose the Create Web Service... option. The Create Java Web Service wizard appears where we enter the Web Service Name and Port Name and then click on Next as shown in the following screenshot:Accept the default options for the message format and click on Next. In the Methods step, select the methods that are candidates for the web service operations as shown in the following screenshot:
The rest of...