Zend Framework
1.12
|
Public Member Functions | |
__construct ($wsdl=null, array $options=null) | |
Constructor. | |
setOptions ($options) | |
Set Options. | |
getOptions () | |
Return array of options suitable for using with SoapServer constructor. | |
setWsiCompliant ($value) | |
Set WS-I compliant. | |
getWsiCompliant () | |
Gt WS-I compliant. | |
setEncoding ($encoding) | |
Set encoding. | |
getEncoding () | |
Get encoding. | |
setSoapVersion ($version) | |
Set SOAP version. | |
getSoapVersion () | |
Get SOAP version. | |
validateUrn ($urn) | |
Check for valid URN. | |
setActor ($actor) | |
Set actor. | |
getActor () | |
Retrieve actor. | |
setUri ($uri) | |
Set URI. | |
getUri () | |
Retrieve URI. | |
setClassmap ($classmap) | |
Set classmap. | |
getClassmap () | |
Retrieve classmap. | |
setWsdl ($wsdl) | |
Set wsdl. | |
getWsdl () | |
Retrieve wsdl. | |
setSoapFeatures ($feature) | |
Set the SOAP Feature options. | |
getSoapFeatures () | |
Return current SOAP Features options. | |
setWsdlCache ($options) | |
Set the SOAP Wsdl Caching Options. | |
getWsdlCache () | |
Get current SOAP Wsdl Caching option. | |
addFunction ($function, $namespace= '') | |
Attach a function as a server method. | |
setClass ($class, $namespace= '', $argv=null) | |
Attach a class to a server. | |
setObject ($object) | |
Attach an object to a server. | |
getFunctions () | |
Return a server definition array. | |
loadFunctions ($definition) | |
Unimplemented: Load server definition. | |
setPersistence ($mode) | |
Set server persistence. | |
getPersistence () | |
Get server persistence. | |
getLastRequest () | |
Retrieve request XML. | |
setReturnResponse ($flag) | |
Set return response flag. | |
getReturnResponse () | |
Retrieve return response flag. | |
getLastResponse () | |
Get response XML. | |
handle ($request=null) | |
Handle a request. | |
registerFaultException ($class) | |
Register a valid fault exception. | |
deregisterFaultException ($class) | |
Deregister a fault exception from the fault exception stack. | |
getFaultExceptions () | |
Return fault exceptions list. | |
fault ($fault=null, $code="Receiver") | |
Generate a server fault. | |
handlePhpErrors ($errno, $errstr, $errfile=null, $errline=null, array $errcontext=null) | |
Throw PHP errors as SoapFaults. | |
Protected Member Functions | |
_setRequest ($request) | |
Set request. | |
_getSoap () | |
Get SoapServer object. | |
_initializeSoapErrorContext () | |
Method initalizes the error context that the SOAPServer enviroment will run in. | |
Protected Attributes | |
$_actor | |
$_class | |
$_classArgs = array() | |
$_object | |
Object registered with this server. | |
$_classmap | |
$_encoding | |
$_features | |
$_wsdlCache | |
$_wsiCompliant | |
$_faultExceptions = array() | |
$_functions = array() | |
$_persistence | |
$_request | |
$_response | |
$_returnResponse = false | |
$_soapVersion = SOAP_1_2 | |
$_wsdl | |
$_uri | |
__construct | ( | $wsdl = null , |
|
array | $options = null |
||
) |
Constructor.
Sets display_errors INI setting to off (prevent client errors due to bad XML in response). Registers handlePhpErrors() as error handler for E_USER_ERROR.
If $wsdl is provided, it is passed on to setWsdl(); if any options are specified, they are passed on to setOptions().
string | $wsdl | |
array | $options |
|
protected |
Get SoapServer object.
Uses $_wsdl and return value of getOptions() to instantiate SoapServer object, and then registers any functions or class with it, as well as peristence.
|
protected |
Method initalizes the error context that the SOAPServer enviroment will run in.
|
protected |
Set request.
$request may be any of:
DOMDocument | DOMNode | SimpleXMLElement | stdClass | string | $request |
addFunction | ( | $function, | |
$namespace = '' |
|||
) |
Attach a function as a server method.
array | string | $function | Function name, array of function names to attach, or SOAP_FUNCTIONS_ALL to attach all functions |
string | $namespace | Ignored |
Zend_Soap_Server_Exception | on invalid functions |
Implements Zend_Server_Interface.
deregisterFaultException | ( | $class | ) |
Deregister a fault exception from the fault exception stack.
string | $class |
fault | ( | $fault = null , |
|
$code = "Receiver" |
|||
) |
Generate a server fault.
Note that the arguments are reverse to those of SoapFault.
If an exception is passed as the first argument, its message and code will be used to create the fault object if it has been registered via { registerFaultException()}.
string|Exception $fault string $code SOAP Fault Codes SoapFault
Implements Zend_Server_Interface.
getActor | ( | ) |
Retrieve actor.
getClassmap | ( | ) |
Retrieve classmap.
getEncoding | ( | ) |
Get encoding.
getFaultExceptions | ( | ) |
Return fault exceptions list.
getFunctions | ( | ) |
Return a server definition array.
Returns a list of all functions registered with addFunction(), merged with all public methods of the class set with setClass() (if any).
public
Implements Zend_Server_Interface.
getLastRequest | ( | ) |
Retrieve request XML.
getLastResponse | ( | ) |
Get response XML.
getOptions | ( | ) |
Return array of options suitable for using with SoapServer constructor.
getPersistence | ( | ) |
Get server persistence.
getReturnResponse | ( | ) |
Retrieve return response flag.
getSoapFeatures | ( | ) |
Return current SOAP Features options.
getSoapVersion | ( | ) |
Get SOAP version.
getUri | ( | ) |
Retrieve URI.
getWsdl | ( | ) |
Retrieve wsdl.
getWsdlCache | ( | ) |
Get current SOAP Wsdl Caching option.
getWsiCompliant | ( | ) |
Gt WS-I compliant.
handle | ( | $request = null | ) |
Handle a request.
Instantiates SoapServer object with options set in object, and dispatches its handle() method.
$request may be any of:
If no request is passed, pulls request using php:://input (for cross-platform compatability purposes).
DOMDocument | DOMNode | SimpleXMLElement | stdClass | string | $request | Optional request |
Implements Zend_Server_Interface.
handlePhpErrors | ( | $errno, | |
$errstr, | |||
$errfile = null , |
|||
$errline = null , |
|||
array | $errcontext = null |
||
) |
Throw PHP errors as SoapFaults.
int | $errno | |
string | $errstr | |
string | $errfile | |
int | $errline | |
array | $errcontext |
SoapFault |
loadFunctions | ( | $definition | ) |
Unimplemented: Load server definition.
array | $array |
Zend_Soap_Server_Exception | Unimplemented |
Implements Zend_Server_Interface.
registerFaultException | ( | $class | ) |
Register a valid fault exception.
string | array | $class | Exception class or array of exception classes |
setActor | ( | $actor | ) |
setClass | ( | $class, | |
$namespace = '' , |
|||
$argv = null |
|||
) |
Attach a class to a server.
Accepts a class name to use when handling requests. Any additional arguments will be passed to that class' constructor when instantiated.
See setObject() to set preconfigured object instances as request handlers.
string | $class | Class Name which executes SOAP Requests at endpoint. |
Zend_Soap_Server_Exception | if called more than once, or if class does not exist |
Implements Zend_Server_Interface.
setClassmap | ( | $classmap | ) |
Set classmap.
array | $classmap |
Zend_Soap_Server_Exception | for any invalid class in the class map |
setEncoding | ( | $encoding | ) |
Set encoding.
string | $encoding |
Zend_Soap_Server_Exception | with invalid encoding argument |
setObject | ( | $object | ) |
Attach an object to a server.
Accepts an instanciated object to use when handling requests.
object | $object |
setOptions | ( | $options | ) |
Set Options.
Allows setting options as an associative array of option => value pairs.
array | Zend_Config | $options |
setPersistence | ( | $mode | ) |
Set server persistence.
int | $mode |
Implements Zend_Server_Interface.
setReturnResponse | ( | $flag | ) |
Set return response flag.
If true, handle() will return the response instead of automatically sending it back to the requesting client.
The response is always available via getResponse().
boolean | $flag |
setSoapFeatures | ( | $feature | ) |
setSoapVersion | ( | $version | ) |
Set SOAP version.
int | $version | One of the SOAP_1_1 or SOAP_1_2 constants |
Zend_Soap_Server_Exception | with invalid soap version argument |
setUri | ( | $uri | ) |
Set URI.
URI in SoapServer is actually the target namespace, not a URI; $uri must begin with 'urn:'.
string | $uri |
Zend_Soap_Server_Exception | with invalid uri argument |
setWsdl | ( | $wsdl | ) |
setWsdlCache | ( | $options | ) |
Set the SOAP Wsdl Caching Options.
string | int | boolean | $caching |
setWsiCompliant | ( | $value | ) |
validateUrn | ( | $urn | ) |
Check for valid URN.
string | $urn |
Zend_Soap_Server_Exception | on invalid URN |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Object registered with this server.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |