Rampart Client throwing exception when trying to consume the service
I am trying to invoke a axis2 web service enabled with Rampart security. When I try to invoke the service through the client I am getting the following exception, (I have also included Jaxen Jar in my project)
Exception in thread "main" org.apache.axis2.AxisFault: java.lang.NoClassDefFoundError: org/jaxen/JaxenException
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(Oper开发者_如何学PythonationClient.java:165)
at com.tcs.secure.SecureServiceStub.add(SecureServiceStub.java:186)
at com.tcs.secure.Client.main(Client.java:16)
I have generated stubs for my password call back class and my sample class and imported it to my client. Here is my sample client.
public class Client {
public static void main(String[] args) throws RemoteException {
SecureServiceStub stub = new SecureServiceStub();
Add request = new Add();
request.setA(23);
request.setB(389);
AddResponse response = stub.add(request);
System.out.println(response);
}
}
精彩评论