Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- gem 'soap4r'
- require 'soap/soap'
- require 'defaultDriver'
- require 'client_auth_header_handler'
- d = Soap.new
- d.wiredump_dev = STDOUT
- h = ClientAuthHeaderHandler.new # Create a new handler
- l = d.login(:username => your_username, :password => your_password + security_token)
- d.endpoint_url = l.result.serverUrl # Change the endpoint to what login tells us it should be
- h.sessionid = l.result.sessionId # Tell the header handler what the session id is
- d.headerhandler << h # Add the header handler to the Array of headerhandlers
- d.getUserInfo("") # Make an API call; the empty String appears to be necessary
Add Comment
Please, Sign In to add comment