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
Joined: Aug 26, 2008
Posts: 263
posted
0
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.
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
Joined: Aug 26, 2008
Posts: 263
posted
0
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
Joined: Jun 29, 2005
Posts: 279
posted
0
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
Joined: Apr 07, 2010
Posts: 32
posted
0
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
Joined: Aug 26, 2008
Posts: 263
posted
0
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
Joined: Jun 29, 2005
Posts: 279
posted
0
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".
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
Marshal
Joined: Mar 22, 2005
Posts: 35249
7
posted
0
That looks like the contents of the server-side modules directory; what about the client-side modules directory?
Anjali S Sharma
Ranch Hand
Joined: Jun 29, 2005
Posts: 279
posted
0
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
Joined: Jun 29, 2005
Posts: 279
posted
0
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
Joined: Aug 26, 2008
Posts: 263
posted
0
Can you post your axis2.xml
Anjali S Sharma
Ranch Hand
Joined: Jun 29, 2005
Posts: 279
posted
0
shivendra tripathi wrote:Can you post your axis2.xml
This is axis2.xml at the client side
shivendra tripathi
Ranch Hand
Joined: Aug 26, 2008
Posts: 263
posted
0
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
Joined: Aug 26, 2008
Posts: 263
posted
0
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
Joined: Jun 29, 2005
Posts: 279
posted
0
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.