I am using axis 2 Web service client.
Https first call to the Web service throws an exception the following message: "Message does not contain a valid security elements."
I think the problem may be in the safe mode: may have to be message-level security in this case, how to configure the shaft.?
coding:
System.setProperty("javax.net.ssl.keyStore", jksFile);
System.setProperty("javax.net.ssl.keyStorePassword", jksPassword);
MyServicePortProxy proxy = new MyServicePortProxy();
Stub stub = (Stub) proxy.getMyServicePort();
proxy.setEndpoint(endpoint);
stub.setUsername(username);
stub.setPassword(password);
// throws exception with the above message:
proxy.serviceMethod(...);
Best answer
Look http://ws.apache.org/wss4j/package.html , we must define a client-config.wsdd, it tells axis including the user name / password (if you are using ws-security). For different standards and the difference between them, I am a little weak.