ServiceConfigurationCollection GetAllServices(string url_URI, string serviceMetadataProviderName) { Fwk.Bases.Connector.WebServiceWrapper wrapper = new Fwk.Bases.Connector.WebServiceWrapper(); wrapper.SourceInfo = url_URI; wrapper.ServiceMetadataProviderName = serviceMetadataProviderName; ServiceConfigurationCollection services = null; #region retrive info from server try { services = wrapper.GetAllServices(); UpdatePanel1.Visible = false; } catch (Exception ex) { msgError.Text = ex.Message; UpdatePanel1.Visible = true; return null; } #endregion if (services == null) { msgError.Text = "No fue posible establecer conexión con el dispatcher intentelo mas tarde o pongace en contacto con el administrador del mismo"; UpdatePanel1.Visible = true; return null; } return services; }
DispatcherInfo GetDispatcherInfo(string url_URI) { Fwk.Bases.Connector.WebServiceWrapper wrapper = new Fwk.Bases.Connector.WebServiceWrapper(); wrapper.SourceInfo = url_URI; DispatcherInfo wDispatcherInfo = null; #region retrive info from server try { wDispatcherInfo = wrapper.RetriveDispatcherInfo(); UpdatePanel1.Visible = false; } catch (Exception ex) { msgError.Text = ex.Message; UpdatePanel1.Visible = true; return null; } #endregion if (wDispatcherInfo == null) { msgError.Text = "No fue posible establecer conexión con el dispatcher intentelo mas tarde o pongace en contacto con el administrador del mismo"; UpdatePanel1.Visible = true; return null; } return wDispatcherInfo; }
public String ConnectToWebService(string url) { if (DataCoreDAC.Dispatcher_Exist(null, url)) return "La Url ya se encuentra regiustrada en nuestro sitio"; Fwk.Bases.Connector.WebServiceWrapper wrapper = new Fwk.Bases.Connector.WebServiceWrapper(); wrapper.SourceInfo = url; try { var ac = wrapper.GetProviderInfo(""); } catch (System.Web.Services.Protocols.SoapException er) { // throw new Exception("El servicio web no es compatible con un despachador de servicios Fwk V 10.3.0.0", er); return String.Concat ("El servicio web no es compatible con un despachador de servicios Fwk V 10.3.0.0\r\n", er.Message); } catch (Exception exception) { //Response.setStatus(400); //Response.getWriter().write(String.Concat("Ocurrieron errores al intentar conectarce al despachador de servicio", exception.getMessage())); //throw new Exception("Ocurrieron errores al intentar conectarce al despachador de servicio", exception); return exception.Message; } return String.Empty; }
public Boolean ConnectToWebService(string url) { if (DataCoreDAC.Dispatcher_Exist(null, url)) throw new Exception("La Url ya se encuentra regiustrada en nuestro sitio"); Fwk.Bases.Connector.WebServiceWrapper wrapper = new Fwk.Bases.Connector.WebServiceWrapper(); wrapper.SourceInfo = url; int c = 0; try { c = wrapper.RetriveProviders().Count; } catch (System.Web.Services.Protocols.SoapException er) { throw new Exception("El servicio web no es compatible con un despachador de servicios Fwk V 10.3.0.0", er); return false; } catch (Exception exception) { //Response.setStatus(400); //Response.getWriter().write(String.Concat("Ocurrieron errores al intentar conectarce al despachador de servicio", exception.getMessage())); throw new Exception("Ocurrieron errores al intentar conectarce al despachador de servicio", exception); return false; } return true; }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] == null || Request.QueryString["url"] == null || Request.QueryString["prov"] == null) { //Response.Redirect(WebUserControlsConstants.NavigateUrl_Home); } string id = Request.QueryString["id"].ToString(); string url = Request.QueryString["url"].ToString(); string prov = Request.QueryString["prov"].ToString(); Fwk.Bases.Connector.WebServiceWrapper wrapper = new Fwk.Bases.Connector.WebServiceWrapper(); wrapper.ServiceMetadataProviderName = prov; wrapper.SourceInfo = url; ServiceConfiguration svc = wrapper.GetServiceConfiguration(id); txtName.Text = svc.Name; txtReq.Text = svc.Request; txtRes.Text = svc.Response; txtSVC.Text = svc.Handler; chkAudit.Checked = svc.Audit; chkAvailable.Checked = svc.Available; int index = -1; ListItem item = cmbTransactionalBehaviour.Items.FindByText(svc.TransactionalBehaviour.ToString()); if (item != null) { index = cmbTransactionalBehaviour.Items.IndexOf(item); cmbTransactionalBehaviour.SelectedIndex = index; } item = cmbIsolationLevel.Items.FindByText(svc.IsolationLevel.ToString()); if (item != null) { index = cmbIsolationLevel.Items.IndexOf(item); cmbIsolationLevel.SelectedIndex = index; } }
void Set_AppSetting( string key ,string values) { Fwk.Bases.Connector.WebServiceWrapper wrapper = new Fwk.Bases.Connector.WebServiceWrapper(); wrapper.SourceInfo = txtUrl.Text; }