示例#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 WhenIUpdateDataThruPutAction(Table table)
        {
            UpdateOrder       request = table.CreateSet <UpdateOrder>().Single();
            SoapServiceClient client  = GetClient();

            client.Put(request);
        }
示例#3
0
        public void WhenIUpdateDataThruPutActionWithResponse(Table table)
        {
            UpdateOrder       request = table.CreateSet <UpdateOrder>().Single();
            SoapServiceClient client  = GetClient();
            var response = client.Put <bool>(request);

            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();
        }