Help with university assignment

So, we are supposed to create an xml-rpc based event manager using 2-3
programming languages. C#, Java, Ruby.

I opted for ruby(i did this course last year but the dropped out).
So, this time i am really trying.
The code is not the actual problem for me.

It is the testing.

Right now i am attempting this: my usual machine(windows 7), and a
virtual machine running windows xp.

in both there is the same program:

require “xmlrpc/server”
require “xmlrpc/client”
s =

s.add_handler(“add”) do|id,date,time,duration,header,comment|
eventCounter=eventCounter+1"#{id}"+".event", ‘w’) {|f| f.write("#{date}| #{time}|
#{duration}| #{header}| #{comment}") }


s.add_handler(“delete”)do |id|
s.set_default_handler do |name, *args|
raise, “Method #{name} missing” +
" or wrong number of parameters!")

server =“”, “/RPC2”, 8080)
puts “Press 1 to add an event\n”
puts “Press 2 to remove an event of given ID\n”

while whatToDo!="-1"
  puts "Press 1 to add an event\n"
  puts "Press 2 to remove an event of given ID\n"

  case whatToDo
    when 1"add",eventCounter,"03/10/2011","sadkfdsa","not

long",“some header”,“some comment”)
when 2
puts “Input ID to delete\n”
    puts "Please input 1 or 2"

  end"delete","2")   Delete example




One one computer i am running port 8080, on the other 8090 for the

I was also wondering, which ip do i have to write? i tried but
that ofcourse executes locally.
I tried and .8 depending on the machines(their
corresponding ip for the router).

I also tried my web ip, but ofc that is the same for both machines cos
i’m behind 1 router.

Can some1 please help me in this part? If i get past this, i can test my
code everytime i plan something. This ofcourse means i can do my

Ofcourse i opened the ports 8080 and 8090 in my router.

I have also attempted running the example code for xmlrpc server and
require “xmlrpc/server”

s =

s.add_handler(“michael.add”) do |a,b|
a + b

s.add_handler(“michael.div”) do |a,b|
if b == 0
raise, “division by zero”)
a / b

s.set_default_handler do |name, *args|
raise, “Method #{name} missing” +
" or wrong number of parameters!")


require “xmlrpc/client”

server =“”, “/RPC2”, 8080)
param =“michael.add”, 4, 5)
puts “4 + 5 = #{param}”
rescue XMLRPC::FaultException => e
puts “Error:”
puts e.faultCode
puts e.faultString

I really have no idea what i am doing wrong. And i do understand it isnt
really a ruby question, but i really have no idea where i could ask a
question like this

If somebody can solve this, then cyber beer is yours forever :slight_smile:

Regards, Nikita

On Tue, Oct 4, 2011 at 8:37 AM, Nikita Kuznetsov
[email protected] wrote:

My Arch Linux VM:

08:42:[email protected]:/home/phgaw
$ hostname
08:42:[email protected]:/home/phgaw
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:3B:93:1E
inet addr: Bcast:
inet6 addr: fe80::20c:29ff:fe3b:931e/64 Scope:Link
RX packets:46481 errors:0 dropped:0 overruns:0 frame:0
TX packets:32846 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37169553 (35.4 Mb) TX bytes:4967809 (4.7 Mb)
Interrupt:19 Base address:0x2024

Pinging lee from Grant:
PS C:> ping lee

Pinging lee [] with 32 bytes of data:
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64

Ping statistics for
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

Networking mode is set to: NAT, with VMware Player taking care of DHCP
for the VMs.

The best place to ask is the fora for the virtualization solution you
are using.

Phillip G. |

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
– Leibniz

What software are you using for your virtual machine? it sounds like a
network configuration issue. If you use VirtualBox, just configure a
bridged connection and forward the ports properly from your host
machine to your virtual machine.

  • Xavier

On Mon, Oct 3, 2011 at 11:47 PM, Phillip G.

i figured out the problem. I was doing and i should
have been doing,“192.168.0.x”) after that, it was all
fine. It worked through a VM, through my WLAN at home, i will soon test
it over the net. But yea, thanks for the time spent anyway guys, i got
it all figured out now. Assignement is almost finished.