I am using axis 2 webservice client.
The first https call to the webservice throws an exception with the message: "The message does not contain a valid security element."
I think the problem may be in security mode: perhaps it should be message-level security. In this case, how can I adjust it on the axis ?.
The code:
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);
proxy.serviceMethod(...);
source
share