Zend_Soap_Server
Constructor
Sets display_errors INI setting to off (prevent client errors due to bad XML in response). Registers {@link handlePhpErrors()} as error handler for E_USER_ERROR.
If $wsdl is provided, it is passed on to {@link setWSDL()}; if any options are specified, they are passed on to {@link setOptions()}.
| Parameters: |
|
|---|---|
| Throws ExceptionExtensionNotLoadedException: | |
Set Options
Allows setting options as an associative array of option => value pairs.
| Parameters: | array|Traversable – |
|---|---|
| Return type: | ZendSoapServer |
Return array of options suitable for using with SoapServer constructor
| Return type: | array |
|---|
Set encoding
| Parameters: | string – |
|---|---|
| Return type: | Server |
| Throws : | ExceptionInvalidArgumentException with invalid encoding argument |
Set SOAP version
| Parameters: | int – One of the SOAP_1_1 or SOAP_1_2 constants |
|---|---|
| Return type: | Server |
| Throws : | ExceptionInvalidArgumentException with invalid soap version argument |
Check for valid URN
| Parameters: | string – |
|---|---|
| Return type: | true |
| Throws : | ExceptionInvalidArgumentException on invalid URN |
Set actor
Actor is the actor URI for the server.
| Parameters: | string – |
|---|---|
| Return type: | Server |
Set URI
URI in SoapServer is actually the target namespace, not a URI; $uri must begin with ‘urn:’.
| Parameters: | string – |
|---|---|
| Return type: | Server |
Set classmap
| Parameters: | array – |
|---|---|
| Return type: | Server |
| Throws : | ExceptionInvalidArgumentException for any invalid class in the class map |
Set wsdl
| Parameters: | string – URI or path to a WSDL |
|---|---|
| Return type: | Server |
Set the SOAP Feature options.
| Parameters: | string|int – |
|---|---|
| Return type: | Server |
Return current SOAP Features options
| Return type: | int |
|---|
Set the SOAP WSDL Caching Options
| Parameters: | string|int|bool – |
|---|---|
| Return type: | Server |
Attach a function as a server method
| Parameters: | array|string – Function name, array of function names to attach, |
|---|
| param string: | Ignored |
|---|---|
| rtype: | Server |
| throws: | ExceptionInvalidArgumentException on invalid functions |
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 {@link setObject()} to set preconfigured object instances as request handlers.
| Parameters: |
|
|---|---|
| Return type: | Server |
| Throws : | ExceptionInvalidArgumentException if called more than once, or if class |
does not exist
Attach an object to a server
Accepts an instanciated object to use when handling requests.
| Parameters: | object – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Server |
Unimplemented: Load server definition
| Parameters: | array – |
|---|---|
| Return type: | void |
| Throws : | ExceptionRuntimeException Unimplemented |
Set server persistence
| Parameters: | int – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Server |
Set request
$request may be any of: - DOMDocument; if so, then cast to XML - DOMNode; if so, then grab owner document and cast to XML - SimpleXMLElement; if so, then cast to XML - stdClass; if so, calls __toString() and verifies XML - string; if so, verifies XML
| Parameters: | DOMDocument|DOMNode|SimpleXMLElement|stdClass|string – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Server |
Handle a request
Instantiates SoapServer object with options set in object, and dispatches its handle() method.
$request may be any of: - DOMDocument; if so, then cast to XML - DOMNode; if so, then grab owner document and cast to XML - SimpleXMLElement; if so, then cast to XML - stdClass; if so, calls __toString() and verifies XML - string; if so, verifies XML
If no request is passed, pulls request using php:://input (for cross-platform compatibility purposes).
| Parameters: | DOMDocument|DOMNode|SimpleXMLElement|stdClass|string – Optional request |
|---|---|
| Return type: | void|string |
Method initializes the error context that the SOAPServer environment will run in.
| Return type: | bool display_errors original value |
|---|
Register a valid fault exception
| Parameters: | string|array – Exception class or array of exception classes |
|---|---|
| Return type: | Server |
Deregister a fault exception from the fault exception stack
| Parameters: | string – |
|---|---|
| Return type: | bool |
Return fault exceptions list
| Return type: | array |
|---|
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 {@Link registerFaultException()}.
| Parameters: |
|
|---|---|
| Return type: | SoapFault |