Hi,

I have looked at this for a while now but I still have some problems
figuring it out. Hope someone is able to help me here! ;-)

I can see that makeNewServiceObject(ctx) in AbstractMessageReceiver tests
on AxisService parameters to determine whether to receive its service
object by a ServiceObjectSupplier or to create it with reflection. I
thought it then would be possible to use AxisService.createService() to
obtain a basic AxisService where I removed the parameter Constants.
SERVICE_CLASS and added Constants.SERVICE_OBJECT_SUPPLIER&
SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME. But it doesn't
seam to be the right way to do this. Do I need to instantiate the
AxisService by my self and in such case, what must be set on this object as
minimum?

//My guess
ConfigurationContext config =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,null);
AxisService service = AxisService.createService("com.firm.MyService",
config.getAxisConfiguration());

service.removeParameter(service.getParameter(Constants.SERVICE_CLASS));
service.addParameter(Constants.SERVICE_OBJECT_SUPPLIER,
"org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier");
service.addParameter(SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME,
 "myBeanName");

config.getAxisConfiguration().addService(service);

Regards
Multi-Support A/S

Torben Riis
--------------------------------------------------------------------
Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com


                                                                           
             "robert lazarski"                                             
             <[EMAIL PROTECTED]                                             
             mail.com>                                                  To 
                                       [email protected]             
             20-08-2007 14:38                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Axis2: Configure Axis dynamicly 
             [EMAIL PROTECTED]         (SpringAware)                       
                  he.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Using SpringAppContextAwareObjectSupplier, you have the option of
using the the same ApplicationContextHolder class that axis2 uses.
Also, take a look at the AbstractMessageReceiver, ie, looking at the
source in this part of axis2 should point you in the right direction.

HTH,
Robert

On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I would like hear if it some how is possible to configure Axis2 dynamic
as
> the following in my service descriptor.
>
> <serviceGroup>
>       <service name="MyService">
>           <parameter name="ServiceObjectSupplier">
>
org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier

> </parameter>
>           <parameter name="SpringBeanName">myService</parameter>
>           <operation name="getJob">
>             <messageReceiver class=
> "org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
>           </operation>
>           <operation name="setStatus">
>             <messageReceiver class=
> "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
>           </operation>
>       </service>
> </serviceGroup>
>
> I now it is possible configure Axis2 dynamic with ordinary services using
> AxisService.createService(...), but how do I do it with Spring enabled
> services?
>
> //Configure Axis2 dynamic without spring support.
> Map<String, MessageReceiver> mep = new HashMap<String,
MessageReceiver>();
> mep.put("http://www.w3.org/2004/08/wsdl/in-only";,
RPCInOnlyMessageReceiver.
> class.newInstance());
> mep.put("http://www.w3.org/2004/08/wsdl/in-out";, RPCMessageReceiver.class
> .newInstance());
> ConfigurationContext config = ConfigurationContextFactory.
> createConfigurationContextFromFileSystem(null,null);
> AxisService service = AxisService.createService("MyService.class",
> config.getAxisConfiguration(), mep, null, null, BufferFactory.class
> .getClassLoader());
> config.getAxisConfiguration().addService(service);
>
>
> Regards
> Multi-Support A/S
>
> Torben Riis
> --------------------------------------------------------------------
> Phone +45 96 600 600, Fax +45 96 600 601
> E-mail: [EMAIL PROTECTED]
> http://www.multi-support.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to