/* public ActionResult getWsdl(string project, string webservice) * { * String result = ""; * Response.ContentType = @"text/plain"; * using (AxAccess axAccess = new AxAccess(this.User.Identity.Name, this.Request.Url.AbsolutePath, "Get")) * { * result = axAccess.executeWSDL(project, webservice); * } * * return Content(result); * }*/ public ActionResult checkConnection(string project, string webservice) { String result = ""; Response.ContentType = @"text/plain"; ClientConfiguration clientConfig = ClientConfiguration.getClientConfiguration(); using (AxAccess axAccess = new AxAccess(this.User.Identity.Name, this.Request.Url.AbsolutePath, "Get", clientConfig)) { result = axAccess.executePing(); //result = "SOAP " + axAccess.checkConnection(this); } AxAccessModel access = new AxAccessModel(); if (result.ToLower().Equals("true")) { access.Connected = "Application is correct connected to :"; } else { access.Connected = "Application is not correct connected to :"; } return(Content(result)); }
// GET: Basic public ActionResult executeMessage(string project, string webservice, string httpaction) { String result; Response.ContentType = @"text/plain"; ClientConfiguration clientConfig = ClientConfiguration.getClientConfiguration(); using (AxAccess axAccess = new AxAccess(this.User.Identity.Name, this.Request.Url.AbsolutePath, httpaction, clientConfig)) { try { Response.ContentType = @"text/plain"; //remove the soap envelope string content = this.GetInputContent(); // add the content back to the correct soap response result = axAccess.executeWebservice(project, webservice, content); } catch (Exception ex) { result = String.Format("<xml>Error: {0}</xml>", ex.Message); } } return(Content(result)); }
private object makePingRequest(ClientConfiguration clientConfig) { using (AxAccess axAccess = new AxAccess(this.User.Identity.Name, this.Request.Url.AbsolutePath, "Get", clientConfig)) { string result = axAccess.executePing(); //result = "SOAP " + axAccess.checkConnection(this); return(new { isSuccess = true }); } }
/* public ActionResult getWsdl(string project, string webservice , string httpaction) * { * String result = ""; * Response.ContentType = @"text/xml"; * * * string url = this.Request.Url.AbsoluteUri; * url = url.Remove(url.Length -5); * * using (AxAccess axAccess = new AxAccess(this.User.Identity.Name, url, httpaction)) * * { * result = axAccess.executeWSDL(project, webservice); * } * * return Content(result); * } */ public ActionResult checkConnection(string project, string webservice) { String result = ""; Response.ContentType = @"text/plain"; ClientConfiguration clientConfig = ClientConfiguration.getClientConfiguration(); using (AxAccess axAccess = new AxAccess(this.User.Identity.Name, this.Request.Url.AbsolutePath, "get", clientConfig)) { result = axAccess.executePing(); } return(Content(result)); }
// // GET: /REST/ // GET: REST public ActionResult executeMessage(string project, string webservice) { //try //{ string httpaction = this.Request.HttpMethod.ToString(); String result; Response.ContentType = @"text/plain"; ClientConfiguration clientConfig = ClientConfiguration.getClientConfiguration(); //this.User.Identity.Name using (AxAccess axAccess = new AxAccess(this.User.Identity.Name, this.Request.Url.OriginalString, httpaction, clientConfig)) { try { Response.ContentType = @"text/plain"; string content = this.GetInputContent(); // add the content back to the correct soap response result = axAccess.executeWebservice(project, webservice, content); this.Response.StatusCode = (int)axAccess.StatusCode; } catch (Exception ex) { result = String.Format("<xml>Error: {0}</xml>", ex.Message); this.Response.StatusCode = (int)System.Net.HttpStatusCode.InternalServerError; } //result = "SOAP" + "" + axAccess.executewebservice(this, project, webservice, httpaction); } return(Content(result)); //} //catch //{ // return View(); //} }