public async Task <string> Login(string domain, string repository, string login, string password)
        {
            Dispose();
            string result = await executor.ExecuteRequest(InformaticaWebRequestsTemplates.GetLoginTemplate(domain, repository, login, password));

            string sessionId = ValuesSoapXml.GetValueOnElement(result, "SessionId");

            _sessionId = sessionId;
            return(sessionId);
        }
        public async Task <string> ExecuteRequest(XmlDocument soapEnvelopeXml)
        {
            HttpWebRequest webRequest = CreateWebRequest(_url);

            try
            {
                await InsertSoapEnvelopeIntoWebRequest(soapEnvelopeXml, webRequest);

                HttpWebResponse response = (HttpWebResponse)await webRequest.GetResponseAsync();

                using (StreamReader stream = new StreamReader(response.GetResponseStream()))
                    return(await stream.ReadToEndAsync());
            }
            catch (WebException ex)
            {
                var resp = await new StreamReader(ex.Response.GetResponseStream()).ReadToEndAsync();
                throw new WebException(ValuesSoapXml.GetValueOnElement(resp, "ErrorCode") + "\n" + ValuesSoapXml.GetValueOnElement(resp, "faultstring"));
            }
        }
        public async Task <string> GetSessionLog(string sessionId, string folderName, string workflowName, string taskInstancePath, int timeout = 60)
        {
            var result = await executor.ExecuteRequest(InformaticaWebRequestsTemplates.GetSessionLogTemplate(sessionId, folderName, workflowName, taskInstancePath, _serviceInfo, timeout));

            return(ValuesSoapXml.GetValueOnElement(result, "Buffer"));
        }