# SOAP4R and Perl::SOAP::Lite interoperability

**URL:** <https://www.ruby-forum.com/t/soap4r-and-perl-lite-interoperability/67769>\
**Category:** Ruby\
**Created:** [September 6, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/soap4r-and-perl-lite-interoperability/67769 "2006-09-06T17:56:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickthemick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@rickthemick](https://www.ruby-forum.com/u/rickthemick)\
**Post date:** [September 6, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/soap4r-and-perl-lite-interoperability/67769/1 "2006-09-06T17:56:39Z")

</div>

Hi!  
I have set up a SOAP server in Ruby. Implementing a client in Ruby is no  
problems. But I want a Perl client to be able to access the provided  
services but I failed…

This is how I did, it is really simple code:

## Ruby SOAP server: (seems to be ok)

require ‘server\_dispatcher’  
require ‘soap/rpc/standaloneServer’

class DeliveryService \< SOAP::RPC::StandaloneServer

```
#will be run when an instance of this class is created
def on_init
srvdisp = ServerDispatcher.new
	add_method(srvdisp, "find")
end

```

end

class ServerDispatcher

```
def find
  puts "Running find()"
return "DUMMYTEXT";
end

```

end

server = DeliveryService.new(“Demo”,  
“[http://rickthemick.com/DeliveryService](http://rickthemick.com/DeliveryService)”, “0.0.0.0”, 9090)

server.start

* * *

## Perl Client:

#!/usr/bin/perl

use strict;  
use SOAP::Lite;

my $server = “[http://myserver.com:9090](http://myserver.com:9090)”; #routable  
my $ns = “[http://rickthemick.com:9090/DeliveryService](http://rickthemick.com:9090/DeliveryService)”; #just a  
namespace/fake  
print “Client started…\n”;

my $service = SOAP::Lite  
 → uri($ns)  
 → proxy($server);

my $result = $service → find() → result();

if (not defined $result){  
print “No result recevied…\n”;  
}else {  
print “length: “.scalar($result).”\n”;  
print “result: $result\n”;  
}

exit;

* * *

## And this happends when running the client:

## (89)# soap/:./client.pl Client started… No result recevied… (90)# soap/:

In the server window nothing seems to happen. When I use my ruby code as  
client it prints “Running find()” and I get text “DUMMYTEXT” back, so I  
know it works.  
If I change the port to e.g [myserver.com:2222](http://myserver.com:2222) I get a “connection  
refused” error!

Any I ideas, all help is very much appreciated!

Regards  
/Rickard
