From: <var...@us...> - 2015-01-21 16:26:42
|
Revision: 9487 http://sourceforge.net/p/phpwiki/code/9487 Author: vargenau Date: 2015-01-21 16:26:40 +0000 (Wed, 21 Jan 2015) Log Message: ----------- Display WDSL in browser Modified Paths: -------------- trunk/SOAP.php Modified: trunk/SOAP.php =================================================================== --- trunk/SOAP.php 2015-01-21 16:07:37 UTC (rev 9486) +++ trunk/SOAP.php 2015-01-21 16:26:40 UTC (rev 9487) @@ -355,13 +355,26 @@ } return $links->asArray(); } - } $server = new SoapServer('PhpWiki.wsdl'); $server->setClass('PhpWikiSoapServer'); -$server->handle(); +if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD']=='POST') { + $server->handle(); +} elseif (isset($_SERVER['QUERY_STRING'])) { + // Return the WSDL + $wsdl = @implode('', @file('PhpWiki.wsdl')); + if (strlen($wsdl) > 1) { + header("Content-type: text/xml"); + echo $wsdl; + } else { + header("Status: 500 Internal Server Error"); + header("Content-type: text/plain"); + echo "HTTP/1.0 500 Internal Server Error"; + } +} + // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |