background image

Building and Running the Client

<< A Simple JAX-WS Client | Web Services Interoperability >>
<< A Simple JAX-WS Client | Web Services Interoperability >>

Building and Running the Client

Building and Running the Client
You can build and run the simpleclient application using either NetBeans IDE or ant. To
build the client, you must first have deployed helloservice, as described in
"Building,
Packaging, and Deploying the Service" on page 482
.
Building and Running the Client in NetBeans IDE
Do the following to build and run simpleclient:
1. In NetBeans IDE, select File
Open Project.
2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/jaxws/.
3. Select the simpleclient folder.
4. Select the Open as Main Project check box.
5. Click Open Project Folder.
6. In the Projects tab, right-click the simpleclient project and select Run Project.
You will see the output of the application client in the Output pane.
Building and Running the Client Using Ant
In a terminal navigate to tut-install/examples/jaxws/simpleclient/ and type the following
command:
ant
This command calls the default target, which builds and packages the application into a JAR
file, simpleclient.jar, located in the dist directory.
The run the client, type the following command:
ant run
Types Supported by JAX-WS
JAX-WS delegates the mapping of Java programming language types to and from XML
definitions to JAXB. Application developers don't need to know the details of these mappings,
but they should be aware that not every class in the Java language can be used as a method
parameter or return type in JAX-WS. For information on which types are supported by JAXB,
see
Chapter 17, "Binding between XML Schema and Java Classes."
Types Supported by JAX-WS
The Java EE 5 Tutorial · September 2007
486