From: Alex Young Date: 2007-03-06T06:46:36+09:00 Subject: Re: XMLRPC Problem Brian Candler wrote: > On Tue, Mar 06, 2007 at 04:50:36AM +0900, Aa Aa wrote: >> I am trying to run a small test case here and it times out on me all the >> time: >> Here is my code: >> >> require 'xmlrpc/client' >> require 'pp' >> >> applicationName = "Demo AcceptanceTestingApp" >> server = >> XMLRPC::Client.new2("https://vwtest.oas.psu.edu/isapi/gi.dll/rpc2") >> result = server.call("blank","whatever",applicationName) >> pp result >> >> The call just times out even though I have other programs in Python, CF >> working just fine. >> Is there any way to see what ruby sends to the server? I tried using >> HTTPAnalyzer, but it captures nothing. > > If one side is Linux, try > > tcpdump -i eth0 -n -s0 -X tcp port 80 Or: $ cat xmlrpc_conversation.rb require 'xmlrpc/client' require 'yaml' module XMLRPC class ConversationSavingClient < Client attr_reader :conversation def initialize(*args) super @conversation = [] end def do_rpc(request, async=false) response = super(request, async) @conversation << [request, response] return response end end end client = XMLRPC::ConversationSavingClient.new('time.xmlrpc.com', '/RPC2', 80) client.call('currentTime.getCurrentTime') puts client.conversation.to_yaml $ ruby xmlrpc_conversation.rb --- - - | currentTime.getCurrentTime - | 20070305T13:43:22 Is that helpful? -- Alex