Class CWebService
CWebService encapsulates SoapServer and provides a WSDL-based web service.
PHP SOAP extension is required.
CWebService makes use of CWsdlGenerator
and can generate the WSDL
on-the-fly without requiring you to write complex WSDL. However WSDL generator
could be customized through CWebService::$generatorConfig
property.
To generate the WSDL based on doc comment blocks in the service provider
class, call CWebService::generateWsdl()
or CWebService::renderWsdl()
. To process the web
service requests, call CWebService::run()
.
- CComponent
- CWebService
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/services/CWebService.php
public
|
|
public
|
|
public
|
|
public
string
|
#
generateWsdl( )
Generates the WSDL as defined by the provider. The cached version may be used if the WSDL is found valid in cache. |
public
|
|
public
string
|
|
protected
array
|
integer |
SOAP_ERROR
|
1001 |
public
string|object
|
$provider |
|
#
the web service provider class or object. If specified as a class name, it can be a path alias. |
public
string
|
$wsdlUrl |
|
#
the URL for WSDL. This is required by |
public
string
|
$serviceUrl |
|
#
the URL for the Web service. This is required by |
public
integer
|
$wsdlCacheDuration | 0 |
#
number of seconds that the generated WSDL can remain valid in cache. Defaults to 0, meaning no caching. |
public
string
|
$cacheID | 'cache' |
#
the ID of the cache application component that is used to cache the generated WSDL. Defaults to 'cache' which refers to the primary cache application component. Set this property to false if you want to disable caching WSDL. |
public
string
|
$encoding | 'UTF-8' |
#
encoding of the Web service. Defaults to 'UTF-8'. |
public
array
|
$classMap | array() |
#
a list of classes that are declared as complex types in WSDL. This should be an array with WSDL types as keys and names of PHP classes as values. A PHP class can also be specified as a path alias. |
public
string
|
$actor |
|
#
actor of the SOAP service. Defaults to null, meaning not set. |
public
string
|
$soapVersion |
|
#
SOAP version (e.g. '1.1' or '1.2'). Defaults to null, meaning not set. |
public
integer
|
$persistence |
|
#
the persistence mode of the SOAP server. |
public
string|array
|
$generatorConfig | 'CWsdlGenerator' |
#
WSDL generator configuration. This property may be useful in purpose of
enhancing features of the standard |
public
string
|
$methodName |
#
The currently requested method name. Empty if no method is being requested. |