});
} else {
HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
httpInvokerProxyFactoryBean.setServiceUrl(serverAdress + "copperMonitoringService");
httpInvokerProxyFactoryBean.setServiceInterface(CopperMonitoringService.class);
RemoteInvocationFactory remoteInvocationFactory = secureConnect ?
new SecureRemoteInvocationFactory(sessionId) : new DefaultRemoteInvocationFactory();
httpInvokerProxyFactoryBean.setRemoteInvocationFactory(remoteInvocationFactory);
httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
httpInvokerProxyFactoryBean.afterPropertiesSet();
final CopperMonitoringService copperMonitoringService = (CopperMonitoringService) httpInvokerProxyFactoryBean.getObject();