public i2TradePlus.ITSNetBusinessWS.Service CreateSET(ITSNetWS ITSNetWS) { i2TradePlus.ITSNetBusinessWS.Service result; try { i2TradePlus.ITSNetBusinessWS.Service service = new BusinessService(); ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(this.RemoteCertificateValidationCallBack); if (ITSNetWS == ITSNetWS.StockService) { service.Url = ApplicationInfo.WebUrl; } else if (ITSNetWS == ITSNetWS.UserService) { service.Url = ApplicationInfo.WebUserUrl; } else if (ITSNetWS == ITSNetWS.OrderService) { service.Url = ApplicationInfo.WebOrderUrl; } else if (ITSNetWS == ITSNetWS.AlertService) { service.Url = ApplicationInfo.WebAlertUrl; } result = service; } catch (Exception ex) { throw ex; } return result; }
public SoapHttpClientProtocol Create(ITSNetWS ITSNetWS) { SoapHttpClientProtocol result; try { SoapHttpClientProtocol soapHttpClientProtocol; if (ITSNetWS == ITSNetWS.TfexService) { soapHttpClientProtocol = new BusinessServiceFactory().CreateTFEX(); } else { soapHttpClientProtocol = new BusinessServiceFactory().CreateSET(ITSNetWS); } result = soapHttpClientProtocol; } catch (Exception ex) { throw ex; } return result; }