Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel4
minLevel4

Using Maven

Due to a known issue when using Maven initially remove Follow the steps given below before you build and run the sample.

  1. Remove the following parent POM

...

  1. reference from the

...

  1. sample's pom.xml file, which is stored in the <PRODUCT_HOME>\samples\ directory.

...

  1. Code Block
    <parent> 
    	<groupId>org.wso2.appserver</

...

  1. groupId> 
    

...

  1. 	<artifactId>wso2appserver-samples-parent</artifactId> 
    	<version>5.2.1</version> 
    </parent>
Info

Apache Maven 3 is recommended to build the samples.

...

  1. Note

    Note that this step is necessary because of a known issue, which will be fixed in AS 6.0.0.

  2. As shown below, add the <version> and <groupid> elements to the pom.xml file, after the parent element which you commented out in the first step.

    Code Block
    <groupId>org.wso2.appserver</groupId>
    <version>5.2.1</version>

To build and run the sample:

  1. Open the maven pom.xml file, which is in the base directory of the sample (i.e.,

...

  1.   <PRODUCT_HOME>\samples\Jaxws-Jaxrs\<JAX-WS-Sample-Folder>)

...

  1. . To

...

  1. determine  <JAX-WS-Sample>, see JAX-WS Sample Folder.

Using either UNIX or Windows:

  1. Build the demo and create a WAR file.

    Code Block
    mvn clean install ()
  2. Start 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:

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

    Code Block
    mvn -Pdeploy
  4. Run the client

    Code Block
    mvn -Pclient

...

  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.

    Code Block
    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. Try the sample with different QoS options that appear on its dashboard. 
  7. For different options run:

    Code Block
    sh run-client.sh -help

     

...