# Using Ruby's soap4r v1.5.7 WSDL driver to call a # Microsoft C# SOAP web service # # This example calls a method that takes one parameter. # This syntax does not seem to be documented anywhere # else right now. # # Copyright (C) 2007 Harbor Mist, LLC # # This program is copyrighted free software by Pat Palmer, # owner of Harbor Mist, LLC. You can redistribute it # and/or modify it under the same terms of Ruby's license; # either the dual license version in 2003, or any later version. class GetUrl require 'soap/wsdlDriver' puts "calling RSSService.GetURL()" # ---------- create the web service proxy object ---------- wsdl_url = "http://harbormist.com/rss_service/RSSService.asmx?WSDL" #suppress printout of non-fatal warnings by the library $old_stderr = $stderr; $stderr = StringIO.new factory = SOAP::WSDLDriverFactory.new(wsdl_url) #restore the ability to see errors and warning by the library $stderr = $old_stderr driver = factory.create_rpc_driver # the following line for troubleshooting if needed # driver.wiredump_dev = STDERR # ---------- call the web service method ---------------- result = driver.getURL(:siteName => "Fox Business") puts result.getURLResult puts " " end