WebserviceFunctions.pm package WebserviceFunctions; =begin WSDL _DOC Hello return a String saying hello _IN name $string the name of the user to salute _RETURN $string Returns a string Hello, name =end WSDL sub Hello { my $name = shift; my $return = "Hello, $name"; return $return; } =begin WSDL _DOC Goodbye return a String saying goodbye _IN name $string the name of the user to dismiss _RETURN $string Returns a string Goodbye, name =end WSDL sub Goodbye { my $name = shift; my $return = "Goodbye, $name"; return $return; } 1; webservice.cgi #!/usr/bin/perl -w use Pod::WSDL; use CGI; use strict; use warnings; print CGI->header('text/xml'); my $pod = new Pod::WSDL(source=> './WebserviceFunctions.pm', location=>'http://192.168.11.73/cgi-bin/webservice', pretty=>1, withDocumentation=>1); $pod->addNamespace('http://192.168.11.73/cgi-bin/webservice/','WebserviceFunctions'); print $pod->WSDL;