php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_soap.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Authors: Brad Lafountain <rodif_bl@yahoo.com> |
14 | Shane Caraveo <shane@caraveo.com> |
15 | Dmitry Stogov <dmitry@php.net> |
16 +----------------------------------------------------------------------+
17*/
18
19#ifndef PHP_SOAP_H
20#define PHP_SOAP_H
21
22#include "php.h"
24#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
26#endif
27#include "zend_smart_str.h"
28#include "php_ini.h"
29#include "SAPI.h"
30#include <libxml/parser.h>
31#include <libxml/xpath.h>
32
33#define PHP_SOAP_VERSION PHP_VERSION
34
35#ifndef PHP_WIN32
36# define TRUE 1
37# define FALSE 0
38# define stricmp strcasecmp
39#endif
40
42typedef struct _encode encode, *encodePtr;
43
44typedef struct _sdl sdl, *sdlPtr;
48typedef struct _sdlType sdlType, *sdlTypePtr;
56
59
60#include "php_xml.h"
61#include "php_encoding.h"
62#include "php_sdl.h"
63#include "php_schema.h"
64#include "php_http.h"
65#include "php_packet_soap.h"
66
71
72struct _soapHeader;
73
105
106#define SOAP_CLASS 1
107#define SOAP_FUNCTIONS 2
108#define SOAP_OBJECT 3
109#define SOAP_FUNCTIONS_ALL 999
110
111#define SOAP_MAP_FUNCTION 1
112#define SOAP_MAP_CLASS 2
113
114#define SOAP_PERSISTENCE_SESSION 1
115#define SOAP_PERSISTENCE_REQUEST 2
116
117#define SOAP_1_1 1
118#define SOAP_1_2 2
119
120#define SOAP_ACTOR_NEXT 1
121#define SOAP_ACTOR_NONE 2
122#define SOAP_ACTOR_UNLIMATERECEIVER 3
123
124#define SOAP_1_1_ACTOR_NEXT "http://schemas.xmlsoap.org/soap/actor/next"
125
126#define SOAP_1_2_ACTOR_NEXT "http://www.w3.org/2003/05/soap-envelope/role/next"
127#define SOAP_1_2_ACTOR_NONE "http://www.w3.org/2003/05/soap-envelope/role/none"
128#define SOAP_1_2_ACTOR_UNLIMATERECEIVER "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
129
130#define SOAP_COMPRESSION_ACCEPT 0x20
131#define SOAP_COMPRESSION_GZIP 0x00
132#define SOAP_COMPRESSION_DEFLATE 0x10
133
134#define SOAP_AUTHENTICATION_BASIC 0
135#define SOAP_AUTHENTICATION_DIGEST 1
136
137#define SOAP_SINGLE_ELEMENT_ARRAYS (1<<0)
138#define SOAP_WAIT_ONE_WAY_CALLS (1<<1)
139#define SOAP_USE_XSI_ARRAY_TYPE (1<<2)
140
141#define WSDL_CACHE_NONE 0x0
142#define WSDL_CACHE_DISK 0x1
143#define WSDL_CACHE_MEMORY 0x2
144#define WSDL_CACHE_BOTH 0x3
145
146/* New SOAP SSL Method Constants */
147#define SOAP_SSL_METHOD_TLS 0
148#define SOAP_SSL_METHOD_SSLv2 1
149#define SOAP_SSL_METHOD_SSLv3 2
150#define SOAP_SSL_METHOD_SSLv23 3
151
152
154 HashTable defEncNs; /* mapping of default namespaces to prefixes */
160 sdlPtr sdl;
170 xmlCharEncodingHandlerPtr encoding;
177
178#ifdef ZTS
179#include "TSRM.h"
180#endif
181
183#define soap_module_ptr &soap_module_entry
184#define phpext_soap_ptr soap_module_ptr
185
187#define SOAP_GLOBAL(v) ZEND_MODULE_GLOBALS_ACCESSOR(soap, v)
188
189#if defined(ZTS) && defined(COMPILE_DL_SOAP)
191#endif
192
197
198void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail);
199
200#define soap_error0(severity, format) \
201 php_error(severity, "SOAP-ERROR: " format)
202
203#define soap_error1(severity, format, param1) \
204 php_error(severity, "SOAP-ERROR: " format, param1)
205
206#define soap_error2(severity, format, param1, param2) \
207 php_error(severity, "SOAP-ERROR: " format, param1, param2)
208
209#define soap_error3(severity, format, param1, param2, param3) \
210 php_error(severity, "SOAP-ERROR: " format, param1, param2, param3)
211
212static zend_always_inline zval *php_soap_deref(zval *zv) {
214 return Z_REFVAL_P(zv);
215 }
216 return zv;
217}
218
219#define Z_CLIENT_URI_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 0))
220#define Z_CLIENT_STYLE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 1))
221#define Z_CLIENT_USE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 2))
222#define Z_CLIENT_LOCATION_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 3))
223#define Z_CLIENT_TRACE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 4))
224#define Z_CLIENT_COMPRESSION_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 5))
225#define Z_CLIENT_SDL_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 6))
226#define Z_CLIENT_TYPEMAP_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 7))
227#define Z_CLIENT_HTTPSOCKET_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 8))
228#define Z_CLIENT_HTTPURL_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 9))
229#define Z_CLIENT_LOGIN_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 10))
230#define Z_CLIENT_PASSWORD_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 11))
231#define Z_CLIENT_USE_DIGEST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 12))
232#define Z_CLIENT_DIGEST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 13))
233#define Z_CLIENT_PROXY_HOST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 14))
234#define Z_CLIENT_PROXY_PORT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 15))
235#define Z_CLIENT_PROXY_LOGIN_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 16))
236#define Z_CLIENT_PROXY_PASSWORD_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 17))
237#define Z_CLIENT_EXCEPTIONS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 18))
238#define Z_CLIENT_ENCODING_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 19))
239#define Z_CLIENT_CLASSMAP_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 20))
240#define Z_CLIENT_FEATURES_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 21))
241#define Z_CLIENT_CONNECTION_TIMEOUT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 22))
242#define Z_CLIENT_STREAM_CONTEXT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 23))
243#define Z_CLIENT_USER_AGENT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 24))
244#define Z_CLIENT_KEEP_ALIVE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 25))
245#define Z_CLIENT_SSL_METHOD_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 26))
246#define Z_CLIENT_SOAP_VERSION_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 27))
247#define Z_CLIENT_USE_PROXY_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 28))
248#define Z_CLIENT_COOKIES_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 29))
249#define Z_CLIENT_DEFAULT_HEADERS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 30))
250#define Z_CLIENT_SOAP_FAULT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 31))
251#define Z_CLIENT_LAST_REQUEST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 32))
252#define Z_CLIENT_LAST_RESPONSE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 33))
253#define Z_CLIENT_LAST_REQUEST_HEADERS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 34))
254#define Z_CLIENT_LAST_RESPONSE_HEADERS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 35))
255
260
261static inline soap_url_object *soap_url_object_fetch(zend_object *obj)
262{
263 return (soap_url_object *) ((char *) obj - XtOffsetOf(soap_url_object, std));
264}
265
266#define Z_SOAP_URL_P(zv) soap_url_object_fetch(Z_OBJ_P(zv))
267
272
273#endif
zval * zv
Definition ffi.c:3975
php_json_error_code error_code
Definition php_json.h:92
zend_class_entry * soap_sdl_class_entry
Definition soap.c:186
struct _sdlFunction sdlFunction
Definition php_soap.h:50
struct _sdlSoapBinding sdlSoapBinding
Definition php_soap.h:53
zend_module_entry soap_module_entry
Definition soap.c:320
struct _sdlRestrictionChar * sdlRestrictionCharPtr
Definition php_soap.h:46
zend_class_entry * soap_url_class_entry
Definition soap.c:185
struct _encode * encodePtr
Definition php_soap.h:42
HashTable * mem_cache
Definition php_soap.h:169
struct _sdlRestrictionChar sdlRestrictionChar
Definition php_soap.h:46
struct _encodeType * encodeTypePtr
Definition php_soap.h:41
struct _soapMapping soapMapping
Definition php_soap.h:57
struct _encodeType encodeType
Definition php_soap.h:41
struct _soapService * soapServicePtr
Definition php_soap.h:58
HashTable * ref_map
Definition php_soap.h:175
HashTable * typemap
Definition php_soap.h:157
zend_class_entry * soap_var_class_entry
Definition soap.c:184
struct _sdlBinding sdlBinding
Definition php_soap.h:52
void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail)
Definition soap.c:2920
char * cache_dir
Definition php_soap.h:166
struct _sdlRestrictions sdlRestrictions
Definition php_soap.h:47
struct _sdlFunction * sdlFunctionPtr
Definition php_soap.h:50
struct _sdlSoapBindingFunctionBody sdlSoapBindingFunctionBody
Definition php_soap.h:55
struct _sdlRestrictionInt * sdlRestrictionIntPtr
Definition php_soap.h:45
xmlCharEncodingHandlerPtr encoding
Definition php_soap.h:170
char cache_mode
Definition php_soap.h:164
zend_long cache_ttl
Definition php_soap.h:167
struct _sdlRestrictionInt sdlRestrictionInt
Definition php_soap.h:45
zval error_object
Definition php_soap.h:162
zend_class_entry * soap_class_entry
Definition soap.c:179
struct _sdlBinding * sdlBindingPtr
Definition php_soap.h:52
char cache_enabled
Definition php_soap.h:165
struct _sdlSoapBindingFunction sdlSoapBindingFunction
Definition php_soap.h:54
struct _sdlSoapBindingFunction * sdlSoapBindingFunctionPtr
Definition php_soap.h:54
HashTable defEncNs
Definition php_soap.h:154
int features
Definition php_soap.h:172
zend_long cache_limit
Definition php_soap.h:168
struct _sdl sdl
Definition php_soap.h:44
struct _encode encode
Definition php_soap.h:42
struct _sdlType * sdlTypePtr
Definition php_soap.h:48
struct _soapMapping * soapMappingPtr
Definition php_soap.h:57
struct _soapService soapService
Definition php_soap.h:58
struct _sdlAttribute sdlAttribute
Definition php_soap.h:51
struct _sdlRestrictions * sdlRestrictionsPtr
Definition php_soap.h:47
HashTable defEncIndex
Definition php_soap.h:156
bool use_soap_error_handler
Definition php_soap.h:163
int cur_uniq_ns
Definition php_soap.h:158
struct _sdlAttribute * sdlAttributePtr
Definition php_soap.h:51
struct _sdlParam sdlParam
Definition php_soap.h:49
int cur_uniq_ref
Definition php_soap.h:174
struct _sdlParam * sdlParamPtr
Definition php_soap.h:49
struct _sdlType sdlType
Definition php_soap.h:48
struct _sdlSoapBinding * sdlSoapBindingPtr
Definition php_soap.h:53
struct _sdlSoapBindingFunctionBody * sdlSoapBindingFunctionBodyPtr
Definition php_soap.h:55
int soap_version
Definition php_soap.h:159
HashTable wsdl_cache
Definition php_soap.h:173
HashTable * class_map
Definition php_soap.h:171
struct _sdl * sdlPtr
Definition php_soap.h:44
HashTable defEnc
Definition php_soap.h:155
Definition php_sdl.h:51
zval to_zval
Definition php_soap.h:69
zval to_xml
Definition php_soap.h:68
zend_class_entry * ce
Definition php_soap.h:83
HashTable * typemap
Definition php_soap.h:91
zval soap_object
Definition php_soap.h:89
char * actor
Definition php_soap.h:94
struct _soapService::_soap_functions soap_functions
struct _soapHeader ** soap_headers_ptr
Definition php_soap.h:100
HashTable * class_map
Definition php_soap.h:97
sdlPtr sdl
Definition php_soap.h:75
xmlCharEncodingHandlerPtr encoding
Definition php_soap.h:96
zend_string * last_response_body
Definition php_soap.h:103
int send_errors
Definition php_soap.h:99
char * uri
Definition php_soap.h:95
struct _soapService::_soap_class soap_class
Definition url.h:20
zend_object std
Definition php_soap.h:270
zend_object std
Definition php_soap.h:258
php_url * url
Definition php_soap.h:257
#define ZEND_TSRMLS_CACHE_EXTERN()
Definition zend.h:67
#define ZEND_END_MODULE_GLOBALS(module_name)
Definition zend_API.h:248
#define ZEND_EXTERN_MODULE_GLOBALS(module_name)
Definition zend_API.h:270
#define ZEND_BEGIN_MODULE_GLOBALS(module_name)
Definition zend_API.h:246
struct _zval_struct zval
int32_t zend_long
Definition zend_long.h:42
struct _zend_string zend_string
struct _zend_module_entry zend_module_entry
#define zend_always_inline
#define XtOffsetOf(s_type, field)
#define UNEXPECTED(condition)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define Z_TYPE_P(zval_p)
Definition zend_types.h:660
#define Z_REFVAL_P(zval_p)
struct _zend_array HashTable
Definition zend_types.h:386
#define IS_REFERENCE
Definition zend_types.h:610