Book Image

Java 7 JAX-WS Web Services

By : Deepak Vohra
Book Image

Java 7 JAX-WS Web Services

By: Deepak Vohra

Overview of this book

<p>Web services are applications that use open, XML-based standards and transport protocols to exchange data with clients. <br /><br />In the book Developing a JAX-WS Web Service using the wsimport clientjar Option, we shall create a JAX-WS web service with Java 7. We shall discuss the new clientjar option in the wsimport tool or the wsimport ant task which is used to generate JAX-WS portable artifacts from a service wsdl. Subsequently, we use the web service artifacts to invoke the web service from a web service client.</p>
Table of Contents (8 chapters)

Chapter 2. Developing a JAX-WS Web Service

Java 7 supports Java API for XML Web Services (JAX-WS) 2.2.4 or later. In this chapter, we shall discuss the procedure for using the new -clientjar option in the wsimport task/tool in Java 7. We require a Java IDE that supports Java 7 and a web container that also supports Java 7. We need to install the following JDK and software as discussed in the previous chapter:

  • Java SE 7

  • NetBeans IDE 7.0.1

  • Oracle GlassFish Server 3.1.1

The sample NetBeans project is available in the downloadable sample ZIP file. This chapter has the following sections:

  • What is new in Java 7 wsimport?

  • Creating a NetBeans project

  • Creating the implementation class

  • Creating the WSDL

  • Creating the deployment descriptors

  • Creating a client class

  • Creating the deployment targets

  • Creating an Apache Ant build file

    • Building and deploying the service

    • Building the client

    • Running the client

  • Testing the web service

  • Using the wsimport tool from the command line

The wsimport tool or the wsimport Ant task is...