I am trying to migrate an piece of code which works on Websphere 8.5 to Tomcat 8.5.
There are a few imports that a piece of code uses:
import com.ibm.websphere.wssecurity.callbackhandler.UNTGenerateCallbackHandler;
import com.ibm.websphere.wssecurity.wssapi.WSSFactory;
import com.ibm.websphere.wssecurity.wssapi.WSSGenerationContext;
import com.ibm.websphere.wssecurity.wssapi.token.SecurityToken;
import com.ibm.websphere.wssecurity.wssapi.token.UsernameToken
What can I use instead of these to make the code work?
The piece of the code that is using it is:
WSSFactory factory;
try {
factory = WSSFactory.getInstance();
WSSGenerationContext context = factory.newWSSGenerationContext();
UNTGenerateCallbackHandler callbackHandler = new UNTGenerateCallbackHandler(userName, password);
SecurityToken token = factory.newSecurityToken(UsernameToken.class, callbackHandler);
context.add(token);
context.process(soapMessageContext);
} catch (Exception e) {
return false;
}