【发布时间】:2016-05-13 11:17:58
【问题描述】:
StackOverflow 上有很多similar 问题。如果这是重复的,我希望能稍微解释一下如何在我的上下文中应用其他解决方案。
我有一个 WebAPI 项目。该 WebAPI 依次调用 Web 服务 (WSDL),处理数据并返回给客户端:
[Client] ----> [My WebAPI] ----> [WSDL Server]
|
<-------- [My WebAPI] <---------
WSDL 部分是基于 Java 的服务。我们可以在 VS2015 中毫无问题地使用它的唯一方法是将其添加为 Web 参考(对话框中的 2.0)。它完美地工作,根据需要使用强类型值,但今天我们看到 My WebApi 和 WSDL Server 之间的超时。
在关于 SO 的其他答案中,我看到可以在 web.config <bindings> 或通过代理配置超时期限,但鉴于我的 web.config 内容不同,我看不到如何连接它大量来自其他民族。下面的代码是VS2015在消费WSDL服务时生成的:
<system.serviceModel>
<bindings />
<client />
</system.serviceModel>
<applicationSettings>
<MyWebAPI.Properties.Settings>
<setting name="MyWebAPIs_ThirdPartyWSDLService_GetData" serializeAs="String">
<value>https://wsdl.domain.com/webservices/services/GetData</value>
</setting>
</MyWebAPIs.Properties.Settings>
</applicationSettings>
我在 c# intellisense 代码中也找不到任何关于超时的提及。任何帮助或指示将不胜感激。我已经阅读了大约 12 篇关于 SO 的帖子,但仍然无法弄清楚。
【问题讨论】:
标签: c# asp.net web-services wsdl