LoadModule perl_module modules/mod_perl.so PerlRequire "/etc/httpd/conf.d/startup.pl" SetHandler perl-script PerlResponseHandler Apache2::SOAP PerlSetVar dispatch_to "/var/www/html/soap" PerlSetVar options "compress_threshold => 10000" #### use ModPerl::Util (); #for CORE::GLOBAL::exit use Apache2::Request; use Apache2::RequestRec (); use Apache2::RequestIO (); use Apache2::RequestUtil (); use Apache2::ServerUtil (); use Apache2::ServerRec (); use Apache2::Connection (); use Apache2::Log (); use Apache::Session (); use Apache::DBI; use CGI (); use CGI::Cookie (); use APR::Table (); use ModPerl::Registry (); use Apache2::Const -compile => ':common'; use APR::Const -compile => ':common'; use DBI; use XML::Handler::YAWriter; use XML::Generator::DBI; use File::Basename; 1; #### package Demo2; use XML::Generator::DBI; use XML::Handler::YAWriter; use DBI; =begin WSDL _IN hi $string A foo _DOC This is a test soap web service that prints a list of the current DBAs _RETURN $string Returns a string containing the current DBAs =end WSDL sub hi { my $out_xml = "hi"; my $ya = XML::Handler::YAWriter->new(); # Stuff return $out_xml; } 1; #### #!/usr/bin/perl use strict; use warnings; use SOAP::Lite; my $soap = SOAP::Lite->uri('urn:Demo2'); my $proxy = $soap->proxy("http://localhost/soap/"); my $obj = $proxy->hi(); print $obj->result . "\n";