ruby - 从 Ruby 成功调用 WCF 服务?任何人?

标签 ruby wcf soap soap4r savon

我正在尝试将 Rails 应用程序与 WCF 服务集成。我试过 soap4r 和 Savon,完全没有爱。据我所知,没有任何 Ruby 库支持最新版本的 SOAP。

我得到的错误是:

Cannot process the message because the content type 'text/xml;charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'.'application/soap+xml; charset=utf-8'.

我通过将 WCF 服务绑定(bind)从 wsHttpBinding 更改为 basicHttpBinding 设法解决了这个错误,但随后收到了新错误:

The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). (SOAP::FaultError)

现在,这个错误让我感到困惑,因为我看不到任何在任何 Ruby 库中配置端点的方法。有人知道吗?

有没有人从Ruby成功调用过WCF服务?'application/soap+xml;字符集=utf-8'。

最佳答案

请注意,我得到了这个工作......在我将服务的 web.config 更改为 basicHttpBinding 之后,Savon 能够发送和接收消息。只有 soap4r 无法停止并抛出 Action '' 错误。

关于ruby - 从 Ruby 成功调用 WCF 服务?任何人?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3527345/

相关文章:

ruby - {{ root_url }} 在 Octopress 中是空白的

ruby - Ruby 中的舍入不一致?

ruby - 如何使用 watir webdriver 检索元素属性列表

wcf - 通过代理服务器连接到 WCF 服务时出现奇怪的异常

php - SOAP 消息的最大大小是如何确定的?

ruby-on-rails - 在 Rails 中使用 include 时,排序方式不会排序

javascript - 这叫什么日期时间格式? "/Date(1565929330662)/"

.net - 通过 JSON 将流和参数解析为 WCF 操作契约(Contract)

javascript - CRM 2011 - 如何在 JavaScript 中使用 SOAP 请求检索全局选项集

java - maven tomcat部署soap web服务错误