Services Development and Deployment
Services of various types (Axis2 services, JAR services and Spring services) can be deployed in WSO2 AS easily by using the management console. See the following topics for more information:
To apply security to services in WSO2 AS, use WSO2 Developer Studio.
Axis2 services
An Axis2 archive file is just a .jar file with a specific directory structure as shown below.
Test.aar
META-INF
services.xml
Test.class
- To learn how to create an Axis2 service using WSO2 Developer 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
Spring services
To develop a simple Spring service, you have to provide a Spring context.xml
file, which has a .jar file containing the bean classes. Given below is an example of a simple Spring context.xml
file specifying a particular bean with an ID and a class name found in the .jar file.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="SimpleEchoBean" class="org.wso2.test.EchoBean"> </bean> </beans>
The Echo Bean for this example is shown below. It can contain any type of service implementation.
package org.wso2.test; /*** Example EchoBean***/ public class EchoBean { public String echoString(String input) { return input; } public int echoInt(int input) { return input; } }
For more information, refer to http://axis.apache.org/axis2/java/core/docs/spring.html
Engaging global modules for services
With Axis2, you can use modules to extend the functions of services deployed in your server. See the following topics for detailed information on how you can create axis2 modules, add them to the server and engage them for your services.
Deploying services in AS
See the following topics for step-by-step instructions on how to deploy services in WSO2 AS: