Background:

 

Java: 1.5

Tomcat 5.25

Mod_JK Connector

Apache web server

Axis 2

 

IDE: Intellij 7.x

 

We have non-standard web layout, I am using the init-params and params
in the axis.xml to explicitly set up the contexts and other entry
points.

 

I have some experience with Axis back in 2001/2 at Swingtide when we
were building a SOAP inference engine, handlers building SOAP
endpoints,etc.

 

I have the axis kernel sources setup in my IDE so I can step through and
learn more....

 

Goal(s):

 

We are using, or more correctly put, going to be using, axis2 in a
legacy web environment. (I.e. We are using Axis2 in an embedded mode).
I/we are going to be using Document Style SOAP to integrate with other
distributed applications.

 

I like the ability to programmatically introduce new services but I do
not see an easy way, or a pattern for accessing the
ConfigurationContext. In stepping through the code it is obvious that it
is fairly expensive operation to create one. Even if were not expensive
I would like, in a singleton way to access the Configuration Context, as
created by the AxisServlet and install new Java services as they come to
fruition.

 

    public static void install()

    {

        try

        {

 

            ConfigurationContext context =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
"<OurPath>\\conf", null );

            HashMap services =
context.getAxisConfiguration().getServices();

            if ( ! services.containsKey(
BuildingController.class.getName() ))

            {

                AxisService service = AxisService.createService(
BuildingController.class.getName(), context.getAxisConfiguration() );

                context.getAxisConfiguration().addService( service );

            }

 

        }

        catch ( Exception e )

        {

            Trace.error("Problem adding service: " + e.getMessage(), e
);

        }

 

Problem:

 

I am encountering the below exception which I am getting ready to debug.
But I was hoping to access same configuration context, unless this is
not an accepted usage, or is is not thread-safe, or...

 

ERROR 2008-04-30 14:15:18,344 [Thread-1] - Problem adding service: The
system is attempting to engage a module that is not available:
addressing

org.apache.axis2.AxisFault: The system is attempting to engage a module
that is not available: addressing

            at
org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration
.java:440)

            at
org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfig
uration.java:567)

            at
org.apache.axis2.deployment.DeploymentEngine.engageModules(DeploymentEng
ine.java:589)

            at
org.apache.axis2.deployment.FileSystemConfigurator.engageGlobalModules(F
ileSystemConfigurator.java:141)

            at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:77)

            at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
ContextFromFileSystem(ConfigurationContextFactory.java:180)

 

Thanks for reading and considering

 

Kurt

 

 

Reply via email to