- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathphp_soap.h
273 lines (226 loc) · 9.65 KB
/
php_soap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| https://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Brad Lafountain <rodif_bl@yahoo.com> |
| Shane Caraveo <shane@caraveo.com> |
| Dmitry Stogov <dmitry@php.net> |
+----------------------------------------------------------------------+
*/
#ifndefPHP_SOAP_H
#definePHP_SOAP_H
#include"php.h"
#include"ext/standard/php_standard.h"
#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
#include"ext/session/php_session.h"
#endif
#include"zend_smart_str.h"
#include"php_ini.h"
#include"SAPI.h"
#include<libxml/parser.h>
#include<libxml/xpath.h>
#definePHP_SOAP_VERSION PHP_VERSION
#ifndefPHP_WIN32
# defineTRUE 1
# defineFALSE 0
# definestricmp strcasecmp
#endif
typedefstruct_encodeTypeencodeType, *encodeTypePtr;
typedefstruct_encodeencode, *encodePtr;
typedefstruct_sdlsdl, *sdlPtr;
typedefstruct_sdlRestrictionIntsdlRestrictionInt, *sdlRestrictionIntPtr;
typedefstruct_sdlRestrictionCharsdlRestrictionChar, *sdlRestrictionCharPtr;
typedefstruct_sdlRestrictionssdlRestrictions, *sdlRestrictionsPtr;
typedefstruct_sdlTypesdlType, *sdlTypePtr;
typedefstruct_sdlParamsdlParam, *sdlParamPtr;
typedefstruct_sdlFunctionsdlFunction, *sdlFunctionPtr;
typedefstruct_sdlAttributesdlAttribute, *sdlAttributePtr;
typedefstruct_sdlBindingsdlBinding, *sdlBindingPtr;
typedefstruct_sdlSoapBindingsdlSoapBinding, *sdlSoapBindingPtr;
typedefstruct_sdlSoapBindingFunctionsdlSoapBindingFunction, *sdlSoapBindingFunctionPtr;
typedefstruct_sdlSoapBindingFunctionBodysdlSoapBindingFunctionBody, *sdlSoapBindingFunctionBodyPtr;
typedefstruct_soapMappingsoapMapping, *soapMappingPtr;
typedefstruct_soapServicesoapService, *soapServicePtr;
#include"php_xml.h"
#include"php_encoding.h"
#include"php_sdl.h"
#include"php_schema.h"
#include"php_http.h"
#include"php_packet_soap.h"
struct_soapMapping {
zvalto_xml;
zvalto_zval;
};
struct_soapHeader;
struct_soapService {
sdlPtrsdl;
struct_soap_functions {
HashTable*ft;
intfunctions_all;
} soap_functions;
struct_soap_class {
zend_class_entry*ce;
zval*argv;
uint32_targc;
intpersistence;
} soap_class;
zvalsoap_object;
HashTable*typemap;
intversion;
inttype;
char*actor;
char*uri;
xmlCharEncodingHandlerPtrencoding;
HashTable*class_map;
intfeatures;
intsend_errors;
struct_soapHeader**soap_headers_ptr;
booltrace;
zend_string*last_response_body;
};
#defineSOAP_CLASS 1
#defineSOAP_FUNCTIONS 2
#defineSOAP_OBJECT 3
#defineSOAP_FUNCTIONS_ALL 999
#defineSOAP_MAP_FUNCTION 1
#defineSOAP_MAP_CLASS 2
#defineSOAP_PERSISTENCE_SESSION 1
#defineSOAP_PERSISTENCE_REQUEST 2
#defineSOAP_1_1 1
#defineSOAP_1_2 2
#defineSOAP_ACTOR_NEXT 1
#defineSOAP_ACTOR_NONE 2
#defineSOAP_ACTOR_UNLIMATERECEIVER 3
#defineSOAP_1_1_ACTOR_NEXT "http://schemas.xmlsoap.org/soap/actor/next"
#defineSOAP_1_2_ACTOR_NEXT "http://www.w3.org/2003/05/soap-envelope/role/next"
#defineSOAP_1_2_ACTOR_NONE "http://www.w3.org/2003/05/soap-envelope/role/none"
#defineSOAP_1_2_ACTOR_UNLIMATERECEIVER "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
#defineSOAP_COMPRESSION_ACCEPT 0x20
#defineSOAP_COMPRESSION_GZIP 0x00
#defineSOAP_COMPRESSION_DEFLATE 0x10
#defineSOAP_AUTHENTICATION_BASIC 0
#defineSOAP_AUTHENTICATION_DIGEST 1
#defineSOAP_SINGLE_ELEMENT_ARRAYS (1<<0)
#defineSOAP_WAIT_ONE_WAY_CALLS (1<<1)
#defineSOAP_USE_XSI_ARRAY_TYPE (1<<2)
#defineWSDL_CACHE_NONE 0x0
#defineWSDL_CACHE_DISK 0x1
#defineWSDL_CACHE_MEMORY 0x2
#defineWSDL_CACHE_BOTH 0x3
/* New SOAP SSL Method Constants */
#defineSOAP_SSL_METHOD_TLS 0
#defineSOAP_SSL_METHOD_SSLv2 1
#defineSOAP_SSL_METHOD_SSLv3 2
#defineSOAP_SSL_METHOD_SSLv23 3
ZEND_BEGIN_MODULE_GLOBALS(soap)
HashTabledefEncNs; /* mapping of default namespaces to prefixes */
HashTabledefEnc;
HashTabledefEncIndex;
HashTable*typemap;
intcur_uniq_ns;
intsoap_version;
sdlPtrsdl;
char*error_code;
zvalerror_object;
booluse_soap_error_handler;
charcache_mode;
charcache_enabled;
char*cache_dir;
zend_longcache_ttl;
zend_longcache_limit;
HashTable*mem_cache;
xmlCharEncodingHandlerPtrencoding;
HashTable*class_map;
intfeatures;
HashTablewsdl_cache;
intcur_uniq_ref;
HashTable*ref_map;
ZEND_END_MODULE_GLOBALS(soap)
#ifdefZTS
#include"TSRM.h"
#endif
externzend_module_entrysoap_module_entry;
#definesoap_module_ptr &soap_module_entry
#definephpext_soap_ptr soap_module_ptr
ZEND_EXTERN_MODULE_GLOBALS(soap)
#defineSOAP_GLOBAL(v) ZEND_MODULE_GLOBALS_ACCESSOR(soap, v)
#if defined(ZTS) && defined(COMPILE_DL_SOAP)
ZEND_TSRMLS_CACHE_EXTERN()
#endif
externzend_class_entry*soap_class_entry;
externzend_class_entry*soap_var_class_entry;
externzend_class_entry*soap_url_class_entry;
externzend_class_entry*soap_sdl_class_entry;
voidadd_soap_fault(zval*obj, char*fault_code, char*fault_string, char*fault_actor, zval*fault_detail);
#definesoap_error0(severity, format) \
php_error(severity, "SOAP-ERROR: " format)
#definesoap_error1(severity, format, param1) \
php_error(severity, "SOAP-ERROR: " format, param1)
#definesoap_error2(severity, format, param1, param2) \
php_error(severity, "SOAP-ERROR: " format, param1, param2)
#definesoap_error3(severity, format, param1, param2, param3) \
php_error(severity, "SOAP-ERROR: " format, param1, param2, param3)
staticzend_always_inlinezval*php_soap_deref(zval*zv) {
if (UNEXPECTED(Z_TYPE_P(zv) ==IS_REFERENCE)) {
returnZ_REFVAL_P(zv);
}
returnzv;
}
#defineZ_CLIENT_URI_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 0))
#defineZ_CLIENT_STYLE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 1))
#defineZ_CLIENT_USE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 2))
#defineZ_CLIENT_LOCATION_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 3))
#defineZ_CLIENT_TRACE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 4))
#defineZ_CLIENT_COMPRESSION_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 5))
#defineZ_CLIENT_SDL_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 6))
#defineZ_CLIENT_TYPEMAP_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 7))
#defineZ_CLIENT_HTTPSOCKET_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 8))
#defineZ_CLIENT_HTTPURL_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 9))
#defineZ_CLIENT_LOGIN_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 10))
#defineZ_CLIENT_PASSWORD_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 11))
#defineZ_CLIENT_USE_DIGEST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 12))
#defineZ_CLIENT_DIGEST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 13))
#defineZ_CLIENT_PROXY_HOST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 14))
#defineZ_CLIENT_PROXY_PORT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 15))
#defineZ_CLIENT_PROXY_LOGIN_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 16))
#defineZ_CLIENT_PROXY_PASSWORD_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 17))
#defineZ_CLIENT_EXCEPTIONS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 18))
#defineZ_CLIENT_ENCODING_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 19))
#defineZ_CLIENT_CLASSMAP_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 20))
#defineZ_CLIENT_FEATURES_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 21))
#defineZ_CLIENT_CONNECTION_TIMEOUT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 22))
#defineZ_CLIENT_STREAM_CONTEXT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 23))
#defineZ_CLIENT_USER_AGENT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 24))
#defineZ_CLIENT_KEEP_ALIVE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 25))
#defineZ_CLIENT_SSL_METHOD_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 26))
#defineZ_CLIENT_SOAP_VERSION_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 27))
#defineZ_CLIENT_USE_PROXY_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 28))
#defineZ_CLIENT_COOKIES_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 29))
#defineZ_CLIENT_DEFAULT_HEADERS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 30))
#defineZ_CLIENT_SOAP_FAULT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 31))
#defineZ_CLIENT_LAST_REQUEST_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 32))
#defineZ_CLIENT_LAST_RESPONSE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 33))
#defineZ_CLIENT_LAST_REQUEST_HEADERS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 34))
#defineZ_CLIENT_LAST_RESPONSE_HEADERS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 35))
typedefstructsoap_url_object {
php_url*url;
zend_objectstd;
} soap_url_object;
staticinlinesoap_url_object*soap_url_object_fetch(zend_object*obj)
{
return (soap_url_object*) ((char*) obj-XtOffsetOf(soap_url_object, std));
}
#defineZ_SOAP_URL_P(zv) soap_url_object_fetch(Z_OBJ_P(zv))
typedefstructsoap_sdl_object {
sdl*sdl;
zend_objectstd;
} soap_sdl_object;
#endif