|
|
If class is used to provide SOAP server functionality, then the same class should be provided to
Zend_Soap_AutoDiscovery for WSDL generation:
setClass('My_SoapServer_Class');
$autodiscover->handle();
The following rules are used while WSDL generation:
Generated WSDL describes an RPC style Web Service.
Class name is used as a name of the Web Service being described.
'http://' .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] is used
as an URI where the WSDL is available.
It's also used as a target namespace for all service related names (including described complex types).
Class methods are joined into one » Port Type.
$className . 'Port' is used as Port Type name.
Each class method is registered as a corresponding port operation.
Each method prototype genrerates corresponding Request/Response messages.
Method may have several prototypes if some method parameters are optional.
Note: Important!
WSDL autodiscovery utilizes the PHP docblocks provided by the developer to determine the parameter and return types. In fact, for scalar types, this is the only way to determine the parameter types, and for return types, this is the only way to determine them.
That means, providing correct and fully detailed docblocks is not only best practice, but is required for discovered class.
|
|
Copyright © 2005-2011 Zend Technologies Inc (compiled by mikaelkael with ZFDocumentor - SVN 12849).

