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

root/tags/RELEASE_1_4_2/sample/babelfishVelociGen.rb

Revision 369, 491 bytes (checked in by nakahiro, 7 years ago)

Added some samples.

  • 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 Input = Struct.new( 'Input', :text, :language )
9
10 InterfaceNS = 'urn:vgx-translate'
11 server = 'http://services.xmltoday.com/vx_engine/soap-trigger.pperl'
12
13
14 drv = SOAP::Driver.new( nil, nil, InterfaceNS, server, proxy, InterfaceNS )
15 drv.addMethod( 'getTranslation', 'input' )
16 drv.setWireDumpDev( STDERR )
17
18 anInput = Input.new( 'Hello World.', 'Spanish' )
19 drv.getTranslation( anInput )
Note: See TracBrowser for help on using the browser.