Funciones SOAP
Introducción
La extensión SOAP puede ser usada para escribir Servidores y Clientes SOAP. Soporta subconjuntos de las especificaciones » SOAP 1.1, » SOAP 1.2 y » WSDL 1.1.
Requisitos
Esta extensión hace uso de la » biblioteca xml de GNOME. Descargue e instale esta biblioteca. Necesitará por lo menos de libxml-2.5.4.
Instalación
Esta extensión se encuentra disponible únicamente si PHP fue configurado con --enable-soap.
Configuración en tiempo de ejecución
El comportamiento de estas funciones está afectado por los valores definidos en php.ini.
Nombre | Predeterminado | Modificable | Cambios |
---|---|---|---|
soap.wsdl_cache_enabled | "1" | PHP_INI_ALL | Disponible desde PHP 5.0.0. |
soap.wsdl_cache_dir | "/tmp" | PHP_INI_ALL | Disponible desde PHP 5.0.0. |
soap.wsdl_cache_ttl | "86400" | PHP_INI_ALL | Disponible desde PHP 5.0.0. |
soap.wsdl_cache_limit | "5" | PHP_INI_ALL | Disponible desde PHP 5.1.5. |
A continuación se presenta una corta explicación de las directivas de configuración.
- soap.wsdl_cache_enabled boolean
-
Habilita o deshabilita la caracterÃstica de caché de WSDL.
- soap.wsdl_cache_dir string
-
Establece el nombre del directorio en el que la extensión SOAP pondrá los archivos de caché.
- soap.wsdl_cache_ttl int
-
Establece el número de segundos (tiempo de vida o TTL) en el que los archivos de caché serán usados en lugar de los originales.
- soap.wsdl_cache_limit integer
-
Número máximo de archivos de caché wsdl en memoria
Clases predefinidas
SoapClient
Constructor
-
SoapClient->__construct() - construye un nuevo objeto SoapClient
Métodos
-
SoapClient->__call() - Llama una función SOAP (obsoleto)
-
SoapClient->__doRequest() - Realiza una petición SOAP
-
SoapClient->__getFunctions() - Devuelve una lista de funciones SOAP
-
SoapClient->__getLastRequest() - Devuelve la última petición SOAP
-
SoapClient->__getLastRequestHeaders() - Devuelve las cabeceras de la última petición SOAP
-
SoapClient->__getLastResponse() - Devuelve la última respuesta SOAP
-
SoapClient->__getLastResponseHeaders() - Devuelve las cabeceras de la última respuesta SOAP
-
SoapClient->__getTypes() - Devuelve la lista de tipos SOAP
-
SoapClient->__setCookie() - Define la cookie que será enviada con la petición SOAP
-
SoapClient->__soapCall() - Llama una función SOAP
SoapFault
Constructor
-
SoapFault->__construct() - construir un nuevo objeto SoapFault
SoapHeader
SoapHeader es una clase especial de bajo nivel para pasar o devolver cabeceras SOAP. Es simplemente un contenedor de datos y no tiene métodos especiales aparte de su constructor. Puede ser usado en el método SoapClient->__soapCall() para pasar una cabecera o en un gestor de cabecera SOAP para devolver la cabecera en una respuesta SOAP.
Constructor
-
SoapHeader->__construct() - construir un nuevo objeto SoapHeader
SoapParam
SoapParam es una clase especial de bajo nivel para nombrar parámetros y devolver valores en modo no-WSDL. Es simplemente un contenedor de datos y no tiene métodos especiales aparte de su constructor.
Constructor
-
SoapParam->__construct() - construir un nuevo objeto SoapParam
SoapServer
Constructor
-
SoapServer->__construct() - construir un nuevo objeto SoapServer
Métodos
-
SoapServer->addFunction() - Agrega una o varias funciones para manejar peticiones SOAP
-
SoapServer->getFunctions() - Devuelve la lista de funciones definidas
-
SoapServer->handle() - Maneja una petición SOAP
-
SoapServer->setClass() - Define una clase que manejará peticiones SOAP
-
SoapServer->setPersistence() - Define el modo de persistencia de SoapServer
SoapVar
SoapVar es una clase especial de bajo nivel para codificar parámetros y valores de retorno en modo no-WSDL. Es simplemente un contenedor de datos y no tiene métodos especiale aparte del constructor. Es útil cuando se desea definir la propiedad tipo en peticiones o respuestas SOAP.
Constructor
-
SoapVar->__construct() - construir un nuevo objeto SoapVar
Constantes predefinidas
Estas constantes están definidas por esta extensión y estarán disponibles solamente cuando la extensión ha sido o bien compilada dentro de PHP o grabada dinámicamente en tiempo de ejecución.
- SOAP_1_1 (integer)
- SOAP_1_2 (integer)
- SOAP_PERSISTENCE_SESSION (integer)
- SOAP_PERSISTENCE_REQUEST (integer)
- SOAP_FUNCTIONS_ALL (integer)
- SOAP_ENCODED (integer)
- SOAP_LITERAL (integer)
- SOAP_RPC (integer)
- SOAP_DOCUMENT (integer)
- SOAP_ACTOR_NEXT (integer)
- SOAP_ACTOR_NONE (integer)
- SOAP_ACTOR_UNLIMATERECEIVER (integer)
- SOAP_COMPRESSION_ACCEPT (integer)
- SOAP_COMPRESSION_GZIP (integer)
- SOAP_COMPRESSION_DEFLATE (integer)
- SOAP_WAIT_ONE_WAY_CALLS (integer)
- Agregada en PHP 5.1.0.
- UNKNOWN_TYPE (integer)
- XSD_STRING (integer)
- XSD_BOOLEAN (integer)
- XSD_DECIMAL (integer)
- XSD_FLOAT (integer)
- XSD_DOUBLE (integer)
- XSD_DURATION (integer)
- XSD_DATETIME (integer)
- XSD_TIME (integer)
- XSD_DATE (integer)
- XSD_GYEARMONTH (integer)
- XSD_GYEAR (integer)
- XSD_GMONTHDAY (integer)
- XSD_GDAY (integer)
- XSD_GMONTH (integer)
- XSD_HEXBINARY (integer)
- XSD_BASE64BINARY (integer)
- XSD_ANYURI (integer)
- XSD_ANYXML (integer)
- Agregada en PHP 5.1.0.
- XSD_QNAME (integer)
- XSD_NOTATION (integer)
- XSD_NORMALIZEDSTRING (integer)
- XSD_TOKEN (integer)
- XSD_LANGUAGE (integer)
- XSD_NMTOKEN (integer)
- XSD_NAME (integer)
- XSD_NCNAME (integer)
- XSD_ID (integer)
- XSD_IDREF (integer)
- XSD_IDREFS (integer)
- XSD_ENTITY (integer)
- XSD_ENTITIES (integer)
- XSD_INTEGER (integer)
- XSD_NONPOSITIVEINTEGER (integer)
- XSD_NEGATIVEINTEGER (integer)
- XSD_LONG (integer)
- XSD_INT (integer)
- XSD_SHORT (integer)
- XSD_BYTE (integer)
- XSD_NONNEGATIVEINTEGER (integer)
- XSD_UNSIGNEDLONG (integer)
- XSD_UNSIGNEDINT (integer)
- XSD_UNSIGNEDSHORT (integer)
- XSD_UNSIGNEDBYTE (integer)
- XSD_POSITIVEINTEGER (integer)
- XSD_NMTOKENS (integer)
- XSD_ANYTYPE (integer)
- SOAP_ENC_OBJECT (integer)
- SOAP_ENC_ARRAY (integer)
- XSD_1999_TIMEINSTANT (integer)
- XSD_NAMESPACE (string)
- XSD_1999_NAMESPACE (string)
Table of Contents
- is_soap_fault — Checks if SOAP call was failed
- SoapClient->__call() — Calls a SOAP function (deprecated)
- SoapClient->__construct() — SoapClient constructor
- SoapClient->__doRequest() — Performs a SOAP request
- SoapClient->__getFunctions() — Returns list of SOAP functions
- SoapClient->__getLastRequest() — Returns last SOAP request
- SoapClient->__getLastRequestHeaders() — Returns last SOAP request headers
- SoapClient->__getLastResponse() — Returns last SOAP response.
- SoapClient->__getLastResponseHeaders() — Returns last SOAP response headers.
- SoapClient->__getTypes() — Returns list of SOAP types
- SoapClient->__setCookie() — Sets the cookie that will be sent with the SOAP request
- SoapClient->__soapCall() — Calls a SOAP function
- SoapFault->__construct() — SoapFault constructor
- SoapHeader->__construct() — SoapHeader constructor
- SoapParam->__construct() — SoapParam constructor
- SoapServer->addFunction() — Adds one or several functions those will handle SOAP requests
- SoapServer->__construct() — SoapServer constructor
- SoapServer->fault() — Issue SoapServer fault indicating an error
- SoapServer->getFunctions() — Returns list of defined functions
- SoapServer->handle() — Handles a SOAP request
- SoapServer->setClass() — Sets class which will handle SOAP requests
- SoapServer->setPersistence() — Sets persistence mode of SoapServer
- SoapVar->__construct() — SoapVar constructor
- use_soap_error_handler — Set whether to use the SOAP error handler and return the former value