Download Identity Manager User Application: Administration Guide

Transcript
{
DateArray dateArray = _attribute.getDates();
Calendar [] calendar = dateArray.getDatetime();
if(calendar == null)
System.out.println(_attributeName + " attribute : " +
"null because no attribute value exists.");
else
{
for(int calIndex = 0; calIndex < calendar.length;
calIndex++)
{
System.out.println(_attributeName + " attribute : "
+ calendar[calIndex].getTime().toString());
}
}
}
}
/**
* Method to obtain the remote interface to the Vdx endpoint
* @param _url
* @param _username
* @param _password
* @return IRemoteMetrics interface
* @throws Exception
*/
private IRemoteVdx getVdxStub(String _url, String _username, String
_password)
throws Exception
{
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
String lookup =
"xmlrpc:soap:com.novell.ws.client.vdx.VdxService";
InitialContext ctx = new InitialContext();
VdxService svc = (VdxService) ctx.lookup(lookup);
Stub stub = (Stub)svc.getIRemoteVdxPort();
stub._setProperty(Stub.USERNAME_PROPERTY, _username);
stub._setProperty(Stub.PASSWORD_PROPERTY, _password);
stub._setProperty(Stub.SESSION_MAINTAIN_PROPERTY,
Boolean.TRUE);
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, _url);
return (IRemoteVdx) stub;
}
}
546 User Application: Administration Guide