File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Axis2 - Unable to engage rampart

 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the client axis2.xml, I have added the following line

<module ref="rampart" />

I have also copied, "rahas-1.5.mar" and "rampart-1.5.mar" to the modules directory.

Now when I try to run the client, it gives me the following error message
Exception in thread "main" org.apache.axis2.AxisFault: Unable to engage module : rampart
at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:357)
at com.examples.www.wsdl.resumeservice_wsdl.ResumeClient.main(ResumeClient.java:44)

Please help me resolve this.
thank you
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you specified your repository path while creating configuration context if not pass it as param -Daxis2.repo="your axis module dir". I have responded to your post related to axis handlers you can have a look.
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivendra tripathi wrote:Have you specified your repository path while creating configuration context if not pass it as param -Daxis2.repo="your axis module dir". I have responded to your post related to axis handlers you can have a look.


Can you please let me know where I need to specify this?

Thank you
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create configuration context as follows


Then pass this config context while creating the ServiceClient. If you don't want to do that then create as "new ServiceClient()" and pass repo path as jvm argument while running the client. If you are using eclipse you have got run configurations where you can mention jvm arguments.
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivendra tripathi wrote:
Then pass this config context while creating the ServiceClient. If you don't want to do that then create as "new ServiceClient()" and pass repo path as jvm argument while running the client. If you are using eclipse you have got run configurations where you can mention jvm arguments.



Thank you

I am using Eclipse. In the "Run Configuration" of the client, I did the following
1. Go to "Arguments" tab
2. In "VM Arguments" text area, type the following
-Daxis2.repo="C:\ServiceTest\WebContent\WEB-INF\modules"

But I am still getting the same error.

Thank you
 
Jagdish Hatagale
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kindly check out you are classpath you need to put all the requrire file in classpath you did not place the files on correct location that is the reson such error is showing.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I forgot to mention one more thing.

mention your axis2 config file with rampart enable as following in jvm parameter.

-Daxis2.xml="location of axis2 xml with rampart engaged".

I hope axis/lib is already in your class path.
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivendra tripathi wrote:Sorry I forgot to mention one more thing.

mention your axis2 config file with rampart enable as following in jvm parameter.

-Daxis2.xml="location of axis2 xml with rampart engaged".

I hope axis/lib is already in your class path.


Thank you.

Axis lib is already in the classpath.

I have added the following to VM parameters

-Daxis2.repo="C:\ServiceTestClient1\WebContent\WEB-INF\modules"
-Daxis2.xml="C:\ServiceTestClient1\WebContent\WEB-INF\conf\axis2.xml"

I have verfied that the above path is valid.
But I am still getting the following error



If I comment the line engaging addressing module, then it says that Rampart module is not available. It is not able to find any of the modules.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the "modules" directory contain the addressing, rahas and rampart .mar files?
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Does the "modules" directory contain the addressing, rahas and rampart .mar files?


Yes, it contains the following
addressing-1.5
rahas-1.5
rampart-1.5

mex-1.5
mtompolicy-1.5
ping-1.5
scripting-1.5
soapmonitor-1.5
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like the contents of the server-side modules directory; what about the client-side modules directory?
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:That looks like the contents of the server-side modules directory; what about the client-side modules directory?


These are the contents of client side module directory.
I generated client using Eclipse plugin. It created all these modules (except rampart and rahas). Rampart and rahas I copied later on.
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After adding the VM parameters the error has changed slightly

Earlier it was

Exception in thread "main" org.apache.axis2.AxisFault: Unable to engage module : rampart

After putting the VM paramters, it changes to

Exception in thread "main" org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing

When there are no VM parameters, it does not give any error for addressing module (which comes before rampart module in axis2.xml). When VM parameters are put, it is not even able to find addressing module.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your axis2.xml
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivendra tripathi wrote:Can you post your axis2.xml


This is axis2.xml at the client side

 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I probably got the problem. I tried following and it worked.


so in case of repo you have to give the dir which contains modules dir.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more thing you can remove if you are engaging module in your program i.e. by calling engage module. This is needed for global setting. I am planning a blog on this discussing different ways to engage a module in axis2.
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivendra tripathi wrote:I probably got the problem. I tried following and it worked.


so in case of repo you have to give the dir which contains modules dir.


Thanks a lot.
You are absolutely correct.
I changed the VM parameter to -Daxis2.repo="C:\ServiceTestClient1\WebContent\WEB-INF", now I am able to get past that error. This means it is able to engage the module.

thank you
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic