||
Skip to end of metadata
Go to start of metadata

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

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;
   }
}

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:

  • No labels