I want to use XMLRPC to call API using PHP to realize the login function. Java method is posted as follows. How to realize the same function using PHP? Thank you.
public void testLogin()
{
Proxy proxy = null;
Map<String, String> params = new HashMap<String, String>();
params.put("realmId", "12345"); // AD id/password
try {
proxy = ProxyFactory.createProxy("SimpleFactory");
ModifyUser modUser = new ModifyUser("ActiveDirectory","","ADuserid");
modUser.assignRealm("12345", null, null);
proxy.getUpdateSvc().execute(admSession.getSessionToken(), modUser, new HashMap());
AuthResultTO result = proxy.getAuthnSvc().login("", "ADuserid", "password", params);
assertTrue(result.getSession().isAuthenticated());
String sessionToken = result.getSession().getSessionToken();
} catch (XmlRpcException e) {
fail(e.code + "," +e.getMessage());
} finally {
proxy.close();
}
}