Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 13473 invoked from network); 7 Nov 2006 05:30:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2006 05:30:01 -0000 Received: (qmail 596 invoked by uid 500); 7 Nov 2006 05:30:11 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 471 invoked by uid 500); 7 Nov 2006 05:30:11 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 460 invoked by uid 500); 7 Nov 2006 05:30:11 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 457 invoked by uid 99); 7 Nov 2006 05:30:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Nov 2006 21:30:11 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Nov 2006 21:29:59 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id B2E1B1A9846; Mon, 6 Nov 2006 21:29:32 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r471989 - /webservices/axis2/branches/java/1_1/xdocs/1_1/xmlbased-server.html Date: Tue, 07 Nov 2006 05:29:30 -0000 To: axis2-cvs@ws.apache.org From: chatra@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061107052932.B2E1B1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chatra Date: Mon Nov 6 21:29:25 2006 New Revision: 471989 URL: http://svn.apache.org/viewvc?view=rev&rev=471989 Log: reviewed and committing patch in Jira AXIS2-1612 on editorial review Modified: webservices/axis2/branches/java/1_1/xdocs/1_1/xmlbased-server.html Modified: webservices/axis2/branches/java/1_1/xdocs/1_1/xmlbased-server.html URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/xdocs/1_1/xmlbased-server.html?view=diff&rev=471989&r1=471988&r2=471989 ============================================================================== --- webservices/axis2/branches/java/1_1/xdocs/1_1/xmlbased-server.html (original) +++ webservices/axis2/branches/java/1_1/xdocs/1_1/xmlbased-server.html Mon Nov 6 21:29:25 2006 @@ -1,30 +1,36 @@ -

Writing Web Services Using Axis2's Primary APIs

+ + + + Writing Web Services Using Axis2's Primary APIs + + + +

Writing Web Services Using Axis2's Primary APIs

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.

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:
    -
  1. Write the Implementation Class

    +
  2. Write the Implementation Class./p>

  3. Write a services.xml file to explain the - Web service

    + Web service.

  4. Create a *.aar archive (Axis Archive) for - the Web service

    + the Web service.

  5. -
  6. Deploy the Web service

    +
  7. Deploy the Web service.

-

Step1 :Write the -Implementation Class

+ +

Step1: Write the Implementation Class

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

Step2 :Write the -services.xml file

+ +

Step2: Write the services.xml file

-

"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