|
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 |
|
|---|
| 7 |
server = 'http://www.SoapClient.com/xml/SQLDataSoap.WSDL' |
|---|
| 8 |
interface = 'http://www.SoapClient.com/xml/SQLDataSoap.xsd' |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
### |
|---|
| 12 |
## Create Proxy |
|---|
| 13 |
# |
|---|
| 14 |
def getWireDumpLogFile |
|---|
| 15 |
logFilename = File.basename( $0 ) + '.log' |
|---|
| 16 |
f = File.open( logFilename, 'w' ) |
|---|
| 17 |
f << "File: #{ logFilename } - Wiredumps for SOAP4R client.\n" |
|---|
| 18 |
f << "Date: #{ Time.now }\n\n" |
|---|
| 19 |
end |
|---|
| 20 |
|
|---|
| 21 |
whois = SOAP::Driver.new( Log.new( STDERR ), 'SampleApp', interface, server, proxy ) |
|---|
| 22 |
whois.setWireDumpDev( getWireDumpLogFile ) |
|---|
| 23 |
whois.addMethod( 'ProcessSRL', 'SRLFile', 'RequestName', 'key' ) |
|---|
| 24 |
|
|---|
| 25 |
whois.ProcessSRL( 'WHOIS.SRI', 'whois', 'sarion.com' ) |
|---|