コード例 #1
0
        public async Task <SoapResponse> ExecuteCommand(string command)
        {
            var result =
                await soapClient.PostAsync(
                    endpoint,
                    SoapVersion.Soap11,
                    soapParser.PrepareBody(command));

            var response = await result.Content.ReadAsStringAsync();

            return(soapParser.ParseResponse(response));
        }
コード例 #2
0
        public async Task <SoapResponse> ExecuteCommand(string command)
        {
            HttpResponseMessage result;

            try
            {
                result = await soapClient.PostAsync(
                    endpoint,
                    SoapVersion.Soap11,
                    soapParser.PrepareBody(command));
            }
            catch (Exception e)
            {
                throw new CouldNotConnectToRemoteServer(e);
            }

            var response = await result.Content.ReadAsStringAsync();

            return(soapParser.ParseResponse(response));
        }