Implementing web services with JAX-WS
This recipe will explore the implementation of web services with JAX-WS. For web service construction, we will use the top-down approach.
Getting ready
In the recipe Implementing web services with Axis2, we started web service implementation with the POJO class. The approach is called the bottom-up design. We will start the development of web services in JAX-WS from the WSDL definition; that is, we will use the top-down approach.
Initially, we create a new Java project in Eclipse. In the wizard, we change the output directory from bin
to classes
. When the project is created, we amend it with the following actions:
Create the
wsdl
directory. We put it in the WSDL file that is our starting point of creating a web service.Create the build directory. The directory presents the placeholder, where the deployment package will be created.
Create an empty
build.xml
file at the top-level project directory.
The WSDL file for our example web service is as follows:
<...