3 changed files with 277 additions and 0 deletions
-
15ThirdPlugIns/Shentun.Peis.PlugIns.Gem/Connected Services/ServiceReferenceYinHai/ConnectedService.json
-
218ThirdPlugIns/Shentun.Peis.PlugIns.Gem/Connected Services/ServiceReferenceYinHai/Reference.cs
-
44ThirdPlugIns/Shentun.Peis.PlugIns.Gem/LisRequests/YinHai/LisRequestPlugInsYinHai.cs
@ -0,0 +1,15 @@ |
|||
{ |
|||
"providerId": "Microsoft.Tools.ServiceModel.Svcutil", |
|||
"version": "2.0.3", |
|||
"options": { |
|||
"inputs": [ |
|||
"http://192.168.1.194:8080/jcdsbws/proxy/lis_server?wsdl" |
|||
], |
|||
"namespaceMappings": [ |
|||
"*, ServiceReference" |
|||
], |
|||
"outputFile": "Reference.cs", |
|||
"targetFramework": "net6.0", |
|||
"typeReuseMode": "All" |
|||
} |
|||
} |
|||
@ -0,0 +1,218 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,并在以下条件下丢失:
|
|||
// 代码重新生成。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace ServiceReferenceYinHai |
|||
{ |
|||
|
|||
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] |
|||
[System.ServiceModel.ServiceContractAttribute(Namespace="http://esb.webservice", ConfigurationName="ServiceReferenceYinHai.WebService")] |
|||
public interface WebService |
|||
{ |
|||
|
|||
[System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] |
|||
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] |
|||
System.Threading.Tasks.Task<ServiceReferenceYinHai.callBussinessResponse> callBussinessAsync(ServiceReferenceYinHai.callBussiness request); |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] |
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://esb.webservice")] |
|||
public partial class soapResponse |
|||
{ |
|||
|
|||
private string msgField; |
|||
|
|||
private string status_codeField; |
|||
|
|||
/// <remarks/>
|
|||
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] |
|||
public string msg |
|||
{ |
|||
get |
|||
{ |
|||
return this.msgField; |
|||
} |
|||
set |
|||
{ |
|||
this.msgField = value; |
|||
} |
|||
} |
|||
|
|||
/// <remarks/>
|
|||
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] |
|||
public string status_code |
|||
{ |
|||
get |
|||
{ |
|||
return this.status_codeField; |
|||
} |
|||
set |
|||
{ |
|||
this.status_codeField = value; |
|||
} |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] |
|||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
[System.ServiceModel.MessageContractAttribute(WrapperName="callBussiness", WrapperNamespace="http://esb.webservice", IsWrapped=true)] |
|||
public partial class callBussiness |
|||
{ |
|||
|
|||
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://esb.webservice", Order=0)] |
|||
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] |
|||
public string message; |
|||
|
|||
public callBussiness() |
|||
{ |
|||
} |
|||
|
|||
public callBussiness(string message) |
|||
{ |
|||
this.message = message; |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] |
|||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
[System.ServiceModel.MessageContractAttribute(WrapperName="callBussinessResponse", WrapperNamespace="http://esb.webservice", IsWrapped=true)] |
|||
public partial class callBussinessResponse |
|||
{ |
|||
|
|||
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://esb.webservice", Order=0)] |
|||
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] |
|||
public ServiceReferenceYinHai.soapResponse data; |
|||
|
|||
public callBussinessResponse() |
|||
{ |
|||
} |
|||
|
|||
public callBussinessResponse(ServiceReferenceYinHai.soapResponse data) |
|||
{ |
|||
this.data = data; |
|||
} |
|||
} |
|||
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] |
|||
public interface WebServiceChannel : ServiceReferenceYinHai.WebService, System.ServiceModel.IClientChannel |
|||
{ |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] |
|||
public partial class WebServiceClient : System.ServiceModel.ClientBase<ServiceReferenceYinHai.WebService>, ServiceReferenceYinHai.WebService |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 实现此分部方法,配置服务终结点。
|
|||
/// </summary>
|
|||
/// <param name="serviceEndpoint">要配置的终结点</param>
|
|||
/// <param name="clientCredentials">客户端凭据</param>
|
|||
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); |
|||
|
|||
public WebServiceClient() : |
|||
base(WebServiceClient.GetDefaultBinding(), WebServiceClient.GetDefaultEndpointAddress()) |
|||
{ |
|||
this.Endpoint.Name = EndpointConfiguration.WebServicePort.ToString(); |
|||
ConfigureEndpoint(this.Endpoint, this.ClientCredentials); |
|||
} |
|||
|
|||
public WebServiceClient(EndpointConfiguration endpointConfiguration) : |
|||
base(WebServiceClient.GetBindingForEndpoint(endpointConfiguration), WebServiceClient.GetEndpointAddress(endpointConfiguration)) |
|||
{ |
|||
this.Endpoint.Name = endpointConfiguration.ToString(); |
|||
ConfigureEndpoint(this.Endpoint, this.ClientCredentials); |
|||
} |
|||
|
|||
public WebServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : |
|||
base(WebServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) |
|||
{ |
|||
this.Endpoint.Name = endpointConfiguration.ToString(); |
|||
ConfigureEndpoint(this.Endpoint, this.ClientCredentials); |
|||
} |
|||
|
|||
public WebServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : |
|||
base(WebServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) |
|||
{ |
|||
this.Endpoint.Name = endpointConfiguration.ToString(); |
|||
ConfigureEndpoint(this.Endpoint, this.ClientCredentials); |
|||
} |
|||
|
|||
public WebServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : |
|||
base(binding, remoteAddress) |
|||
{ |
|||
} |
|||
|
|||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
System.Threading.Tasks.Task<ServiceReferenceYinHai.callBussinessResponse> ServiceReferenceYinHai.WebService.callBussinessAsync(ServiceReferenceYinHai.callBussiness request) |
|||
{ |
|||
return base.Channel.callBussinessAsync(request); |
|||
} |
|||
|
|||
public System.Threading.Tasks.Task<ServiceReferenceYinHai.callBussinessResponse> callBussinessAsync(string message) |
|||
{ |
|||
ServiceReferenceYinHai.callBussiness inValue = new ServiceReferenceYinHai.callBussiness(); |
|||
inValue.message = message; |
|||
return ((ServiceReferenceYinHai.WebService)(this)).callBussinessAsync(inValue); |
|||
} |
|||
|
|||
public virtual System.Threading.Tasks.Task OpenAsync() |
|||
{ |
|||
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); |
|||
} |
|||
|
|||
public virtual System.Threading.Tasks.Task CloseAsync() |
|||
{ |
|||
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); |
|||
} |
|||
|
|||
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) |
|||
{ |
|||
if ((endpointConfiguration == EndpointConfiguration.WebServicePort)) |
|||
{ |
|||
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding(); |
|||
result.MaxBufferSize = int.MaxValue; |
|||
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; |
|||
result.MaxReceivedMessageSize = int.MaxValue; |
|||
result.AllowCookies = true; |
|||
return result; |
|||
} |
|||
throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration)); |
|||
} |
|||
|
|||
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) |
|||
{ |
|||
if ((endpointConfiguration == EndpointConfiguration.WebServicePort)) |
|||
{ |
|||
return new System.ServiceModel.EndpointAddress("http://192.168.1.194:8080/jcdsbws/proxy/lis_server"); |
|||
} |
|||
throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration)); |
|||
} |
|||
|
|||
private static System.ServiceModel.Channels.Binding GetDefaultBinding() |
|||
{ |
|||
return WebServiceClient.GetBindingForEndpoint(EndpointConfiguration.WebServicePort); |
|||
} |
|||
|
|||
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() |
|||
{ |
|||
return WebServiceClient.GetEndpointAddress(EndpointConfiguration.WebServicePort); |
|||
} |
|||
|
|||
public enum EndpointConfiguration |
|||
{ |
|||
|
|||
WebServicePort, |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
using Dapper; |
|||
using Npgsql; |
|||
using NPOI.SS.Formula.Functions; |
|||
using ServiceReferenceDianLisResult; |
|||
using ServiceReferenceYinHai; |
|||
using Shentun.Peis.ImportLisResults; |
|||
using Shentun.Peis.PlugIns.Extensions.ImportLisResults.Dian; |
|||
using Shentun.Peis.PlugIns.ImportLisResults; |
|||
using Shentun.Peis.PlugIns.LisRequests; |
|||
using Shentun.Peis.PrintReports; |
|||
using Shentun.Peis.RegisterCheckPictures; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data.Common; |
|||
using System.Linq; |
|||
using System.ServiceModel; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Shentun.Peis.PlugIns.Extensions.LisRequests.Hzcy |
|||
{ |
|||
public class LisRequestPlugInsYinHai |
|||
{ |
|||
public LisRequestPlugInsYinHai() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public async Task Testssss(Guid patientRegisterId) |
|||
{ |
|||
string lisResultAddress = ""; |
|||
using (var client = CreateClient(lisResultAddress)) |
|||
{ |
|||
await client.callBussinessAsync(""); |
|||
} |
|||
} |
|||
|
|||
private WebServiceClient CreateClient(string url) |
|||
{ |
|||
return new WebServiceClient(new BasicHttpBinding(), |
|||
new EndpointAddress(url)); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue