You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by Ayondeep Datta <ay...@ipacc.com> on 2007/02/22 17:44:17 UTC
Need help urgent
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
ayondeep.datta@ipacc.com
Re: Need help urgent
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
You have to use Rampart-1.1 with Axis2-1.1 or Axis2-1.1.1
Thanks,
Ruchith
On 2/22/07, Ayondeep Datta <ay...@ipacc.com> wrote:
>
>
> 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
> ayondeep.datta@ipacc.com
>
>
>
--
www.ruchith.org
www.wso2.org