例子代码如下,简单的很
package com.interprosoft.maximo.maximostudy; import psdi.mbo.MboRemote; import psdi.mbo.MboSetRemote; import psdi.util.MXCipher; import psdi.util.MXCipherX; import psdi.util.MXSession; public class Test { private static final String SERVER = "localhost:1099/MXServer"; private static final String SUPER_USERNAME = "maximo"; private static final String SUPER_PASSWORD = "maximo"; public static void main(String[] args) throws Exception { Test test = new Test(); test.listUser(); } private void listUser() throws Exception { MXSession mxSession = MXSession.getSession(); mxSession.setHost(SERVER); mxSession.setUserName(SUPER_USERNAME); mxSession.setPassword(SUPER_PASSWORD); mxSession.connect(); MXCipher mxCipher = new MXCipher(mxSession.getMXServerRemote()); MboSetRemote set = (MboSetRemote)mxSession.getMboSet("MAXUSER"); set.setQbeExactMatch(true); MboRemote mbo = (MboRemote)set.moveFirst(); while (true) { if (mbo == null) { break; } String username = mbo.getString("loginid"); byte[] bytes = mbo.getBytes("password"); String password = mxCipher.decData(bytes); System.out.println(username + ": " + password); mbo = set.moveNext(); } mxSession.disconnect(); } }