1
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

Gives results {"@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! ..."
Palani Kannan
  • 1,613
  • 2
  • 18
  • 29
  • this is the first wsdl i've seen that soapUI is not able to parse. pretty weird. how do you know which input parameters to supply and what's that string you're expecting? please provide some further information. – rubiii Sep 14 '11 at 20:19
  • input parameter was provided by the documentation from server. http://www.brenda-enzymes.org/soap2/. The important consideration, If there is parameter declaration its not producing expected result. Some of soap actions without parameter are producing well. This also a weird feel from me. – Palani Kannan Sep 15 '11 at 08:32
  • Any firewall issue? or port problem? Any Idea?... but, still its working fine for some other soap actions which don't need parameters like ecNumber. eg. client.request :get_reference_by_id {soap.body = "1356895"} – Palani Kannan Sep 15 '11 at 08:33

1 Answers1

0

I finally got it working by using the SOAP::Lite Perl library, enabling debug output and executing a sample request from their website.

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]
rubiii
  • 6,903
  • 2
  • 38
  • 51
  • c-gensym3 - What it mean? i cannot understand. What is the relation between SOAP::Lite library of Perl and Ruby script with Savon::Client? – Palani Kannan Sep 16 '11 at 11:58
  • i don't know what it means. i used the perl soap client to execute a sample request and it was able to parse the wsdl and created a soap request with the `c-gensym3` parameter for me. i enabled debug output to see the raw soap request and used these information to create a soap request with savon. – rubiii Sep 16 '11 at 16:19
  • Anyway.. It is working for me too without the reason. If you come across any reason please convey me. "If any other people come to know please convey us" – Palani Kannan Sep 20 '11 at 07:46