Table of Contents | ||||
---|---|---|---|---|
|
Using Maven
Initially remove the following code from the top level sample pom.xml
file, which is in the <PRODUCT_HOME>\samples\Jaxws-Jaxrs\
directory.
Code Block |
---|
<parent> <groupId>org.wso2.appserver</groupId> <artifactId>wso2appserver-samples-parent</artifactId> <version>5.2.1</version> </parent> |
Info |
---|
Apache Maven 3 is recommended to build the samples. |
The maven pom.xml
file, which is in the base directory of the sample (i.e., <PRODUCT_HOME>\samples\Jaxws-Jaxrs\<JAX-WS-Sample-Folder>
) can be used to build and run the demo. To determine <JAX-WS-Sample>
, see JAX-WS Sample Folder.
Using either UNIX or Windows:
Build the demo and create a WAR file.
Code Block mvn clean install ()
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 <PRODUCT_HOME>\bin\wso2server.bat --run
On Linux/Solaris sh <PRODUCT_HOME>/bin/wso2server.sh
Deploy the generated WAR file on WSO2 AS with the related logs on the console.
Code Block mvn -Pdeploy
Run the client
Code Block mvn -Pclient
If you wish to remove the target directory:
Code Block |
---|
run mvn clean |
Using Apache Ant
Info |
---|
You need Apache Ant 1.6.2 or higher to build the samples. |
To deploy the sample service on the server run the following command, from the
<PRODUCT_HOME>\samples\Jaxws-Jaxrs\<JAX-RS-Sample-Folder>
directory. To determine <JAX-WS-Sample>, see JAX-WS Sample Folder.Code Block ant
- Start the application server and access its Management Console at https://localhost:9443/carbon.
- On the Main menu, under Services, click List.
The Deployed Services window will appear. - Click on the respective JAX-RS sample (e.g., async_jaxws).
Execute one of the following commands to run the client:
OS Command On Windows run-client.bat
On Linux/Solaris sh run-client.sh
- Try the sample with different QoS options that appear on its dashboard.
For different options run:
Code Block sh run-client.sh -help
JAX-WS Sample Folder
Sample | JAX-WS Sample Folder |
---|---|
Asynchronous Invocation | async_jaxws |
Build and Invoke a Service Using a WSDL | wsdl_first_jaxws |
Develop Services in Code-First Approach | java_first_jaxws |
JAX-WS Handlers | handlers_jaxws |
MTOM Sample for SWA and XOP | mtom_jaxws |
WS-Security Sample on Signature and Encryption | sign_encrypt _jaxws |
WS-Security Sample on UsernameToken and Timestamp | ws_security\ut |