【发布时间】:2013-06-27 14:09:48
【问题描述】:
soapUI 在它构建的请求 XML 的许多地方生成此注释 Zero or more repetitions。这是 XML 请求的一部分。
<v1:Attachments>
<!--Zero or more repetitions:-->
<v1:Attachment>
<v1:FileName>?</v1:FileName>
<v1:FileExtension>?</v1:FileExtension>
<v1:FileContents>cid:1220950351678</v1:FileContents>
</v1:Attachment>
</v1:Attachments>
我正在使用 Savon 2.2.0 与外部服务进行通信。 Ruby hashes 需要唯一键。我尝试以
attachments: [{attachment:
{file_name: "foo1",
file_extension: "bar1",
file_contents:"binary_encoded_content"}},
{attachment:
{file_name: "foo2",
file_extension: "bar2",
file_contents: "binary_encoded_content"}}]
但在这种情况下,Savon 只是在数组上执行to_s。我怎样才能做到这一点?
【问题讨论】:
标签: ruby-on-rails soapui savon