Follow the steps given below before you build and run the sample:
- Open the sample folder in your product pack using a command line: Go to the
<PRODUCT_HOME>/samples/Jaxws-Jaxrsdirectory. Select one of the JAX-WS Sample Folders.
Build the demo and create a WAR file using the following command.
Deploy the generated WAR file in WSO2 AS with the related logs on the console using the following command:
This command will copy the WAR file to the
Start the WSO2 Application Server by executing one of the following commands, where
<PRODUCT_HOME>is the directory where you installed the product distribution:
OS Command On Windows
Log in to the management console and click List on the Main menu, under Manage/Applications. This opens the Running Applications page. The deployed applications will be listed here.
You can open the required web application by clicking the Find Services action.
If you want to remove the target directory, run the following command inside the
Using Apache Ant
You need Apache Ant 1.6.2 or higher to build the samples.
Open the sample folder in your product pack using a command line and go to the
<PRODUCT_HOME>\samples\Jaxws-Jaxrs\<JAX-WS-Sample-Folder>directory. The folders for Jax-rs samples are listed here: JAX-WS Sample Folder.
To deploy the sample, run the following command:
- Start the Application Server and log in to the management console.
- You can run the sample in two ways:
- Log in to the management console. On the Main menu, under Manage/Applications, click List to open the Running Applications page. The deployed applications will be listed here.
Using the command line, go the JAX-WS sample directory and execute the following command:
OS Command On Windows run-client.bat On Linux/Solaris sh run-client.sh
The results of the sample will show on the command line.
For different options, run:
JAX-WS Sample Folder
|Sample||JAX-WS Sample Folder|
Build and Invoke a Service Using a WSDL
Develop Services in Code-First Approach
MTOM Sample for SWA and XOP
WS-Security Sample on Signature and Encryption
WS-Security Sample on UsernameToken and Timestamp