The Demo package: #!perl -w package Demo; use strict; my @handle; sub new { my $class = shift; my $id = shift; $handle[$id] = bless {string => shift},$class; print "new $handle[$id]->{string}"; return $id; } sub string{ my $self = shift; my $id = shift; print "id = $id, handle string = $handle[$id]->{string}\n"; if (@_) { $handle[$id]->{string} = shift; } return $handle[$id]->{string}; } sub get{ my $self=shift; my $id = shift; if ($handle[$id] == undef) { print "not defined!"; $self->new($id,"undefined"); } return $id; } 1; The server: #!perl -w use SOAP::Transport::HTTP; use Demo; use strict; my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalPort => 90) -> dispatch_to('Demo') ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; The first client: #!perl -w use strict; use SOAP::Lite +autodispatch => uri => 'Demo', proxy => ('http://localhost:90/soap/server.pl'); my $demo = Demo->new(1,"test1a"); print Demo->string(1) . "\n"; Demo->string(1,"test1b"); print Demo->string(1) . "\n"; and the second client that demonstates that the data has benn cached: #!perl -w use strict; use SOAP::Lite +autodispatch => uri => 'Demo', proxy => ('http://localhost:90/soap/server.pl'); my $demo = Demo->get(1); print Demo->string(1) . "\n"; Demo->string(1,"test 2"); print Demo->string(1) . "\n";