toolbox.services.ws
Class SimpleAxisServiceObjectSupplier

Package class diagram package SimpleAxisServiceObjectSupplier
java.lang.Object
  extended by toolbox.services.ws.SimpleAxisServiceObjectSupplier
All Implemented Interfaces:
org.apache.axis2.ServiceObjectSupplier

public class SimpleAxisServiceObjectSupplier
extends java.lang.Object
implements org.apache.axis2.ServiceObjectSupplier

Simple implementation of the Axis2 ServiceObjectSupplier inteface to allow service implementation classes to be obtained from a Java Toolbox ServiceRegistry instance.

The following is an example of an Axis2 service defintion that utilises this ServiceObjectSupplier implementation.

 <service name="WeatherService">
   <description>
     WeatherService implemented with Java Toolbox
   </description>
 <parameter name="ServiceClass">
     toolbox.samples.axis.WeatherService
   </parameter>

   <parameter name="ServiceObjectSupplier">
     toolbox.services.ws.SimpleAxisServiceObjectSupplier
   </parameter>

   <parameter name="serviceRegistryName">
     axissample
   </parameter>
   <parameter name="serviceName">
     weatherService
   </parameter>
   <parameter name="serviceClassName">
     toolbox.samples.axis.WeatherService
   </parameter>

   <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>
 </service>
 


Constructor Summary
SimpleAxisServiceObjectSupplier()
          Default constructor
 
Method Summary
 java.lang.Object getServiceObject(org.apache.axis2.description.AxisService axisService)
          Return the service implementation class from the configured ServiceRegistry instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAxisServiceObjectSupplier

public SimpleAxisServiceObjectSupplier()
Default constructor

Method Detail

getServiceObject

public java.lang.Object getServiceObject(org.apache.axis2.description.AxisService axisService)
                                  throws org.apache.axis2.AxisFault
Return the service implementation class from the configured ServiceRegistry instance.

The AxisService description passed to this method must contain the following additional parameters to successfully make use of this class:

Specified by:
getServiceObject in interface org.apache.axis2.ServiceObjectSupplier
Parameters:
axisService - AxisService instance describing the service.
Returns:
Object instance representing the implemenation of the service.
Throws:
org.apache.axis2.AxisFault - if the service implementation cannot be returned.