【问题标题】:wcf no deserialize the responsewcf 没有反序列化响应
【发布时间】:2022-06-17 09:13:33
【问题描述】:

我做了很多研究,但我找不到解决这个问题的方法。我正在使用肥皂服务,它成功地在邮递员和带有 Fiddler 的视觉工作室中返回响应,响应也成功。我的问题是该服务在旧的 2.0 框架(网络参考)中运行良好,现在当从 Core 调用它时,我得到 null 作为响应。我需要做任何额外的配置吗?哪里有这方面的信息?

这是 wsdl:https://maullin.sii.cl/DTEWS/CrSeed.jws?WSDL

这是 xml 响应:

我的应用:

CrSeedClient cliente = new();
getSeedRequest req = new();
string? token = cliente.getSeed(req).getSeedReturn; // return always nulll

参考文件:

public Seed.getSeedResponse getSeed(Seed.getSeedRequest request)
    {
        return base.Channel.getSeed(request); // return always nulll
    }


 [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
    [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, SupportFaults=true, Use=System.ServiceModel.OperationFormatUse.Encoded)]
    Semilla.getSeedResponse getSeed(Semilla.getSeedRequest request);

【问题讨论】:

    标签: c# .net-core soap wsdl


    【解决方案1】:

    此问题仅发生在 .NET Core 和 WCF 服务生成器中。从 SII WSDL 生成的代码与发送到 SII Web 服务的请求不兼容。显然,这需要由 SII 自己解决。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-13
      • 2014-08-31
      • 2017-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-08
      相关资源
      最近更新 更多