background image

Web Service and Client with JAX-WS

<< 1. Building Web Services with JAX-WS | Communication of JAX-WS Web Service >>
<< 1. Building Web Services with JAX-WS | Communication of JAX-WS Web Service >>
xvi
B
UILDING
W
EB
S
ERVICES WITH
JAX-WS
platform, and vice versa. This flexibility is possible because JAX-WS uses tech-
nologies defined by the World Wide Web Consortium (W3C): HTTP, SOAP, and
the Web Service Description Language (WSDL). WSDL specifies an XML for-
mat for describing a service as a set of endpoints operating on messages.
Setting the Port
Several files in the JAX-WS examples depend on the port that you specified
when you installed the Application Server. The tutorial examples assume that the
server runs on the default port, 8080. If you have changed the port, you must
update the port number in the following files before building and running the
JAX-WS examples:
· <INSTALL>/javaeetutorial5/examples/jaxws/simpleclient/
HelloClient.java
Creating a Simple Web Service and
Client with JAX-WS
This section shows how to build and deploy a simple web service and client. The
source code for the service is in
<INSTALL>/javaeetutorial5/exam-
ples/jaxws/helloservice/
and
the
client
is
in
<INSTALL>/javaeetutorial5/examples/jaxws/simpleclient/
.
Figure 1­1 illustrates how JAX-WS technology manages communication
between a web service and client.