Return-Path:
Axis2 dispatches a component called MessageReceiver while Receiving a Message in the server. Axis2 provides different implementations of this class and it can be configured by adding a messageReceiver tag to services.xml. Axis2 provide implementation for class of Message receivers called RawXml Message receivers. They work on XML level and could only handle OMElements as parameters. This Section explains how to write a service using them. In our example, the web service will have two operations. Write the Implementation Class Write the Implementation Class./p>
Write a services.xml file to explain the
- Web serviceWriting Web Services Using Axis2's Primary APIs
+
+
+
+ Writing Web Services Using Axis2's Primary APIs
public void ping(OMElement element){} //IN-ONLY operation, just accepts the OMElement and does some processing.
public OMElement echo(OMElement element){}//IN-OUT operation, accepts an OMElement and
// sends back the same again
-
-How to write a Web
-Service?
+
+How to write a Web Service?
Writing a new Web service with Axis2 involves four steps:
-
Create a *.aar archive (Axis Archive) for - the Web service
+ the Web service.Deploy the Web service
+Deploy the Web service.
An implementation class has the business logic for the Web service and implements the operations provided by the Web service. Unless you have data @@ -44,10 +50,10 @@ } } -
"services.xml" has the configuration for a web Service. Each web service, +
"services.xml" has the configuration for a Web service. Each Web service, deployed in Axis2 , must have its configuration in "services.xml". The configuration for MyService is as follows:
<service > @@ -119,8 +125,8 @@Note : name of the service is a compulsory attribute.
-Step3 : Create the Web -Service Archive
+ +Step3: Create the Web Service Archive
Axis2 uses ".aar" (Axis Archive) file as the deployment package for Web services. Therefore, for MyService we will use "MyService.aar" with the @@ -136,10 +142,10 @@ found in the "Axis2_HOME/samples/userguide" directory. This file now has to be deployed.
-Step4 : Deploy the Web -Service
+ +Step4: Deploy the Web Service
-The service can be deployed by dropping the ".aar" file in to +
The service can be deployed by dropping the ".aar" file into "services" directory in "/webapps/axis2/WEB-INF" of your servlet container. Start the servlet container (if you have not already started) and check the link "Services" on the Web Administration Guide for more information.
+ + + --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org