koreychenko / php-wsdl-generator
Yet another PHP WSDL generator
0.1.4
2020-06-01 07:46 UTC
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2025-03-29 01:01:04 UTC
README
Yet another PHP WSDL generator
Main webwervice description class
/** * @desc Webservice description * */ class TestWebserviceDescription { /** * @WebMethod * @desc First Webservice Method * * @return \Class\Namespace\DataClass $data minOccurs="1" maxOccurs="1" */ public function GetData() { $data = new \Class\Namespace\DataClass(); return $data; } }
Get WSDL from webservice description class
$path = 'http://example.com'; $nameSpace = 'http://example.com'; $wsdl = new WsdlGeneratorService(TestWebserviceDescription::class, $path, $nameSpace); $result = $wsdl->getXml(); header("Content-Type: text/xml"); echo $result;