【发布时间】:2017-03-03 18:27:19
【问题描述】:
我引用了 WSDL 文件并向 SAP Web 服务发出请求并得到以下异常
System.ServiceModel.FaultException:服务器错误服务器堆栈跟踪:在 System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) 在 [0] 处重新抛出异常:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 类型)
我可以通过 SOAPUI 中的 WSDL 使用 Web 服务。
我还设置了以下绑定属性。
var binding = new BasicHttpsBinding
{
SendTimeout = TimeSpan.MaxValue,
MaxReceivedMessageSize = Int32.MaxValue,
CloseTimeout = TimeSpan.MaxValue,
OpenTimeout = TimeSpan.MaxValue,
ReceiveTimeout = TimeSpan.MaxValue,
MaxBufferPoolSize = Int64.MaxValue
};
我跟踪来自 fiddler 的 Visual Studio 请求,并且可以从 SoapUI 执行相同的请求,但是在尝试通过 Visual Studio 消费时,发生了异常。
【问题讨论】:
标签: c# .net web-services wcf sap