使用 Visual Studio 2010,我开发了一个托管在 Web 应用程序上的 WCF 服务,供第三方使用。他们告诉我他们不能调用它。为了进行测试,他们将我重定向到 Altova XmlSpy 并指出,在创建新的 SOAP 请求时,如果他们在“更改 SOAP 请求参数”菜单项中选择“作为 SOAP+XML (SOAP 1.2) 发送”,他们会得到以下两个警报对话框:
HTTP error: could not POST file ‘/TurniArc/WebServices/Processi.svc’ on server ’10.51.0.108’ (415)
Error sending the soap data to ‘http://10.51.0.108/TurniArc/WebServices/Processi.svc’ HTTP error: could not POST file ‘/TurniArc/WebServices/Processi.svc’ on server ’10.51.0.108’ (415)
我确实证实了这一点。取消选中该选项,请求将根据需要提交。而且我在使用我一直用于内部测试的软件 soapUI 调用我的 Web 服务时从来没有遇到任何问题。
这是我创建的第一个 Web 服务,从没有任何理论知识开始(但我想每个人都这样做:-)),所以我什至不知道在哪里解决这个问题。问题可能出在绑定上吗?我使用 Add/New Item/WCF Service 创建了服务并保留了所有默认选项,因此它应该是 BasicHttpBinding
这是我的 web.config 的 serviceModel 部分
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
<!--other bindings related to proxies to other services I'm invoking -->
</system.serviceModel>
我的界面只有
[ServiceContract(Namespace="http://www.archinet.it/HRSuite/Processi/")]
属性和实现它的类具有
[ServiceBehavior(IncludeExceptionDetailInFaults = true, Namespace = "http://www.archinet.it/HRSuite/Processi/")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
属性
谢谢
编辑:第三方正在使用 Oracle SOA 中间件