I am using Rampart for implementing simple Username token authentication. I want to create the axis configuration dynamically so that my web service client can read the username and password from the webapp instead of reading from a config file and send it to the server. I am getting this error when trying to create axis configuration from Java code.

java.lang.NoSuchMethodError: org.apache.axis2.description.HandlerDescription.<init>(Ljava/lang/String;)V at org.apache.rampart.handler.WSDoAllHandler.<clinit>(WSDoAllHandler.java:37)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:219)
at org.apache.axis2.deployment.util.Utils.getHandlerClass(Utils.java:182)
   at org.apache.axis2.deployment.util.Utils.addFlowHandlers(Utils.java:60)
at org.apache.axis2.deployment.DeploymentEngine.addNewModule(DeploymentEngine.java:337) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:690) at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:165) at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:53) at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:107) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:120)
   at webserviceclient.WebServiceClient.main(WebServiceClient.java:45)
Exception in thread "main"

My code is:

     OutflowConfiguration ofc=new OutflowConfiguration();
     ofc.setActionItems("UsernameToken");
     ofc.setUser("bob");
     ofc.setPasswordCallbackClass("webserviceclient.AmsWSPWCBHandler");

     Parameter outFlowSecurityParam=ofc.getProperty();

FileSystemConfigurator fsc=new FileSystemConfigurator("client_repository", "client_repository/conf/axis2.xml");

     AxisConfiguration ac=fsc.getAxisConfiguration();

     ac.addParameter(outFlowSecurityParam);

     ConfigurationContext ctx=new ConfigurationContext(ac);


Can you please tell me what I am doing wrong.I will appreciate any kind of comment.

Thanks,

--
Ayondeep Datta
Client/Server Programmer
Infinity Property & Casualty Corporation
(205) 803-8476
[EMAIL PROTECTED]

Reply via email to