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 16 Next »

 

Using Maven

From the base directory of the sample (<PRODUCT_HOME>\samples\Jaxws-Jaxrs\<JAX-RS-Sample-Folder>), the maven pom.xml file can be used to build and run the demo. To determine <JAX-RS-Sample>, see JAX-RS Sample Folder.

Using either UNIX or Windows:

  1. Build the demo and create a WAR file.

    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:

    OSCommand
    On Windows
    <PRODUCT_HOME>\bin\wso2server.bat --run
    On Linux/Solaris
    sh <PRODUCT_HOME>/bin/wso2server.sh
  2. Deploy the generated WAR file on WSO2 AS with the related logs on the console.

    mvn -Pdeploy
  3. Run the client

    mvn -Pclient

If you wish to remove the target directory:

run mvn clean

Using Apache Ant  

  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-RS-Sample>, see JAX-RS 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 will appear.
  4. Click on the respective JAX-RS sample (e.g., jaxrs_starbucks_service).
    Execute one of the following command to run the client.

    OSCommand
    On Windows
    run-client.bat
    On Linux/Solaris
    sh run-client.sh

     

  5. Try the sample with different QoS options that appear on its dashboard. 
  6. For different options run:

    sh run-client.sh -help

     

JAX-RS Sample Folder
SampleJAX-RS Sample Folder
JAX-RS Basicsjaxrs_basic
JAX-RS Advancedjaxrs_starbucks_service
JAX-RS Sample on Content Negotiationjaxrs_content_negotiation
  • No labels