PHP 클래스 Prado\Web\Services\TSoapService

TSoapService processes SOAP requests for a PRADO application. TSoapService requires PHP SOAP extension to be loaded. TSoapService manages a set of SOAP providers. Each SOAP provider is a class that implements a set of SOAP methods which are exposed to SOAP clients for remote invocation. TSoapService generates WSDL automatically for the SOAP providers by default. To use TSoapService, configure it in the application specification like following: PHP configuration style: 'services' => array( 'soap' => array( 'class' => 'System.Web.Services.TSoapService' 'properties' => array( 'provider' => 'MyStockQuote' ) ) ) The WSDL for the provider class "MyStockQuote" is generated based on special comment tags in the class. In particular, if a class method's comment contains the keyword "@soapmethod", it is considered to be a SOAP method and will be exposed to SOAP clients. For example, class MyStockQuote { ** * @param string $symbol the stock symbol * @return float the stock price * @soapmethod * / public function getQuote($symbol) {...} } With the above SOAP provider, a typical SOAP client may call the method "getQuote" remotely like the following: $client=new SoapClient("http://hostname/path/to/index.php?soap=stockquote.wsdl"); echo $client->getQuote("ibm"); Each element in the application specification actually configures the properties of a SOAP server which defaults to {@link TSoapServer}. Therefore, any writable property of {@link TSoapServer} may appear as an attribute in the element. For example, the "provider" attribute refers to the {@link TSoapServer::setProvider Provider} property of {@link TSoapServer}. The following configuration specifies that the SOAP server is persistent within the user session (that means a MyStockQuote object will be stored in session) You may also use your own SOAP server class by specifying the "class" attribute of .
부터: 3.1
저자: Knut Urdalen ([email protected])
저자: Qiang Xue ([email protected])
저자: Carl G. Mathisen ([email protected])
상속: extends Prado\TService
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__construct ( ) Constructor.
constructUrl ( $serverID, $getParams = null, $encodeAmpersand = true, $encodeGetItems = true ) : string Constructs a URL with specified page path and GET parameters.
getConfigFile ( ) : string
getIsWsdlRequest ( ) : boolean
getServerID ( ) : string
init ( $config ) Initializes this module.
run ( ) Runs the service.
setConfigFile ( $value )

보호된 메소드들

메소드 설명
createServer ( ) : TSoapServer Creates the requested SOAP server.
resolveRequest ( ) Resolves the request parameter.

비공개 메소드들

메소드 설명
loadConfig ( $config ) Loads configuration from an XML element

메소드 상세

__construct() 공개 메소드

Sets default service ID to 'soap'.
public __construct ( )

constructUrl() 공개 메소드

Constructs a URL with specified page path and GET parameters.
public constructUrl ( $serverID, $getParams = null, $encodeAmpersand = true, $encodeGetItems = true ) : string
리턴 string URL for the page and GET parameters

createServer() 보호된 메소드

The SOAP server is initialized with the property values specified in the configuration.
protected createServer ( ) : TSoapServer
리턴 TSoapServer the SOAP server instance

getConfigFile() 공개 메소드

public getConfigFile ( ) : string
리턴 string external configuration file. Defaults to null.

getIsWsdlRequest() 공개 메소드

public getIsWsdlRequest ( ) : boolean
리턴 boolean whether this is a request for WSDL

getServerID() 공개 메소드

public getServerID ( ) : string
리턴 string the SOAP server ID

init() 공개 메소드

This method is required by the IModule interface.
public init ( $config )

resolveRequest() 보호된 메소드

It identifies the server ID and whether the request is for WSDL.
또한 보기: getServerID
또한 보기: getIsWsdlRequest
protected resolveRequest ( )

run() 공개 메소드

If the service parameter ends with '.wsdl', it will serve a WSDL file for the specified soap server. Otherwise, it will handle the soap request using the specified server.
public run ( )

setConfigFile() 공개 메소드

public setConfigFile ( $value )