Can you please help me configure Axis2 to send requests with a
UsernameToken?  I'm developing a SOAP client application, using Axis2 to
generate Java from WSDL.

Rampart doesn't add any headers to the request message.  Part of the
problem is that its META-INF/module.xml resource comes from
lib/axis2-rahas-1.1.jar, not repository/modules/rampart-1.1.mar.
Because it has the wrong module.xml, it doesn't add any flow handlers to
the outFlow, and consequently no headers are added to outgoing messages.

It seems the wrong module.xml is loaded because axis2-rahas-1.1.jar is
in the program's initial classpath.  It helps to re-order the classpath,
so that lib/axis2-security-1.1.jar comes before lib/axis2-rahas-1.1.jar.
But then I guess the META-INF/module.xml from axis2-security-1.1.jar is
used for other modules, which seems likely to cause other problems.

It's surprising that there are META-INF/module.xml files in
lib/axis2-rahas-1.1.jar and lib/axis2-security-1.1.jar.  Is this a
mistake?  Don't they belong in .mar files?

Rampart seems like too much software for this little job.  Could I use
something simpler?

I got Axis2 from
http://download.nextag.com/apache/ws/axis2/1_1_1/axis2-1.1.1.zip
and Rampart from
http://www.apache.org/dyn/mirrors/mirrors.cgi/ws/rampart/1_1/rampart-1.1
.zip
I'm using the Sun JDK 1.5 on Windows.

The wrong module.xml is chosen by DeploymentEngine.populateModule.

If I remove lib/axis2-rahas-1.1.jar from the initial classpath, the
program fails:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/rahas/TrustException
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
        at java.lang.Class.getConstructor0(Class.java:2640)
        at java.lang.Class.newInstance0(Class.java:321)
        at java.lang.Class.newInstance(Class.java:303)
        at
org.apache.axis2.deployment.util.Utils.addFlowHandlers(Utils.java:69)
        at
org.apache.axis2.deployment.DeploymentEngine.addNewModule(DeploymentEngi
ne.java:332)
        at
org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(Deplo
ymentEngine.java:187)
        at
org.apache.axis2.deployment.URLBasedAxisConfigurator.getAxisConfiguratio
n(URLBasedAxisConfigurator.java:71)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:61)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
ContextFromURIs(ConfigurationContextFactory.java:185)

- John Kristian

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

Reply via email to