axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Montag <mon...@danet.de>
Subject How to use Rampart as Axis2 client from ejb (JBoss) ?
Date Tue, 26 Aug 2008 13:13:29 GMT
Hello,

I like to implement an Axis2 client that is used from within an EJB 
calling an external web service that requires a UsernameToken.

I have a problem how to setup my Axis2 client code to engage the rampart 
module resulting in a "Unable to engage module: rampart" exception.

My ejb code looks something like this:

          ConfigurationContext ctx = ConfigurationContextFactory
           .createConfigurationContextFromFileSystem(null, null);
           service = new MyServiceStub(ctx, endpoint);

           // engaging rampart and setting authentification information
           Options options = service._getServiceClient().getOptions();
           options.setUserName(authName);
           options.setPassword(authPass);

           service._getServiceClient().engageModule("rampart");

As I'm within my ejb in an EAR, I cannot provide a "file path" to the 
client repository as the first argument of 
createConfigurationContextFromFileSystem(). I've tried to put the 
rampart module in a directory lib/ in my EAR archive and set the 
manifest classpath of my ejb-jar to the lib/ directory, but with no 
success. Anyone got an idea what is wrong ?

I'm using Axis 1.4 and rampart-1.4. The applicationserver to host my EAR 
is JBoss 4.0.5.

Thanks in advance,
   Rainer

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


Mime
View raw message