Versions Compared

Key

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

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: 

Table of Contents
maxLevel3
minLevel3

Info

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.

Panel

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.

Code Block
languagehtml/xml
<?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.

Code Block
languagejava
package org.wso2.test;
 /*** Example EchoBean***/

 public class EchoBean {
   public String echoString(String input) {
     return input;
   }

   public int echoInt(int input) {
     return input;
   }
}
Info

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: