Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Using Maven

Follow the steps given below before you build and run the sample:

  1. 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-ws samples are listed here: JAX-WS Sample Folder.
  2. Build the demo and create a WAR file using the following command. 

    mvn clean install
  3. Deploy the generated WAR file in WSO2 AS with the related logs on the console using the following command:

    mvn -Pdeploy
  4. Start the WSO2 Application Server by executing one of the following commands, where  <PRODUCT_HOME> is the directory where you installed the product distribution:

    OSCommand
    On Windows
    <PRODUCT_HOME>\bin\wso2server.bat --run
    On Linux/Solaris
    sh <PRODUCT_HOME>/bin/wso2server.sh
  5. 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.

  6. 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 <PRODUCT_HOME>\samples\Jaxws-Jaxrs\<JAX-WS-Sample-Folder> directory:

run mvn clean

Using Apache Ant

You need Apache Ant 1.6.2 or higher  to build the samples.

  1. 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.

    ant
  2. Start the application server and access its Management Console at https://localhost:9443/carbon.
  3. On the Main menu, under Services, click List.
    The Deployed Services window will appear.
  4. Click on the respective JAX-RS sample (e.g., async_jaxws).
  5. Execute one of the following commands to run the client:

    OSCommand
    On Windows
    run-client.bat
    On Linux/Solaris
    sh run-client.sh           
  6. For different options run:

    sh run-client.sh -help
JAX-WS Sample Folder
SampleJAX-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

  • No labels