萨翁的身体问题

时间:2011-09-14 12:52:23

标签: ruby soap wsdl savon

require "savon"

client = Savon::Client.new "http://www.brenda-enzymes.org/soap2/brenda.wsdl"

response = client.request (:get_km_value) do |soap|
    soap.body = {'ecNumber' => '1.1.1.1'}
end

x = response[:get_km_value_response][:return]
puts x
  

给出结果{“@xsi:type”=>“xsd:string”}

Expected Result:

"ecNumber*string#kmValue*string#kmValueMaximum*string#substrate*string#commentary*string#organism*string#ligandStructureId*string! ecNumber*string#kmValue*string#kmValueMaximum*string#substrate*string#commentary*string#organism*string#ligandStructureId*string! ecNumber*string#kmValue*string#kmValueMaximum*string#substrate*string#commentary*string#organism*string#ligandStructureId*string! ..."

1 个答案:

答案 0 :(得分:0)

我最终使用SOAP::Lite Perl library,启用debug output并从其网站执行示例请求。

client = Savon::Client.new "http://www.brenda-enzymes.org/soap2/brenda.wsdl"

response = client.request(:get_km_value) do
  soap.body = {
    "c-gensym3" => "ecNumber*1.1.1.1#organism*Homo sapiens#"
  }
end

puts response[:get_km_value_response][:return]