Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CDocumentSoapObjectWrapper
  • CSoapObjectWrapper
  • CWebService
  • CWebServiceAction
  • CWsdlGenerator
  • Overview
  • Package
  • Class
  • Tree

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
Extended by CAction implements IAction
Extended by CWebServiceAction
Package: system\web\services
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
Methods summary
public
# run( )

Runs the action. If the GET parameter CWebServiceAction::$serviceVar exists, the action handle the remote method invocation. If not, the action will serve WSDL content;

Runs the action. If the GET parameter CWebServiceAction::$serviceVar exists, the action handle the remote method invocation. If not, the action will serve WSDL content;

public CWebService
# getService( )

Returns the Web service instance currently being used.

Returns the Web service instance currently being used.

Returns

CWebService
the Web service instance
protected CWebService
# createWebService( mixed $provider, string $wsdlUrl, string $serviceUrl )

Creates a CWebService instance. You may override this method to customize the created instance.

Creates a CWebService instance. You may override this method to customize the created instance.

Parameters

$provider
mixed
$provider the web service provider class name or object
$wsdlUrl
string
$wsdlUrl the URL for WSDL.
$serviceUrl
string
$serviceUrl the URL for the Web service.

Returns

CWebService
the Web service instance
Methods inherited from CAction
__construct(), getController(), getId(), runWithParams(), runWithParamsInternal()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Magic methods inherited from CAction
run()
Properties summary
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 IWebServiceProvider, it will be able to intercept the remote method invocation and perform additional tasks (e.g. authentication, logging).

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 IWebServiceProvider, it will be able to intercept the remote method invocation and perform additional tasks (e.g. authentication, logging).

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 CWebServiceAction::$serviceVar will be used to deteremine whether the current request is for WSDL or Web service.

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 CWebServiceAction::$serviceVar will be used to deteremine whether the current request is for WSDL or Web service.

public string $wsdlUrl
#

the URL for WSDL. Defaults to null, meaning the URL for this action is used to serve WSDL document.

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'.

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.

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.

See

http://www.php.net/manual/en/soapclient.soapclient.php
public array $serviceOptions array()
#

the initial property values for the CWebService object. The array keys are property names of CWebService and the array values are the corresponding property initial values.

the initial property values for the CWebService object. The array keys are property names of CWebService and the array values are the corresponding property initial values.

Magic properties summary
public CWebService $service
#

The Web service instance.

The Web service instance.

Magic properties inherited from CAction
$controller, $id
API documentation generated by ApiGen 2.8.0