# XMLRPC Problem

**URL:** <https://www.ruby-forum.com/t/xmlrpc-problem/87764>\
**Category:** Ruby\
**Created:** [March 5, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/xmlrpc-problem/87764 "2007-03-05T20:50:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deadinplastic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d2c977/32.png) [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Post date:** [March 5, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/xmlrpc-problem/87764/1 "2007-03-05T20:50:34Z")

</div>

Hello,

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](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.  
I am wondering if it even sends anythign?

---

<div class="post-metadata">

**Author:** ![deadinplastic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d2c977/32.png) [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Post date:** [March 5, 2007, 9:35pm UTC](https://www.ruby-forum.com/t/xmlrpc-problem/87764/2 "2007-03-05T21:35:53Z")

</div>

On Tue, Mar 06, 2007 at 04:50:36AM +0900, Aa Aa wrote:

> 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 install wireshark and use that (for a fluffy GUI interface).

If both sides are Windows, you can install wireshark, or its older  
cousin  
ethereal.

HTH,

Brian.

---

<div class="post-metadata">

**Author:** ![deadinplastic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d2c977/32.png) [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Post date:** [March 5, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/xmlrpc-problem/87764/3 "2007-03-05T22:47:02Z")

</div>

Brian C. wrote:

> > XMLRPC::Client.new2(“[https://vwtest.oas.psu.edu/isapi/gi.dll/rpc2](https://vwtest.oas.psu.edu/isapi/gi.dll/rpc2)”)  
> > 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](http://time.xmlrpc.com)’,  
‘/RPC2’, 80)  
client.call(‘currentTime.getCurrentTime’)  
puts client.conversation.to\_yaml

## $ ruby xmlrpc\_conversation.rb

- 
  - | \<?xml version="1.0"

?\>currentTime.getCurrentTime

- |\<?xml version="1.0"?\> 

\<dateTime.iso8601\>20070305T13:43:22\</dateTime.iso8601\>

Is that helpful?

---

<div class="post-metadata">

**Author:** ![deadinplastic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d2c977/32.png) [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Post date:** [March 5, 2007, 11:54pm UTC](https://www.ruby-forum.com/t/xmlrpc-problem/87764/4 "2007-03-05T23:54:37Z")

</div>

HELPFULL!?!! Helpful is not the word. You should be elevated to god-like  
status :).  
Your solution exposed my embarrasing stupidity and lack of attention  
plus it taught me something.  
Ruby does force me think harder at stuff and certainly didn’t try hard  
enough.  
Thanks again.

Brian: Yours helped me too. That’s how I figured out that there was no  
communication except certificate handshake. HTTPAnalyzer isn’t able to  
capture anything for whatever reason.

Mucho THNX

Alex Y. wrote:

> Brian C. wrote:
> 
> > > XMLRPC::Client.new2(“[https://vwtest.oas.psu.edu/isapi/gi.dll/rpc2](https://vwtest.oas.psu.edu/isapi/gi.dll/rpc2)”)  
> > > 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](http://time.xmlrpc.com)’,  
> ‘/RPC2’, 80)  
> client.call(‘currentTime.getCurrentTime’)  
> puts client.conversation.to\_yaml
> 
> ## $ ruby xmlrpc\_conversation.rb
> 
> - 
> - | \<?xml version="1.0"
> 
> ?\>currentTime.getCurrentTime
> 
> - |\<?xml version="1.0"?\> 
> 
> \<dateTime.iso8601\>20070305T13:43:22\</dateTime.iso8601\>
> 
> Is that helpful?

---

<div class="post-metadata">

**Author:** ![deadinplastic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d2c977/32.png) [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Post date:** [March 6, 2007, 11:19am UTC](https://www.ruby-forum.com/t/xmlrpc-problem/87764/5 "2007-03-06T11:19:22Z")

</div>

Aa Aa wrote:

> HELPFULL!?!! Helpful is not the word. You should be elevated to god-like  
> status :).  
> Now now, don’t be too hasty - I’m only channelling the wonder of Matz  
> 🙂

> Your solution exposed my embarrasing stupidity and lack of attention  
> plus it taught me something.  
> We’re all learning here - I don’t think there’s anything to be ashamed  
> of in asking a question if you honestly can’t see a way through, even if  
> the answer does look obvious when you see it. Hell, I’ve done it enough  
> times…

> Ruby does force me think harder at stuff  
> That’s why I love it 🙂

> Thanks again.  
> No worries.
