【发布时间】: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);
【问题讨论】: