Class CWebServiceAction
CWebServiceAction implements an action that provides Web services.
CWebServiceAction serves for two purposes. On the one hand, it displays the
WSDL content specifying the Web service APIs. On the other hand, it invokes the
requested Web service API. A GET parameter named ws
is used to
differentiate these two aspects: the existence of the GET parameter indicates
performing the latter action.
By default, CWebServiceAction will use the current controller as the Web
service provider. See CWsdlGenerator
on how to declare methods that can
be remotely invoked.
Note, PHP SOAP extension is required for this action.
- CComponent
- CAction implements IAction
- CWebServiceAction
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/CWebServiceAction.php
public
|
#
run( )
Runs the action. If the GET parameter |
public
|
|
protected
|
#
createWebService( mixed $provider, string $wsdlUrl, string $serviceUrl )
Creates a |
__construct(),
getController(),
getId(),
runWithParams(),
runWithParamsInternal()
|
run()
|
public
mixed
|
$provider |
|
#
the Web service provider object or class name. If specified as a class name,
it can be a path alias. Defaults to null, meaning the current controller is used
as the service provider. If the provider implements the interface |
public
string
|
$serviceUrl |
|
#
the URL for the Web service. Defaults to null, meaning the URL for this
action is used to provide Web services. In this case, a GET parameter named
|
public
string
|
$wsdlUrl |
|
#
the URL for WSDL. Defaults to null, meaning the URL for this action is used to serve WSDL document. |
public
string
|
$serviceVar | 'ws' |
#
the name of the GET parameter that differentiates a WSDL request from a Web service request. If this GET parameter exists, the request is considered as a Web service request; otherwise, it is a WSDL request. Defaults to 'ws'. |
public
array
|
$classMap |
|
#
a list of PHP 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
array
|
$serviceOptions | array() |
#
the initial property values for the |
public
|
$service |
#
The Web service instance. |
$controller,
$id
|