package samples.stock.client;
import java.io.IOException;
importjavax.security.auth.callback.Callback;
importjavax.security.auth.callback.CallbackHandler;
importjavax.security.auth.callback.UnsupportedCallbackException;
importorg.apache.ws.security.WSPasswordCallback;
/**
* PWCallback for theClient
*/
public class PWCallbackimplements CallbackHandler {
/**
*@seejavax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
*/
public voidhandle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
// set the password given a username
if ('wss4j'.equals(pc.getIdentifier())) {
pc.setPassword('security');
}
} else {
throw new UnsupportedCallbackException(callbacks[i], 'UnrecognizedCallback');
}
}
}
}
Tomcat Axis2.xml
![Tomcat Axis2 Tomcat Axis2](/uploads/1/3/7/7/137729899/940985252.png)
Axis2 Tomcat 8
Axis2 Web service runtime Server not support service Posted on June 2014 by Java Honk The Apache Axis2 Web service runtime in Tomcat v7.0 Server does not support the service project TestWebService. Frostwire old version 4.21 3. Using Axis2 with Tomcat This tutorial will use the org.apache.axis2.transport.http.SimpleHTTPServer to host the SimpleService.aar Axis2 service archives are placed in a directory named 'services' in a repository directory. The structure of an example repository directory is shown below.