Last active
July 17, 2016 04:14
-
-
Save sankichi92/846b9cc4ad3f4959581631c962b3d150 to your computer and use it in GitHub Desktop.
Service Computing Assignment 3 - Practice of Information Systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'savon' | |
source_lang, target_lang, source = ARGV | |
wsdl = 'http://langrid.org/service_manager/wsdl/KyotoUJServer' | |
auth = %w(username password) # TODO: replace username and password with yours | |
client = Savon.client(wsdl: wsdl, basic_auth: auth) | |
response = client.call(:translate) do | |
message sourceLang: source_lang, targetLang: target_lang, source: source | |
end | |
# p response.body | |
puts response.body[:translate_response][:translate_return] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirement
I used Savon (2.11.1).
Usage
Then you can get following results.