问题标签 [savon]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1428 浏览

ruby - Ruby Savon 绑定问题

我正在使用 Savon 的 web 服务,并且 WSDL 带有 2 个绑定。如何指定在 Savon 中使用的绑定?其中一个是http,另一个是https.我正在尝试使用该https服务。

wsdl的资料

我如何使用 ES1?我现在与 savon 一起使用的代码是

当我使用soap4r时,我可以使用以下代码选择绑定:

0 投票
1 回答
2501 浏览

ruby - Savon ruby​​ gem 将 ins0 添加到标签

使用 savon gem,我得到以下请求 XML:

但它需要是这样的:

通知ins0被删除。

有什么建议么?

0 投票
0 回答
818 浏览

ruby - savon soap 请求执行已过期

我有一个非常简单的 ruby​​ 脚本,如下所示:

如果我然后做类似的事情:

我从我的服务中获取所有操作,因此它可以正确连接和检索 wsdl。

但是,如果我尝试运行操作

我得到“HTTPClient::ReceiveTimeoutError: execution expired” 我也在看 Fiddler,甚至没有看到任何请求。我已通过其他技术(C#、JS)确认该服务正常工作

知道我做错了什么吗?

0 投票
1 回答
1599 浏览

ruby - 使用 Ruby 和 Savon 发送 UTF-16 编码的 SOAP 请求

如何以 UTF-16 对请求进行编码?这是我所拥有的:

这是发送内容的请求,请注意 encoding="UTF-8":

这是我得到的错误:

0 投票
1 回答
340 浏览

ruby - Ruby Savon Requests

@rubiii has previously shown (Savon soap body problem) that you can customize Savon requests with

But why would you use a class method like this? It would seem more likely that you would ask an instance of a class to turn itself into a hash for the request body. i.e.

However, when I try doing this, @instance variable isn't in 'scope' within the request block. So I get a can't call method to_soap on nil. But if instead I use a class method then I can get it to work. i.e.

I don't get it?

0 投票
3 回答
6969 浏览

ruby - Ruby - Savon web services authentication

I'm attempting to utilize the ruby gem Savon to connect to a web service provided by propertyware (http://propertyware.com/apidocs/Getting-Started). I've successfully connected to the service via SoapUI and executed an echoString request. When I try to do the same via Ruby I get a null user authentication error.

Here's what I've tried in Ruby...

Which produces the following xml...

Here's the xml produced by SoapUI...

One obvious difference is that SoapUI includes a nonce key and a createdAt timestamp. I'm not sure how to make savon do that without moving to digest auth. (and fwiw that doesn't work).

I'm not real savoy in the ways of web services - any guidance would be much appreciated.

Also - here's the response when I attempt to connect via savon:

TIA! Bob

0 投票
1 回答
667 浏览

ruby-on-rails - Savon on Rails 3.1 - 无法使用 WSDL 调用方法

我想使用带有“verifyTransaction”方法的网络服务,该方法将两个字符串作为输入并返回一个双精度作为输出。我为此使用了以下代码:

但我得到了这个错误:

我一直在阅读网络上的所有资源,但找不到任何解决方案。请帮我解决一下这个。

0 投票
2 回答
3282 浏览

ruby-on-rails - SOAP on Rails,不能使用 Savon 调用带有 WSDL 的方法

我想使用金融机构的网络服务来“verifyTransaction”该方法获取两个字符串作为输入并返回一个双精度作为输出。

我在 rails 3.1 中使用 Savon 来调用该方法。

但我得到了这个错误:

关于如何解决这个问题的任何想法?

0 投票
3 回答
3661 浏览

ruby - Ruby:Savon SOAP 请求收到 400 和 415 错误

我正在尝试使用 ruby​​ 库 Savon 发出 SOAP 请求。

我正在使用以下代码:

但我不断收到 400 条错误消息(“错误请求”)。或者,如果我删除以下行

我收到 415 错误消息(“不支持的媒体类型”)。

到目前为止,我一直在使用 PHP 发出这些请求,并且以下代码始终可以正常工作:

任何人都可以指出正确的方向,可能的错误来源可能是什么?我现在完全迷路了。

谢谢您的帮助。


我按照 Tom De Leu 的建议做了,并尝试在生成的 SOAP 请求中尽可能多地消除有问题的差异。但我仍然不断收到 400 个错误。对此可能原因的任何提示将不胜感激。

这是 PHP 生成的(工作)请求(为清楚起见,在 XML 中添加了换行符):

这是 Ruby 生成的(不工作的)请求(再次,为清楚起见添加了 xml 换行符)

0 投票
0 回答
316 浏览

java - Ruby Savon 与 Java Axis 的比较

我正在尝试使用 Yodlee 肥皂 API。他们给出了 Apache Axis 的例子 任何关于使用 Ruby 和 Savon 与 Java 和 Axis 的观点?

对于 Ruby/Savon,似乎最好的做法是跳过使用 WSDL 文件并根据 Java/Axis 程序中的示例生成请求。我尝试使用 Savon 的 WSDL 功能,但我无法让它与非常复杂的 WSDL 中的许多嵌入式类型和名称空间一起工作。

查看 Java/Axis 代码,有大量生成的代码使 Java 开发人员无法了解 XML。有没有人尝试在 Ruby 世界中复制 Axis?

谢谢。