use SOAP::Lite +autodispatch => uri => 'http://localhost/demo', proxy => 'http://localhost:8001/'; my $obj = demo->new(); $obj->getVal(); $obj->setVal(44); $obj->getVal();