苏源_ 2023-03-15 16:32 采纳率: 0%
浏览 13

C#WCFWebService调用接口

C#net6.0 环境
使用WCF Web Service 调用其他系统的接口

img

 //当statue为结案时                     已捕获异常
 Dictionary<string
 string] reportda                     System.ServiceModel.FaultException:triedtoaccess
 if (BaseInfo.PPTA
                     method
                    org.apache.cxf.interceptor.Abstractlogginglnterceptor.getMe
                     SsageLogger(Lorg/apache/cxf/message/Message)Ljava/util/
   reportdatas
                     此异常最初是在此调用堆栈中引发的
 map.AddFIELDO0                        [外部代码1
 string fileJson
 //string]pptadd                     显示调用堆栈              查看详细信息              复制详细信息               启动LiveShare会话
 vcarapiClient vcai
 var binding =new
                     异常设置
                       引发此异常类型时中断
 binding.MaxBuffer
 binding.MaxReceiy
                          从以下位置引发时除外
 binding. SendTimeoSrm.VCAR.Application.dll
                       打开异常设置编辑条件
 Var aaa =awaitv

报错信息:

System.ServiceModel.FaultException: tried to access method org.apache.cxf.interceptor.AbstractLoggingInterceptor.getMessageLogger(Lorg/apache/cxf/message/Message;)Ljava/util/logging/Logger; from class org.apache.cxf.interceptor.LoggingSoapIn at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator.<>c__DisplayClass1_0.<CreateGenericTask>b__0(IAsyncResult asyncResult) --- End of stack trace from previous location --- at Srm.VCAR.Application.Commands.CreateD1TeamCommandHandler.HandleAsync(CreateD1TeamCommand request, IDbConnection dbConnection, CancellationToken cancellationToken) in D:\SRM\srm-api\src\Srm.VCAR.Application\D1Team\Commands\CreateD1TeamCommand.cs:line 695

代码如下:

                        string fileJson = JsonConvert.SerializeObject(map);
                        vcarapiClient vcarapi = new vcarapiClient();
                        var binding = new BasicHttpBinding();
                        binding.MaxBufferSize = 10000000;
                        binding.MaxReceivedMessageSize = 10000000;
                        binding.SendTimeout = new TimeSpan(00, 10, 00);
                        var aaa = await vcarapi.Receive8DDataAsync(BaseInfo.Bindid, fileJson);

本地也可以ping通别人的地址,接口文档也可以打开;执行到最后一行就报错了,麻烦各位帮忙看一下

  • 写回答

5条回答 默认 最新

  • threenewbee 2023-03-15 16:37
    关注

    检查下防火墙,端口是否被占用

    评论

报告相同问题?

问题事件

  • 创建了问题 3月15日

悬赏问题

  • ¥30 基于信创PC发布的QT应用如何跨用户启动后输入中文
  • ¥20 非root手机,如何精准控制手机流量消耗的大小,如20M
  • ¥15 远程安装一下vasp
  • ¥15 自己做的代码上传图片时,报错
  • ¥15 Lingo线性规划模型怎么搭建
  • ¥15 关于#python#的问题,请各位专家解答!区间型正向化
  • ¥15 unity从3D升级到urp管线,打包ab包后,材质全部变紫色
  • ¥50 comsol温度场仿真无法模拟微米级激光光斑
  • ¥15 上传图片时提交的存储类型
  • ¥15 VB.NET如何绘制倾斜的椭圆