如何使用在VS2017中的点Net Core 2中通过连接的服务创建的ASMX WebService接口

时间:2018-09-13 15:42:32

标签: c# web service .net-core asmx

因此,我在dotnet核心内创建了对旧ASMX Web服务的引用。它创建了一个目标文件,但是我无法直接访问Web服务方法。它确实创建了一个包含我需要访问的方法的接口。

一些生成的代码

    ------------------------------------------------------------------------------

namespace LegacyClient
{


    [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://echromics.corp", ConfigurationName="LegacyClient.ViewWSSoap")]
    public interface ViewWSSoap
    {

 [System.ServiceModel.OperationContractAttribute(Action="http://echromics.corp/SCADA_Request", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(IGProcessData))]
        System.Threading.Tasks.Task<LegacyClient.Packet> SCADA_RequestAsync(string Input1, string Input2, string Input3, string Input4, string Input5, string Input6, string Input7, string Input8, string Input9, string Input10, int BONumber, string LiteID, string RequestFunction, string Origin, string SecurityToken);
      }

0 个答案:

没有答案
相关问题