Axis2 Services
An Axis2 archive file is just a .jar file with a specific directory structure as follows.
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
The WSO2 Carbon platform has the capability of Axis2 to deploy a service as an archive file. 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 .
Axis2 service deployment capability is provided by the following feature:
Name : Axis2 Service Hosting Feature
Identifier : org.wso2.carbon.aarservices.feature.group
If Axis2 service deployment capability is not included in your product by default, you can add it by installing the above feature using the instructions given in section Feature Management .
To deploy an Axis2 Service, all you have to do is to locate the .aar file and upload it to a running Carbon instance using the Management Console.
1. Log on to the product's Management Console and select "Services -> Add -> AAR Service."
2. The "Add Service Archives" page appears. Select your .aar file and click upload.
For 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" .
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 to view the newly added service listed.
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.