Hello
I found the solution, What I say below is false, the new AxisEngine is
created with my values and used ...
The process is the following :
<snippet>
//How to configure a ServiceLocator with Axis
--------------------------------------------
// 1. Add a new EngineConfigurationFactory (System property)
// Can be made thru JProp ?
AxisProperties.setProperty("org.apache.axis.EngineConfigurationFactory",
"org.objectweb.jonas.ws.axis.ModuleEngineConfigurationFactory");
// 2. Create the Service
// We get a default configuration
abServ = new AddressBookServiceLocator();
// 3. Set property for searching client-config
// Will be set in the CompNamingContext
AxisProperties.setProperty(ModuleEngineConfigurationFactory.OPTION_CLIENT_CONFIG_FILE,
"org/objectweb/ws/ab_client/client-config.wsdd");
// 4. Search for a Factory
// We will pass a CompNamingContext to use our Factory
EngineConfigurationFactory f =
EngineConfigurationFactoryFinder.newFactory("myContext");
// 5. Get the new Configuration
EngineConfiguration ec = f.getClientEngineConfig();
// 6. Assign the new Configuration
abServ.setEngine(new AxisClient(ec));
</snippet>
Guillaume Sauthier wrote:
>
> Hi all
>
> After successfully deployed JaxRpc Handlers (thanks toshi :) ), I want
> to use EngineConfigurationFactory to retrieve my client-config.wsdd.
>
> But, the ServiceLocator I want to configure is preconfigured at startup
> (see Service default constructor). And if I set, after instanciation, a
> new AxisClient as engine the modification is not used.
>
> In fact, the Service constructor use the
> EngineConfigurationFactoryFinder with no param, taht will result in a
> call with null parameter on all Factories.
>
> And the problem is that only the EngineConfigurationFactoryDefault
> respond for a null parameter! So my own EngineConfigurationFactory is
> never used (this factory works only for a NamingContext subclass param).
>
> Is there an issue to use my Own EngineConfFactory(with a NamingContext
> param) when I instanciate a Service subclass ??
>
> Thanks
>
> Guillaume