nevsky has asked for the wisdom of the Perl Monks concerning the following question:
Would I create a directory /test/soap in the /var/www/html directory and place the module file inside. Then copy the output of wsdl.pl to service.wsdl into /var/www/html. When it comes to calling the function I would write script such as$ cat ./wsdl.pl #!/usr/bin/perl use strict; use warnings; use Pod::WSDL; my $pod = new Pod::WSDL(source => "./Test.pm", location => 'http://localhost/test/soap', pretty => 1, withDocumentation => 1); print( $pod->WSDL ); $ cat Test.pm package Test; use dbS_web::Type; =begin WSDL _IN wabbit $dbS_web::Type testing =end WSDL sub hi { my $out = "hi"; return $out; } 1;
I only ask because it does not work for me and that is the method I am using. I use the script above to call the doGoogleSearch method from there wsdl file and that works perfectly. In the error.log file it says Attempt to serve directory: I tried adding the directory to the include path by adding:#!/usr/bin/perl -w use lib qw(/var/www/html/); use lib qw(/var/www/html/test/soap); use SOAP::Lite; print "Content-type: text/html\r\n\r\n"; my $wsdl = SOAP::Lite->service("http://localhost/service.wsdl"); my $result = $wsdl->hi(); print $result; print "\n";
Any ideas? Thanksuse lib qw(/var/www/html/test/); use lib qw(/var/www/html/test/soap/);
|
|---|