Пример #1
0
        static void ExecuteSoap()
        {
            var client = new SoapServiceClient("NeliburSoapService");

            var createRequest = new CreateClientRequest
            {
                Email = "*****@*****.**"
            };
            ClientResponse response = client.Post <ClientResponse>(createRequest);

            var updateRequest = new UpdateClientRequest
            {
                Email = "*****@*****.**",
                Id    = response.Id
            };

            response = client.Put <ClientResponse>(updateRequest);

            var getClientRequest = new GetClientRequest
            {
                Id = response.Id
            };

            response = client.Get <ClientResponse>(getClientRequest);

            var deleteRequest = new DeleteClientRequest
            {
                Id = response.Id
            };

            client.Delete(deleteRequest);
        }
Пример #2
0
        public void WhenISendDataThruPostAction(Table table)
        {
            Order             order  = table.CreateSet <Order>().Single();
            SoapServiceClient client = GetClient();

            client.Post(order);
        }
Пример #3
0
        public void WhenISendDataThruPostWithResponseAction(Table table)
        {
            Order             order  = table.CreateSet <Order>().Single();
            SoapServiceClient client = GetClient();
            bool response            = client.Post <bool>(order);

            ScenarioContext.Current[ResopnseKey] = response;
        }
Пример #4
0
        private static void Main()
        {
            var client = new SoapServiceClient("NeliburSoapService");

            var createRequest = new CreateClientRequest
            {
                Email = "*****@*****.**"
            };

            Console.WriteLine("POST Request: {0}", createRequest);
            var response = client.Post <ClientResponse>(createRequest);

            Console.WriteLine("POST Response: {0}\n", response);

            var updateRequest = new UpdateClientRequest
            {
                Email = "*****@*****.**",
                Id    = response.Id
            };

            Console.WriteLine("PUT Request: {0}", updateRequest);
            response = client.Put <ClientResponse>(updateRequest);
            Console.WriteLine("PUT Response: {0}\n", response);

            var getClientRequest = new GetClientRequest
            {
                Id = response.Id
            };

            Console.WriteLine("GET Request: {0}", getClientRequest);
            response = client.Get <ClientResponse>(getClientRequest);
            Console.WriteLine("GET Response: {0}\n", response);

            var deleteRequest = new DeleteClientRequest
            {
                Id = response.Id
            };

            Console.WriteLine("DELETE Request: {0}", deleteRequest);
            client.Delete(deleteRequest);

            Console.ReadKey();
        }
Пример #5
0
        private static void Main()
        {
            var client = new SoapServiceClient("NeliburSoapService");

            var createRequest = new CreateClientRequest
            {
                Email = "*****@*****.**"
            };
            Console.WriteLine("POST Request: {0}", createRequest);
            var response = client.Post<ClientResponse>(createRequest);
            Console.WriteLine("POST Response: {0}\n", response);

            var updateRequest = new UpdateClientRequest
            {
                Email = "*****@*****.**",
                Id = response.Id
            };

            Console.WriteLine("PUT Request: {0}", updateRequest);
            response = client.Put<ClientResponse>(updateRequest);
            Console.WriteLine("PUT Response: {0}\n", response);

            var getClientRequest = new GetClientRequest
            {
                Id = response.Id
            };
            Console.WriteLine("GET Request: {0}", getClientRequest);
            response = client.Get<ClientResponse>(getClientRequest);
            Console.WriteLine("GET Response: {0}\n", response);

            var deleteRequest = new DeleteClientRequest
            {
                Id = response.Id
            };
            Console.WriteLine("DELETE Request: {0}", deleteRequest);
            client.Delete(deleteRequest);

            Console.ReadKey();
        }