use strict; use SOAP::Lite + "trace"; use SOAP::Transport::HTTP; use Data::Dumper; use XML::Simple; my $serverinfo = { version => ["0.1.dev"], validTypes => [ filetype => "txt", filetype => "html", ], statistics => { documentsProcessed => [0], }, }; sub FileQueue::getServerInfo { return SOAP::Data->type( 'xml' => XML::Simple->new(RootName => 'info')->XMLout($serverinfo) ) ; } my $daemon = SOAP::Transport::HTTP::Daemon ->new (LocalPort => 88) ->dispatch_to('FileQueue') ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; #### use strict; use Data::Dumper; use SOAP::Lite + "trace"; my $soap = SOAP::Lite -> uri('http://www.perlmonks.org/FileQueue') -> proxy('http://localhost:88') ; $soap->readable(1); print $soap->getServerInfo()->result; #### 0 html txt 0.1.dev #### 0.1.dev 0 txt html