From: Mike G. v. a. <we...@ma...> - 2008-06-24 23:12:55
|
Log Message: ----------- Adding missing files Tags: ---- rel-2-4-patches Added Files: ----------- webwork2/lib/WebworkSOAP: WSDL.pm Revision Data ------------- --- /dev/null +++ lib/WebworkSOAP/WSDL.pm @@ -0,0 +1,28 @@ +package WebworkSOAP::WSDL; + +use lib '/opt/webwork/webwork2/lib'; +use Pod::WSDL; +use WebworkSOAP; + +use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and $ENV{MOD_PERL_API_VERSION} >= 2 ); +use constant RPC_URL => 'http://localhost/webwork2_rpc'; + +sub handler($) { + my ($r) = @_; + my $pod = new Pod::WSDL( + source => 'WebworkSOAP', + location => RPC_URL, + pretty => 1, + withDocumentation => 0 + ); + #$r->content_type('application/wsdl+xml'); + if (MP2) { + #$r->send_http_header; + } else { + $r->send_http_header; + } + print($pod->WSDL); + return 0; +} + +1; |