Hi there,

I am trying to use wsdl2ejava Axis-1.6.2 generated stubs and including
Rampart-1.6.2 for the WS-Sec.
I have copied in to my application all the required Axis/Rampart jars,
modules and created the required directory structure when building it.
All my web services and generated code clients are deployed, visible
and ready to go.

But here is what I am experiencing when I try to invoke a client stub
and make him engage 'rampart' module to pass the WCF exposed service
with UsernameToken security.
"Unable to engage module : rampart"

Hmm, looked at the code and this seems to make sense even though all
axis2 and rampart modules are deployed during startup form the
WarBasedAxisConfigurator.
When the stub's service client is configured a null
ConfigurationContext is used as in previous versions but here the
check for if (MessageContext.getCurrentMessageContext() == null)
always
is true and new ConfigurationContext is created from file system which
uses the default axis2.xml and since a repository location is not
specified it seems that fails to find the deployed modules in
WEB-INF/modules
In other words I am receiving a AxisConfiguration without any modules.

What I am doing wrong here?
I had not have the issue with Axis-1.5 since there it was using a
Listener instead of MessageContext.getCurrentMessageContext()

My axis2.xml is the same as it comes from the distribution, but with
added two more globally engaged modules.

<module ref="addressing"/>
    <module ref="soapmonitor" />
    <module ref="rampart"/>

private void configureServiceClient(ConfigurationContext
configContext, AxisService axisService)
            throws AxisFault {
        if (configContext == null) {
            if (MessageContext.getCurrentMessageContext() == null) {
                configContext = ConfigurationContextFactory.
                        createConfigurationContextFromFileSystem(null, null);
                createConfigCtx = true;
            } else {
                configContext =
MessageContext.getCurrentMessageContext().getConfigurationContext();
            }
        }
        this.configContext = configContext;
        hashCode = (int)anonServiceCounter.incrementAndGet();

        // Initialize transports
        ListenerManager transportManager = configContext.getListenerManager();
        if (transportManager == null) {
            transportManager = new ListenerManager();
            transportManager.init(this.configContext);
        }

        // save the axisConfig and service
        axisConfig = configContext.getAxisConfiguration();

        if (axisService == null) {
            axisService = createAnonymousService();
        }

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to