Versions Compared

Key

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

An Axis2 archive file is just a .jar file with a specific directory structure as shown below.

Panel

Test.aar

      META-INF

            services.xml

      Test.class

Developing Axis2 Services

To learn how to create an Axis2 service using WSO2 Carbon Studio, refer to: http://markmail.org/download.xqy?id=tsctqe7x5rnwexls&number=1

To learn how to create an Axis2 service using Eclipse, refer to: http://wso2.org/library/tutorials/create-axis2-web-service-in-3-steps-using-eclipse

Deploying Axis2 Services

All WSO2 products come with Axis2 capabilities, which allows you to deploy services as archive files. An Axis2 Service is deployed in your product in the form of an Axis2 archive file (.aar), which has all the service-related resources, service classes, and third-party libraries bundled together .

Once you have developed the Axis2 Serviceservice, you can upload the .aar file to a running WSO2 AS instance as shown below.

  1. Log in to the management console and select select Main -> Services -> Add -> AAR Service.
    Image RemovedImage Added
  2. The Add Service Archives page appears. Select your .aar file and click upload UploadFor example,

    Service Hierarchy
    Specifying a service hierarchy is optional. It allows you to customize your service endpoint reference. If the business logic of the same service changes over time, you can maintain multiple versions of the service by using service hierarchy at the deployment. 

    For example, consider a service named
     Version. 
    If the service hierarchy is not mentioned, then the service endpoint reference is ../services/Version. With service hierarchy specified, for example as 1.0.0, the endpoint reference is ../services/1.0.0/Version. Specifying a hierarchy is important if you want to manage services separately. 
  3. If the file is uploaded successfully, a message appears prompting you to refresh the page. Click OK.

    Info

    If the service is faulty, a "Faulty Service Groups" link will appear. You can click the link to view the errors.

  4. Refresh the "Deployed Services" page in the Management Console management console to view the newly added service listed.

Info

The file name of the archive is always used as the service name unless you have a different name attributed to the service file. For example, if the name of the archive file is Test.aar, then the name of the service will be Test.