Jeroen Keppens writes; Recently I had to create a soap webservice. The WSDL generator put in too much, so I decided to make the WSDL myself. Luckily a colleague gave me a quick intro.
Generate the WSDL file from a class using a Zend component
Matthew Weier O’Phinney answers a very common question;
“Is there a way to generate the WSDL file from a class using a Zend component?”
Yes — via Zend_Soap_Autodiscover:
http://framework.zend.com/manual/en/zend.soap.autodiscovery.html
A typical workflow is to do the following:
if ('GET' == $_SERVER['HTTP_METHOD']) {
$server = new Zend_Soap_Autodiscover();
} else {
$server = new Zend_Soap_Server();
}
$server->setClass('SomeClass');
echo $server->handle();
Basically, you handle GET requests as a request for the WSDL, and anything else as a SOAP request.