clientXmlLocation, true,
false, false,
ClientContainer.class,
new ACCEntityResolver());
ClientContainer cc = ClientBeansFactory.getClientBean(ctx);
host = cc.getTargetServer(0).getAddress();
port = cc.getTargetServer(0).getPort();
//check for targetServerEndpoints
TargetServer[] tServer = cc.getTargetServer();
String targetServerEndpoints = null;
for (int i = 0; i < tServer.length; i++) {
if (targetServerEndpoints == null) {
targetServerEndpoints = tServer[i].getAddress() +
":" + tServer[i].getPort();
} else {
// if we come here, that means we have more than 1 target-server elements.
// in that case FOLB should be enabled
lb_enabled = true;
targetServerEndpoints = targetServerEndpoints + "," +
tServer[i].getAddress() +
":" + tServer[i].getPort();
}
}
setSSLData(cc);
//FIXME: what do we do about realm
ClientCredential cCrd = cc.getClientCredential();
if(cCrd != null) {
String uname = null;
String upass = null;
// if user entered user/password from command line,
// it take percedence over the xml file. - y.l. 05/15/02
if (System.getProperty(LOGIN_NAME) == null) {
_logger.config("using login name from client container xml...");
//System.setProperty(LOGIN_NAME, cCrd.getUserName());
uname = cCrd.getUserName();
}
if (System.getProperty(LOGIN_PASSWORD) == null) {
_logger.config("using password from client container xml...");
// System.setProperty(LOGIN_PASSWORD, cCrd.getPassword());
upass = cCrd.getPassword();
}
if( uname != null || upass != null ) {
UsernamePasswordStore.set(uname, upass);
}
}
String endpoints_property = null;
// Check if client requires SSL to be used
ElementProperty[] props = cc.getElementProperty();
for ( int i=0; i<props.length; i++ ) {
if ( props[i].getName().equals("ssl") ) {
if ( props[i].getValue().equals("required") ) {
(ORBManager.getCSIv2Props()).put(ORBManager.ORB_SSL_CLIENT_REQUIRED,
"true");