* (host by default is localhost).
*/
private HostAndPort getHttpListenerHostPort()
throws ServerInstanceException
{
HostAndPort hAndp = null;
try
{
//ms1 Server server = (Server) super.getBaseConfigBean();
Config config = (Config) super.getConfigBeanByXPath(ServerXPathHelper.XPATH_CONFIG);
HttpService https = config.getHttpService();
HttpListener[] hlArray = https.getHttpListener();
//check not needed since there should always be atleast 1 httplistener
//if you don't find one, use first one.
HttpListener ls = hlArray[0];
//default is the first one that is enabled.
for(int i = 0;i<hlArray.length;i++) {
if(hlArray[i].isEnabled()) {
ls = hlArray[i];
break;
}
}
String port = ls.getPort();
int intPort = Integer.parseInt (port);
hAndp = new HostAndPort("localhost", intPort);
}
catch (Exception e)
{
throw new ServerInstanceException(e.getLocalizedMessage());
}