Hi
The solution of using the following configuration context works(default
context and re-naming mar to jar or copying modules to lib directory) in a
stand alone application, but not in a ear deployment . I have spring
configuration that creates a bean, and in the construction of the bean I
create a stub and configure it with rampart1.3, but my problem is I don't
how to set a relative client repository path, no matter what I do it always
complains about
*
org.apache.axis2.AxisFault: Unable to engage module : rampart*
except when I set the full path of the repository
ConfigurationContext myConfigContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null
, null)
ConfigurationContext ctx = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(null, null);
service = new MyServiceStub(ctx, endpoint);
service._getServiceClient().engageModule("rampart");
I have spent almost two days, and I have no solution, other than giving the
full path which I don't like, because I want to minimize the configurion of
the ear during deployment.
Please help, thanks in advance,
On Tue, Sep 2, 2008 at 7:28 AM, keith chapman <[email protected]>wrote:
> Hi,
>
> You need to have the rampart.mar in the classpath. Perhaps renaming
> rampart.mar to rampart.jar (in the lib directory) will do the trick .
>
> Thanks,
> Keith.
>
>
> On Tue, Aug 26, 2008 at 6:43 PM, Rainer Montag <[email protected]> wrote:
>
>> 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: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>