Consume Web Service With Ruby
require ’soap/wsdlDriver’
Setup The SOAP Driver Using The WSDL URI
wsdlUri = ‘<WSDL URI>’
driver = SOAP::WSDLDriverFactory.new(wsdlUri).create_rpc_driver
Invoke Web Service Method
puts driver.<method name>().to_s
Software For Every Situation.
Archive for the ‘Web Services’ Category.
require ’soap/wsdlDriver’
Setup The SOAP Driver Using The WSDL URI
wsdlUri = ‘<WSDL URI>’
driver = SOAP::WSDLDriverFactory.new(wsdlUri).create_rpc_driver
Invoke Web Service Method
puts driver.<method name>().to_s
Create API /app/apis/<object name>.rb
class <object name>Api < ActionWebService::API::Base
api_method :<method name>,
:expects => [{:<parameter 1 name> => :string}, {:<parameter 2 name> => :string}],
:returns => [:string]
end
Create Controller /app/controllers/<object name>_controller.rb
class <object name>Controller < ApplicationController
def <method name>(<parameter 1 name>, <parameter 2 name>)
Code Here
end
end