Hi,
  I don't see anything wrong in the way you create the configuration
context. We can use our own repository and you have followed the correct
steps. Did you add all the dependencies required by Rampart to the
classpath. Otherwise Rampart could have been deployed as a faulty module and
the following error can occur.

thanks,
nandana

On Thu, Jan 8, 2009 at 6:46 PM, Berner, Nicolas <[email protected]> wrote:

>  Hi!
>
>
>
> I´m just learning to use Axis2 in combination with rampart.
>
> I have a service FlexSimple running and it is configured to include a
> timestamp into each outgoing SOAP-message.
>
> Wiring the message over tcpmon one can see that it works fine.
>
> On the client-side I have the consuming FlexSimpleClient which works
> without rampart (tested before engaging rampart on the server-side). Take a
> look at the code:
>
>
>
> *public* *static* Student holeStudent(String name){
>
>             Student studi = *null*;
>
>             *try* {
>
>                   ConfigurationContext ctx = ConfigurationContextFactory.*
> createConfigurationContextFromFileSystem*("D:\\Appserver\\apache-tomcat-6.0.18\\webapps\\axis2\\WEB-INF",
> "conf/client.axis2.xml" );
>
>                   FlexSimpleStub.GetStudentResponse response;
>
>                   System.*out*
> .println(ctx.getAxisConfiguration().isEngaged("rampart"));
>
>                   FlexSimpleStub stub = *new* FlexSimpleStub(ctx, *
> TARGET_EPR*);
>
>                   GetStudent getStudent = *new* GetStudent();
>
>                   getStudent.setName(name);
>
>                   response = stub.getStudent(getStudent);
>
>                   studi = response.get_return();
>
>             } *catch* (AxisFault e) {
>
>                   e.printStackTrace();
>
>             } *catch* (RemoteException e) {
>
>                   e.printStackTrace();
>
>             }
>
>
>
>             *return* studi;
>
>       }
>
> This code works fine.
>
>
>
> My problem is the given repository. In the code above I use the repostiory
> of the axis2-web-application within the tomcat-container.
>
> Isn´t it possible to use an own repository? I thought it is possible to
> create a folder "repository" and use this folder as first argument when
> instantiating the ConfigurationContext.
>
>
>
> Repository
>
> |---modules
>
>     |--addressing-1.4.1.mar
>
>     |--rampart-1.4.mar
>
>
>
> Example:
>
> ConfigurationContext ctx = ConfigurationContextFactory.*
> createConfigurationContextFromFileSystem*("repository",
> "conf/client.axis2.xml" );
>
>
>
> When I try this I get the following Exception:
>
> org.apache.axis2.AxisFault: The system is attempting to engage a module
> that is not available: rampart
>
>       at org.apache.axis2.engine.AxisConfiguration.engageModule(*
> AxisConfiguration.java:464*)
>
>       at org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(*
> AxisConfiguration.java:591*)
>
>       at org.apache.axis2.deployment.DeploymentEngine.engageModules(*
> DeploymentEngine.java:615*)
>
>       at
> org.apache.axis2.deployment.FileSystemConfigurator.engageGlobalModules(*
> FileSystemConfigurator.java:142*)
>
>       at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(
> *ConfigurationContextFactory.java:81*)
>
>       at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(
> *ConfigurationContextFactory.java:184*)
>
>       at test.flex.client.ServiceClient.holeStudent(*ServiceClient.java:53
> *)
>
>       at test.flex.client.ServiceClient.main(*ServiceClient.java:16*)
>
>
>
> It seems that Axis2 finds the addressing-module but there is a problem with
> the rampart-module.
>
> Does anyone know why I can´t use my "own" repository?
>
>
>
> Best regards
> Nicolas Berner
>
>
> Secaron AG
> Ludwigstr. 45
> 85399 Hallbergmoos
> Tel. +49 811 9594 - 170
>
> Fax +49 811 9594 - 220
> __________________________________
>
> Secaron AG, Hallbergmoos - Amtsgericht München - HRB130366
> Aufsichtsratsvorsitzender: Jochen Speek - Vorstand: Michael Spreng
> (Vorsitzender), Herbert Pröll
>
>
>

Reply via email to