Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/tags/RELEASE_1_3_5/sample/whois2.rb

Revision 224, 0.7 kB (checked in by nakahiro, 8 years ago)

Whois service in XMethods sample

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to author date id revision
Line 
1 #!/usr/bin/env ruby
2
3 proxy = ARGV.shift || nil
4
5 require 'soap/driver'
6 require 'soap/XMLSchemaDatatypes1999'
7
8 server = 'http://webservices.matlus.com/scripts/whoiswebservice.dll/soap/IWhoIs'
9 interface = 'urn:WhoIsIntf-IWhoIs'
10
11
12 ###
13 ## Create Proxy
14 #
15 def getWireDumpLogFile
16   logFilename = File.basename( $0 ) + '.log'
17   f = File.open( logFilename, 'w' )
18   f << "File: #{ logFilename } - Wiredumps for SOAP4R client.\n"
19   f << "Date: #{ Time.now }\n\n"
20 end
21
22 whois = SOAP::Driver.new( Log.new( STDERR ), 'SampleApp', interface, server, proxy )
23 whois.setWireDumpDev( getWireDumpLogFile )
24 whois.addMethodWithSOAPAction( 'GetWhoIs', interface + '#GetWhoIs', 'ADomainName' )
25
26 p whois.GetWhoIs( 'sarion.com' )
27 raise
Note: See TracBrowser for help on using the browser.