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 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
Extended by CWebService
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/CWebService.php
Methods summary
public
# __construct( mixed $provider, string $wsdlUrl, string $serviceUrl )

Constructor.

Constructor.

Parameters

$provider
mixed
$provider the web service provider class name or object
$wsdlUrl
string
$wsdlUrl the URL for WSDL. This is required by CWebService::run().
$serviceUrl
string
$serviceUrl the URL for the Web service. This is required by CWebService::generateWsdl() and CWebService::renderWsdl().
public
# handleError( CErrorEvent $event )

The PHP error handler.

The PHP error handler.

Parameters

$event
CErrorEvent
$event the PHP error event
public
# renderWsdl( )

Generates and displays the WSDL as defined by the provider.

Generates and displays the WSDL as defined by the provider.

See

CWebService::generateWsdl()
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.

Generates the WSDL as defined by the provider. The cached version may be used if the WSDL is found valid in cache.

Returns

string
the generated WSDL

See

CWebService::$wsdlCacheDuration
public
# run( )

Handles the web service request.

Handles the web service request.

public string
# getMethodName( )

Returns

string
the currently requested method name. Empty if no method is being requested.
protected array
# getOptions( )

Returns

array
options for creating SoapServer instance

See

http://www.php.net/manual/en/soapserver.soapserver.php
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()
Constants summary
integer SOAP_ERROR 1001
#
Properties summary
public string|object $provider
#

the web service provider class or object. If specified as a class name, it can be a path alias.

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 CWebService::run().

the URL for WSDL. This is required by CWebService::run().

public string $serviceUrl
#

the URL for the Web service. This is required by CWebService::generateWsdl() and CWebService::renderWsdl().

the URL for the Web service. This is required by CWebService::generateWsdl() and CWebService::renderWsdl().

public integer $wsdlCacheDuration 0
#

number of seconds that the generated WSDL can remain valid in cache. Defaults to 0, meaning no caching.

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.

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

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.

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.

See

http://www.php.net/manual/en/soapserver.soapserver.php
public string $actor
#

actor of the SOAP service. Defaults to null, meaning not set.

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.

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.

the persistence mode of the SOAP server.

See

http://www.php.net/manual/en/soapserver.setpersistence.php
public string|array $generatorConfig 'CWsdlGenerator'
#

WSDL generator configuration. This property may be useful in purpose of enhancing features of the standard CWsdlGenerator class by extending it. For example, some developers may need support of the xsd:xsd:base64Binary elements. Another use case is to change initial values at instantiation of the default CWsdlGenerator. The value of this property will be passed to YiiBase::createComponent() to create the generator object. Default value is 'CWsdlGenerator'.

WSDL generator configuration. This property may be useful in purpose of enhancing features of the standard CWsdlGenerator class by extending it. For example, some developers may need support of the xsd:xsd:base64Binary elements. Another use case is to change initial values at instantiation of the default CWsdlGenerator. The value of this property will be passed to YiiBase::createComponent() to create the generator object. Default value is 'CWsdlGenerator'.

Since

1.1.12
Magic properties summary
public string $methodName
#

The currently requested method name. Empty if no method is being requested.

The currently requested method name. Empty if no method is being requested.

API documentation generated by ApiGen 2.8.0