using ServiceReference1; using Xunit; using Xunit.Abstractions; using static ServiceReference1.bstjPortTypeClient; namespace Shentun.Peis.PlugIns.Gem.Test { public class HisTest { private readonly ITestOutputHelper _output; public HisTest(ITestOutputHelper testOutputHelper) { _output = testOutputHelper; } [Fact] public void GetPatientQuery() { //var binding = new BasicHttpBinding(); //var endpoint = new EndpointAddress("http://www.yourwebservice.com/Service"); //using (var channelFactory = new ChannelFactory(binding, endpoint)) //{ // var client = channelFactory.CreateChannel(); // var result = await client.YourOperationAsync(yourParameters); // Console.WriteLine(result); //} var client = new bstjPortTypeClient(EndpointConfiguration.bstjHttpSoap11Endpoint); string xml = @" HIS PAT_0103 3.1 110101202404238836 01 体检调试一 1 2024-04-23 13700000001 01 测试单位
测试地址
"; var result = client.invokeAsync("patientQuery", "", "", xml).Result; _output.WriteLine(result.ToString()); } } }