[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

SOAP4R and Perl::SOAP::Lite interoperability

Rickard Sjostrom

9/6/2006 3:57:00 PM

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/DeliverySer..., "0.0.0.0", 9090)

server.start

--------------------------------------------



Perl Client:
--------------------------------------------
#!/usr/bin/perl

use strict;
use SOAP::Lite;

my $server = "http://myserver.com:9... #routable
my $ns = "http://rickthemick.com:9090/DeliveryServ... #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 I get a "connection
refused" error!

Any I ideas, all help is very much appreciated!

Regards
/Rickard


--
Posted via http://www.ruby-....

2 Answers

WaIIy

6/17/2011 12:09:00 AM

0

On Thu, 16 Jun 2011 17:19:28 -0500, Rick <nomail@for.mee> wrote:

>On Thu, 16 Jun 2011 10:04:12 -0400, WaIIy wrote:
>
>> On Thu, 16 Jun 2011 06:37:36 -0500, Jim Rusling <usenet@rusling.org>
>> wrote:
>>
>>>Rick <nomail@for.mee> wrote:
>>>
>>>
>>>>Anyone know?
>>>
>>>He just got tired of all of the bickering. I think that he still reads
>>>some of the groups every now and then.
>>
>> That's my understanding. He's also taking more pictures and seems to be
>> enjoying photography quite a bit.
>
>Well, if your in contact with him, let him know I was asking after him.
>Hope he is well.

10-4

edward ohare

6/19/2011 10:21:00 AM

0

On Thu, 16 Jun 2011 06:37:36 -0500, Jim Rusling <usenet@rusling.org>
wrote:

>Rick <nomail@for.mee> wrote:
>
>>
>>Anyone know?
>
>He just got tired of all of the bickering.

Makes sense for a guy who spent all his time waffling.