/// <summary> /// Get Inbound Service object /// </summary> /// <returns></returns> public static InboundService GetService() { if (_inboundService != null) { return(_inboundService); } if (!RightNowConfigService.IsConfigured()) { return(null); } try { lock (_sync) { if (_inboundService == null) { var inboundWsdlUrl = RightNowConfigService.GetConfigValue(RightNowConfigKeyNames.ToaInboundServiceUrl); EndpointAddress endpoint = new EndpointAddress(inboundWsdlUrl); BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport); _inboundService = new InboundService(); _inboundService._inboundInterfaceService = new InboundInterfacePortClient(binding, endpoint); _inboundService._log = ToaLogService.GetLog(); } } } catch (Exception e) { _inboundService = null; MessageBox.Show(ToaExceptionMessages.InboudServiceNotInitialized, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(_inboundService); }
/// <summary> /// Get Inbound Service object /// </summary> /// <returns></returns> public static InboundService GetService() { if (_inboundService != null) { return _inboundService; } if (!RightNowConfigService.IsConfigured()) { return null; } try { lock (_sync) { if (_inboundService == null) { var inboundWsdlUrl = RightNowConfigService.GetConfigValue(RightNowConfigKeyNames.ToaInboundServiceUrl); EndpointAddress endpoint = new EndpointAddress(inboundWsdlUrl); BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport); _inboundService = new InboundService(); _inboundService._inboundInterfaceService = new InboundInterfacePortClient(binding, endpoint); _inboundService._log = ToaLogService.GetLog(); } } } catch (Exception e) { _inboundService = null; MessageBox.Show(ToaExceptionMessages.InboudServiceNotInitialized, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return _inboundService; }