Created
June 10, 2010 09:37
-
-
Save sdqali/432769 to your computer and use it in GitHub Desktop.
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
| sdqali@sdqali:~/src/sdqali/bugzilla4r$ irb | |
| irb(main):001:0> require 'xmlrpc/client' | |
| => true | |
| irb(main):002:0> handler = XMLRPC::Client.new2('http://localhost/bugzilla3/xmlrpc.cgi') | |
| => #<XMLRPC::Client:0xb775d458 @http=#<Net::HTTP localhost:80 open=false>, @proxy_host=nil, @http_last_response=nil, @parser=nil, @timeout=30, @path="/bugzilla3/xmlrpc.cgi", @password=nil, @http_header_extra=nil, @use_ssl=false, @host="localhost", @user=nil, @proxy_port=nil, @auth=nil, @cookie=nil, @create=nil, @port=80> | |
| irb(main):003:0> user = handler.proxy("User") | |
| => #<XMLRPC::Client::Proxy:0xb7880b50 @meth=:call, @args=[], @prefix="User.", @server=#<XMLRPC::Client:0xb775d458 @http=#<Net::HTTP localhost:80 open=false>, @proxy_host=nil, @http_last_response=nil, @parser=nil, @timeout=30, @path="/bugzilla3/xmlrpc.cgi", @password=nil, @http_header_extra=nil, @use_ssl=false, @host="localhost", @user=nil, @proxy_port=nil, @auth=nil, @cookie=nil, @create=nil, @port=80>> | |
| irb(main):004:0> user.login({'login' => 'mira@localhost.localdomain', 'password' => 'fgffty', 'remember' => 'true'}) | |
| => {"id"=>1} | |
| irb(main):005:0> bugs = handler.proxy("Bug") | |
| => #<XMLRPC::Client::Proxy:0xb7855c84 @meth=:call, @args=[], @prefix="Bug.", @server=#<XMLRPC::Client:0xb775d458 @http=#<Net::HTTP localhost:80 open=true>, @proxy_host=nil, @http_last_response=#<Net::HTTPOK 200 OK readbody=true>, @parser=#<XMLRPC::XMLParser::REXMLStreamParser:0xb6ec401c @parser_class=XMLRPC::XMLParser::REXMLStreamParser::StreamListener>, @timeout=30, @path="/bugzilla3/xmlrpc.cgi", @password=nil, @http_header_extra=nil, @use_ssl=false, @host="localhost", @user=nil, @proxy_port=nil, @auth=nil, @cookie="Bugzilla_login=1; Bugzilla_logincookie=sywjzTicpj", @create=#<XMLRPC::Create:0xb7845e10 @writer=#<XMLRPC::XMLWriter::Simple:0xb7845e74>>, @port=80>> | |
| irb(main):006:0> bugs.get({'ids' => [1]}) | |
| Errno::EPIPE: Broken pipe | |
| from /usr/lib/ruby/1.8/net/protocol.rb:177:in `write' | |
| from /usr/lib/ruby/1.8/net/protocol.rb:177:in `write0' | |
| from /usr/lib/ruby/1.8/net/protocol.rb:153:in `write' | |
| from /usr/lib/ruby/1.8/net/protocol.rb:168:in `writing' | |
| from /usr/lib/ruby/1.8/net/protocol.rb:152:in `write' | |
| from /usr/lib/ruby/1.8/net/http.rb:1544:in `send_request_with_body' | |
| from /usr/lib/ruby/1.8/net/http.rb:1529:in `exec' | |
| from /usr/lib/ruby/1.8/net/http.rb:1048:in `request' | |
| from /usr/lib/ruby/1.8/net/http.rb:992:in `post2' | |
| from /usr/lib/ruby/1.8/xmlrpc/client.rb:538:in `do_rpc' | |
| from /usr/lib/ruby/1.8/xmlrpc/client.rb:420:in `call2' | |
| from /usr/lib/ruby/1.8/xmlrpc/client.rb:410:in `call' | |
| from /usr/lib/ruby/1.8/xmlrpc/client.rb:617:in `send' | |
| from /usr/lib/ruby/1.8/xmlrpc/client.rb:617:in `method_missing' | |
| from (irb):6 | |
| from /usr/lib/ruby/1.8/date.rb:546 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment