LibraryLink ToToggle FramesPrintFeedback

Java-First JAX-WS Service Development

This sample provides an example of service development using a code first approach using the JAX-WS APIs. The HelloWorld.java file included with this sample defines the service, and the Client.java file defines a Client class with a Client() method that calls different users.

These instructions use Maven to build and run the sample, using the pom.xml file located the base directory of this sample. If you prefer to use wsdl2java, javac, and java to build and run the sample, see the ReadMe file located in your install_dir\samples\java_first_jaxws directory.

See About Maven and Installing and setting up Maven for more information about using Maven with the FUSE Services Framework samples.

To build and run the sample using Maven commands:

The messages between the client and server appear rapidly in the consoles as messages are exchanged. When the messages have all been sent, you can scroll up in the console windows to track the following events:

When you run the Maven mvn install command, Maven compiles the Java files and creates Java class files. Maven creates the install_dir\samples\java_first_jaxws\target directory, which includes the client and server class files.

When you run the Maven mvn -Pserver and mvn -Pclient commands, Maven starts the server and client and executes the operations in the Java class files.

The sample files in the wsdl_first directory include the following: