You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by John Kristian <jk...@netflix.com> on 2007/03/17 11:21:36 UTC

Rampart gets module.xml from Rahas

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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Rampart gets module.xml from Rahas

Posted by Ruchith Fernando <ru...@gmail.com>.
Done !
This is fixed in the latest Rampart [1]

Thanks,
Ruchith

[1] http://svn.apache.org/viewvc?view=rev&rev=520381

On 3/20/07, Ruchith Fernando <ru...@gmail.com> wrote:
> Hi,
>
> The jar file are not supposed to have the module.xml file. I'll remove them.
>
> Thanks,
> Ruchith
>
> On 3/20/07, John Kristian <jk...@netflix.com> wrote:
> > The results aren't substantially different with the files below.
> > Rampart doesn't add any headers, unless rampart-core-*.jar precedes
> > rampart-trust-*.jar in the initial classpath.  These two .jar files each
> > contain META-INF/module.xml.
> >
> > I downloaded
> > http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> > rampart-core/SNAPSHOT/rampart-core-20070309.130032-16.jar
> > http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> > rampart-trust/SNAPSHOT/rampart-trust-20070309.130032-16.jar
> > http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> > rampart-policy/SNAPSHOT/rampart-policy-20070309.130032-16.jar
> > http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> > rampart/SNAPSHOT/rampart-20070216.151012-1.mar
> >
> > I hope these are the files Ruchith meant.
> >
> > - John Kristian
> >
> > -----Original Message-----
> > From: Ruchith Fernando [mailto:ruchith.fernando@gmail.com]
> > Sent: Sunday, March 18, 2007 7:15 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: Rampart gets module.xml from Rahas
> >
> > Hi,
> >
> > On 3/17/07, John Kristian <jk...@netflix.com> wrote:
> > > 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?
> >
> > Yes! they should not be in the .jar files.
> > This is fixed in the new rampart artifacts. [1]
> >
> > > 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
> >
> > Can you please try to pick up the
> >
> > rampart-core-LATEST-SNAPSHOT.jar
> > rampart-trust-LATEST-SNAPSHOT.jar
> > rampart-policy-LATEST-SNAPSHOT.jar
> >
> > and replace your
> >
> > axis2-security-1.1.jar
> > axis2-rahas-1.1.jar
> > axis2-secpolicy-1.1,jar
> >
> > from here [1].
> >
> > Also replace replace your rampart-1.1mar with the latest snapshot
> > available at
> > http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> > rampart/SNAPSHOT/
> > (Make sure you name it rampart-SNAPSHOT.mar)
> >
> > Now try your scenario once again.
> >
> > Thanks,
> > Ruchith
> >
> > [1]
> > http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> >
>
>
> --
> www.ruchith.org
> www.wso2.org
>


-- 
www.ruchith.org
www.wso2.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Rampart gets module.xml from Rahas

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,

The jar file are not supposed to have the module.xml file. I'll remove them.

Thanks,
Ruchith

On 3/20/07, John Kristian <jk...@netflix.com> wrote:
> The results aren't substantially different with the files below.
> Rampart doesn't add any headers, unless rampart-core-*.jar precedes
> rampart-trust-*.jar in the initial classpath.  These two .jar files each
> contain META-INF/module.xml.
>
> I downloaded
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> rampart-core/SNAPSHOT/rampart-core-20070309.130032-16.jar
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> rampart-trust/SNAPSHOT/rampart-trust-20070309.130032-16.jar
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> rampart-policy/SNAPSHOT/rampart-policy-20070309.130032-16.jar
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> rampart/SNAPSHOT/rampart-20070216.151012-1.mar
>
> I hope these are the files Ruchith meant.
>
> - John Kristian
>
> -----Original Message-----
> From: Ruchith Fernando [mailto:ruchith.fernando@gmail.com]
> Sent: Sunday, March 18, 2007 7:15 PM
> To: axis-user@ws.apache.org
> Subject: Re: Rampart gets module.xml from Rahas
>
> Hi,
>
> On 3/17/07, John Kristian <jk...@netflix.com> wrote:
> > 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?
>
> Yes! they should not be in the .jar files.
> This is fixed in the new rampart artifacts. [1]
>
> > 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
>
> Can you please try to pick up the
>
> rampart-core-LATEST-SNAPSHOT.jar
> rampart-trust-LATEST-SNAPSHOT.jar
> rampart-policy-LATEST-SNAPSHOT.jar
>
> and replace your
>
> axis2-security-1.1.jar
> axis2-rahas-1.1.jar
> axis2-secpolicy-1.1,jar
>
> from here [1].
>
> Also replace replace your rampart-1.1mar with the latest snapshot
> available at
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
> rampart/SNAPSHOT/
> (Make sure you name it rampart-SNAPSHOT.mar)
>
> Now try your scenario once again.
>
> Thanks,
> Ruchith
>
> [1]
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
>


-- 
www.ruchith.org
www.wso2.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Rampart gets module.xml from Rahas

Posted by John Kristian <jk...@netflix.com>.
The results aren't substantially different with the files below.
Rampart doesn't add any headers, unless rampart-core-*.jar precedes
rampart-trust-*.jar in the initial classpath.  These two .jar files each
contain META-INF/module.xml.

I downloaded
http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
rampart-core/SNAPSHOT/rampart-core-20070309.130032-16.jar
http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
rampart-trust/SNAPSHOT/rampart-trust-20070309.130032-16.jar
http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
rampart-policy/SNAPSHOT/rampart-policy-20070309.130032-16.jar
http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
rampart/SNAPSHOT/rampart-20070216.151012-1.mar

I hope these are the files Ruchith meant.

- John Kristian

-----Original Message-----
From: Ruchith Fernando [mailto:ruchith.fernando@gmail.com] 
Sent: Sunday, March 18, 2007 7:15 PM
To: axis-user@ws.apache.org
Subject: Re: Rampart gets module.xml from Rahas

Hi,

On 3/17/07, John Kristian <jk...@netflix.com> wrote:
> 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?

Yes! they should not be in the .jar files.
This is fixed in the new rampart artifacts. [1]

> 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

Can you please try to pick up the

rampart-core-LATEST-SNAPSHOT.jar
rampart-trust-LATEST-SNAPSHOT.jar
rampart-policy-LATEST-SNAPSHOT.jar

and replace your

axis2-security-1.1.jar
axis2-rahas-1.1.jar
axis2-secpolicy-1.1,jar

from here [1].

Also replace replace your rampart-1.1mar with the latest snapshot
available at
http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/
rampart/SNAPSHOT/
(Make sure you name it rampart-SNAPSHOT.mar)

Now try your scenario once again.

Thanks,
Ruchith

[1]
http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Rampart gets module.xml from Rahas

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,

On 3/17/07, John Kristian <jk...@netflix.com> wrote:
> 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?

Yes! they should not be in the .jar files.
This is fixed in the new rampart artifacts. [1]

>
> 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.
>

Can you please try to pick up the

rampart-core-LATEST-SNAPSHOT.jar
rampart-trust-LATEST-SNAPSHOT.jar
rampart-policy-LATEST-SNAPSHOT.jar

and replace your

axis2-security-1.1.jar
axis2-rahas-1.1.jar
axis2-secpolicy-1.1,jar

from here [1].

Also replace replace your rampart-1.1mar with the latest snapshot
available at http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/rampart/SNAPSHOT/
(Make sure you name it rampart-SNAPSHOT.mar)

Now try your scenario once again.

Thanks,
Ruchith

[1] http://people.apache.org/repo/m2-snapshot-repository/org/apache/rampart/

> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
www.ruchith.org
www.wso2.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org