Map<String, Object> bookProps = new HashMap<String, Object>();
bookProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
bookProps.put(WSHandlerConstants.USER, "soap");
bookProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
bookProps.put(WSHandlerConstants.PW_CALLBACK_CLASS, PasswordCallback.class.getName());
WSS4JOutInterceptor wssBookOut = new WSS4JOutInterceptor(bookProps);
bookEndPoint.getOutInterceptors().add(wssBookOut);
// Authentication of reader web service
Client readerClient = ClientProxy.getClient(readerWebService);
Endpoint readerEndPoint = readerClient.getEndpoint();
Map<String, Object> readerProps = new HashMap<String, Object>();
readerProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
readerProps.put(WSHandlerConstants.USER, "soap");
readerProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
readerProps.put(WSHandlerConstants.PW_CALLBACK_CLASS, PasswordCallback.class.getName());
WSS4JOutInterceptor wssReaderOut = new WSS4JOutInterceptor(readerProps);
readerEndPoint.getOutInterceptors().add(wssReaderOut);
setTitle("Library");
libraryMenu = new LibraryMenuBar();