public void Does_call_Hello_Service() { var client = new Soap12ServiceClient(Config.ServiceStackBaseUri); var response = client.Send<HelloResponse>(new Hello { Name = "World" }); Assert.That(response.Result, Is.EqualTo("Hello, World")); }
public void Does_call_Hello_Service() { var client = new Soap12ServiceClient(Config.ServiceStackBaseUri); var response = client.Send <HelloResponse>(new Hello { Name = "World" }); Assert.That(response.Result, Is.EqualTo("Hello, World")); }
public void TestSoap12() { var client = new Soap12ServiceClient("http://localhost:6982/"); var response = client.Send <HelloResponse>(new Hello { Id = 1 }); Assert.That(response.Result, Contains.Substring("Leanne Graham")); }
public object Execute(Test request) { var client = new Soap12ServiceClient("http://localhost/ServiceStack.WebHost.IntegrationTests/api/"); var response = client.Send <HelloResponse>(new Hello { Name = request.Name }); return(new TestResponse { Result = response.Result }); }
public void Get_customers_using_Soap12ServiceClient() { using (IServiceClient client = new Soap12ServiceClient(base.WsSyncReplyUri)) { var request = new GetCustomers { CustomerIds = new ArrayOfIntId { CustomerId } }; var response = client.Send <GetCustomersResponse>(request); Assert.AreEqual(1, response.Customers.Count); Assert.AreEqual(CustomerId, response.Customers[0].Id); } }
public void Get_customers_using_dto_from_xsd_and_deserialize() { using (var client = new Soap12ServiceClient(base.WsSyncReplyUri)) { var request = new xsd.GetCustomers { Version = 100, CustomerIds = new xsd.ArrayOfIntId { CustomerId } }; var response = client.Send(request); var customersResponse = response.GetBody <xsd.GetCustomersResponse>(); Assert.AreEqual(1, customersResponse.Customers.Length); Assert.AreEqual(CustomerId, customersResponse.Customers[0].Id); } }
public void Get_customers_using_dto_from_assembly_and_deserialize() { using (var client = new Soap12ServiceClient(base.WsSyncReplyUri)) { var request = new GetCustomers { CustomerIds = new ArrayOfIntId { CustomerId } }; var response = client.Send(request); var customersResponse = response.GetBody <GetCustomersResponse>(); Assert.AreEqual(1, customersResponse.Customers.Count); Assert.AreEqual(CustomerId, customersResponse.Customers[0].Id); } }
public void Get_customers_using_dto_from_assembly_and_parse_with_xlinq() { using (var client = new Soap12ServiceClient(base.WsSyncReplyUri)) { var request = new GetCustomers { CustomerIds = new ArrayOfIntId { CustomerId } }; var response = client.Send(request); var el = XNode.ReadFrom(response.GetReaderAtBodyContents()) as XElement; var customers = el.AnyElement("Customers").AllElements("Customer").ToList(); Assert.AreEqual(1, customers.Count); Assert.AreEqual(CustomerId, customers[0].GetInt("Id")); } }
public void Can_send_SoapRequest() { var client = new Soap12ServiceClient(Config.ServiceStackBaseUri); // var client = new Soap12ServiceClient("http://test.servicestack.net"); var request = new GetStuff { SummaryDate = DateTime.Parse("2018-04-26"), SummaryEndDate = DateTime.Parse("2018-04-26"), Symbol = "TOU", Email = "*****@*****.**", IsEnabled = true, }; var response = client.Send(request); Assert.That(response.SummaryDate, Is.EqualTo(request.SummaryDate)); Assert.That(response.SummaryEndDate, Is.EqualTo(request.SummaryEndDate)); Assert.That(response.Symbol, Is.EqualTo(request.Symbol)); Assert.That(response.Email, Is.EqualTo(request.Email)); Assert.That(response.IsEnabled, Is.EqualTo(request.IsEnabled)); }
public object Any(Test request) { var client = new Soap12ServiceClient("http://localhost/ServiceStack.WebHost.IntegrationTests/api/"); var response = client.Send<HelloResponse>(new Hello { Name = request.Name }); return new TestResponse { Result = response.Result }; }