go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  How to deploy a web service?
 
Subject: How to deploy a web service?
Author: ant
In response to: Axis2 Servcie
Posted on: 04/21/2010 02:35:42 PM


You can deploy a service in two ways:

Way #1 -- by exploded format: Simply drop the whole hierarchy of your service files to webapps/axis2/WEB-INF/services directory of your servlet engine.

Way #2 -- by compress format: Compress the whole hierarchy of your service files into an *.aar file, similar to a *.jar file, and then place it directly in the servlet engine's webapps/axis2/WEB-INF/services directory.


 

> On 04/21/2010 01:34:53 PM ant wrote:


Axis2 Servcies can be deployed as *.aar files, which must be arranged in a specific way. For example, the structure of this service will be as follows:
- StockQuoteService
   - META-INF
     - services.xml
   - lib
   - samples
     - quickstart
       - service
         - pojo
           - StockQuoteService.class

Here, the name of the service is StockQuoteService. The services.xml file specifies the service that Axis2 needs to execute it properly and links the Java class to it. Very mauch the same way as in web.xml to specify the Servelt mapping.

Content of services.xml

<service name="StockQuoteService" scope="application">
    <description>
        Stock Quote Sample Service
    </description>
    <messageReceivers>
        <messageReceiver 
            mep="http://www.w3.org/2004/08/wsdl/in-only"
            class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
        <messageReceiver
            mep="http://www.w3.org/2004/08/wsdl/in-out"
            class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>
    <parameter name="ServiceClass">
        samples.quickstart.service.pojo.StockQuoteService
    </parameter>
</service>






References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.