Call webservice in ruby

command : wsdl2ruby.rb –wsdl URL –type client –force

wsdl2ruby.rb –wsdl http://www.w3schools.com/webservices/tempconvert.asmx?WSDL –type client –force

you will see files in your root directory

move them in lib directory

now time to check

go to your console and make some requires

1) require ‘rubygems’
2) gem ‘soap4r’
3) require ‘soap/wsdlDriver’
4) require ‘defaultDriver’

okay .. now you can directly access stubs to request and response your webservice .

Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s