Table of Contents

Java - Java Web Service (JWS) (Annotation Method)

About

Instead of coding the raw Java class or EJB directly, you use the JWS annotations programming model, which makes programming a WebLogic Web service much easier.

This programing model takes advantage of the new JDK 5.0 metadata annotations feature in which you create an annotated Java file and then use Ant tasks to compile the file into a Java class and generate all the associated artifacts.

The Java Web Service (JWS) annotated file is the core of your Web service. It contains the Java code that determines how your Web service behaves.

A JWS file is an ordinary Java class file that uses annotations to specify the shape and characteristics of the Web service.

The JWS annotations you can use in a JWS file include:

The Java Web Service (JWS) file that implements the Web service uses just the one required JWS annotation: @WebService.

A JWS file is a standard Java file that uses JWS metadata annotations to specify the shape of the Web service. Metadata annotations were introduced with JDK 5.0, and the set of annotations used to annotate Web service files are called JWS annotations.

Annotation

@WebService

The Java Web Service (JWS) file that implements the Web service uses the JWS annotation: @WebService to specify that the JWS File implements a Web Service.

The standard @WebService annotation:

Example:

@WebService(name="SimplePortType", serviceName="SimpleService",targetNamespace="http://example.org")

Where:

Others

Documentation / Reference