32#if defined(HAVE_PHP_SESSION) || defined(COMPILE_DL_SOAP)
33# define SOAP_HAS_SESSION_SUPPORT
51static void clear_soap_fault(
zval *obj);
52static void set_soap_fault(
zval *obj,
const char *fault_code_ns,
const char *fault_code,
const char *fault_string,
const char *fault_actor,
zval *fault_detail,
zend_string *
name);
53static void add_soap_fault_ex(
zval *fault,
zval *obj,
char *fault_code,
char *fault_string,
char *fault_actor,
zval *fault_detail);
64static xmlNodePtr serialize_parameter(
sdlParamPtr param,
zval *param_val, uint32_t index,
const char *
name,
int style, xmlNodePtr parent);
65static xmlNodePtr serialize_zval(
zval *
val,
sdlParamPtr param,
const char *paramName,
int style, xmlNodePtr parent);
68static void delete_argv(
struct _soap_class *
class);
70static void soap_error_handler(
int error_num,
zend_string *error_filename, uint32_t error_lineno,
zend_string *message);
72#define SOAP_SERVER_BEGIN_CODE() \
73 bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\
74 char* _old_error_code = SOAP_GLOBAL(error_code);\
75 zend_object* _old_error_object = Z_OBJ(SOAP_GLOBAL(error_object));\
76 int _old_soap_version = SOAP_GLOBAL(soap_version);\
77 SOAP_GLOBAL(use_soap_error_handler) = 1;\
78 SOAP_GLOBAL(error_code) = "Server";\
79 Z_OBJ(SOAP_GLOBAL(error_object)) = Z_OBJ_P(ZEND_THIS);
81#define SOAP_SERVER_END_CODE() \
82 SOAP_GLOBAL(use_soap_error_handler) = _old_handler;\
83 SOAP_GLOBAL(error_code) = _old_error_code;\
84 Z_OBJ(SOAP_GLOBAL(error_object)) = _old_error_object;\
85 SOAP_GLOBAL(soap_version) = _old_soap_version;
87#define SOAP_CLIENT_BEGIN_CODE() \
88 bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\
89 char* _old_error_code = SOAP_GLOBAL(error_code);\
90 zend_object* _old_error_object = Z_OBJ(SOAP_GLOBAL(error_object));\
91 int _old_soap_version = SOAP_GLOBAL(soap_version);\
92 bool _old_in_compilation = CG(in_compilation); \
93 zend_execute_data *_old_current_execute_data = EG(current_execute_data); \
94 zval *_old_stack_top = EG(vm_stack_top); \
95 bool _bailout = false;\
96 SOAP_GLOBAL(use_soap_error_handler) = 1;\
97 SOAP_GLOBAL(error_code) = "Client";\
98 Z_OBJ(SOAP_GLOBAL(error_object)) = Z_OBJ_P(ZEND_THIS);\
101#define SOAP_CLIENT_END_CODE() \
103 CG(in_compilation) = _old_in_compilation; \
104 EG(current_execute_data) = _old_current_execute_data; \
105 if (EG(exception) == NULL || \
106 !instanceof_function(EG(exception)->ce, soap_fault_class_entry)) {\
109 if (_old_stack_top != EG(vm_stack_top)) { \
110 while (EG(vm_stack)->prev != NULL && \
111 ((char*)_old_stack_top < (char*)EG(vm_stack) || \
112 (char*) _old_stack_top > (char*)EG(vm_stack)->end)) { \
113 zend_vm_stack tmp = EG(vm_stack)->prev; \
114 efree(EG(vm_stack)); \
115 EG(vm_stack) = tmp; \
116 EG(vm_stack_end) = tmp->end; \
118 EG(vm_stack)->top = _old_stack_top; \
121 SOAP_GLOBAL(use_soap_error_handler) = _old_handler;\
122 SOAP_GLOBAL(error_code) = _old_error_code;\
123 Z_OBJ(SOAP_GLOBAL(error_object)) = _old_error_object;\
124 SOAP_GLOBAL(soap_version) = _old_soap_version;\
129#define FETCH_THIS_SDL(ss) \
131 zval *__tmp = Z_CLIENT_SDL_P(ZEND_THIS); \
132 if (Z_TYPE_P(__tmp) == IS_OBJECT && instanceof_function(Z_OBJCE_P(__tmp), soap_sdl_class_entry)) { \
133 ss = Z_SOAP_SDL_P(__tmp)->sdl; \
139#define Z_PARAM_NAME_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 0))
140#define Z_PARAM_DATA_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 1))
142#define Z_HEADER_NAMESPACE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 0))
143#define Z_HEADER_NAME_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 1))
144#define Z_HEADER_DATA_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 2))
145#define Z_HEADER_MUST_UNDERSTAND_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 3))
146#define Z_HEADER_ACTOR_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 4))
148#define Z_SERVER_SOAP_FAULT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), 0))
151#define FAULT_PROP_START_OFFSET zend_ce_exception->default_properties_count
152#define Z_FAULT_STRING_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), FAULT_PROP_START_OFFSET + 0))
153#define Z_FAULT_CODE_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), FAULT_PROP_START_OFFSET + 1))
154#define Z_FAULT_CODENS_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), FAULT_PROP_START_OFFSET + 2))
155#define Z_FAULT_ACTOR_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), FAULT_PROP_START_OFFSET + 3))
156#define Z_FAULT_DETAIL_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), FAULT_PROP_START_OFFSET + 4))
157#define Z_FAULT_NAME_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), FAULT_PROP_START_OFFSET + 5))
158#define Z_FAULT_HEADERFAULT_P(zv) php_soap_deref(OBJ_PROP_NUM(Z_OBJ_P(zv), FAULT_PROP_START_OFFSET + 6))
160#define FETCH_THIS_SERVICE_NO_BAILOUT(ss) \
162 ss = soap_server_object_fetch(Z_OBJ_P(ZEND_THIS))->service; \
164 zend_throw_error(NULL, "Cannot fetch SoapServer object"); \
169#define FETCH_THIS_SERVICE(ss) \
171 ss = soap_server_object_fetch(Z_OBJ_P(ZEND_THIS))->service; \
173 zend_throw_error(NULL, "Cannot fetch SoapServer object"); \
174 SOAP_SERVER_END_CODE(); \
209static void soap_server_object_free(
zend_object *obj) {
212 delete_service(server_obj->
service);
224 return &url_obj->
std;
262#define Z_SOAP_SDL_P(zv) soap_sdl_object_fetch(Z_OBJ_P(zv))
271 return &sdl_obj->
std;
330#ifdef STANDARD_MODULE_HEADER
336#ifdef COMPILE_DL_SOAP
376 OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
384 cache_dir, zend_soap_globals, soap_globals)
386 cache_ttl, zend_soap_globals, soap_globals)
395static
void php_soap_prepare_globals(
void)
411 char *ns_type, *clark_notation;
415 zend_hash_str_add_ptr(&
defEnc, ns_type, ns_type_len, (
void*)enc);
416 efree(clark_notation);
436static void php_soap_init_globals(zend_soap_globals *soap_globals)
438#if defined(COMPILE_DL_SOAP) && defined(ZTS)
441 soap_globals->defEnc =
defEnc;
444 soap_globals->typemap =
NULL;
445 soap_globals->use_soap_error_handler = 0;
446 soap_globals->error_code =
NULL;
448 soap_globals->sdl =
NULL;
449 soap_globals->soap_version =
SOAP_1_1;
450 soap_globals->mem_cache =
NULL;
451 soap_globals->ref_map =
NULL;
493 php_soap_prepare_globals();
504 soap_server_class_entry = register_class_SoapServer();
505 soap_server_class_entry->create_object = soap_server_object_create;
506 soap_server_class_entry->default_object_handlers = &soap_server_object_handlers;
510 soap_server_object_handlers.free_obj = soap_server_object_free;
511 soap_server_object_handlers.clone_obj =
NULL;
517 soap_param_class_entry = register_class_SoapParam();
519 soap_header_class_entry = register_class_SoapHeader();
527 soap_url_object_handlers.free_obj = soap_url_object_free;
528 soap_url_object_handlers.get_constructor = soap_url_object_get_constructor;
529 soap_url_object_handlers.clone_obj =
NULL;
530 soap_url_object_handlers.cast_object = soap_url_cast_object;
539 soap_sdl_object_handlers.free_obj = soap_sdl_object_free;
540 soap_sdl_object_handlers.get_constructor = soap_sdl_object_get_constructor;
541 soap_sdl_object_handlers.clone_obj =
NULL;
542 soap_url_object_handlers.cast_object = soap_sdl_cast_object;
545 register_soap_symbols(module_number);
592 bool actor_is_null = 1;
593 bool must_understand = 0;
629 }
else if (!actor_is_null) {
640static void soap_fault_dtor_properties(
zval *obj)
661 char *fault_string =
NULL, *fault_code =
NULL, *fault_actor =
NULL, *fault_code_ns =
NULL;
662 size_t fault_string_len, fault_actor_len = 0, fault_code_len = 0;
680 fault_code_len =
ZSTR_LEN(code_str);
681 }
else if (code_ht && zend_hash_num_elements(code_ht) == 2) {
691 if ((code_str || code_ht) && (fault_code ==
NULL || fault_code_len == 0)) {
704 set_soap_fault(this_ptr, fault_code_ns, fault_code, fault_string, fault_actor, details,
name);
705 if (headerfault !=
NULL) {
714 zval *faultcode, *faultstring, *
file, *
line, trace, rv1, rv2, rv3, rv4;
717 zend_string *faultcode_val, *faultstring_val, *file_val;
726 faultstring =
zend_read_property(soap_fault_class_entry,
Z_OBJ_P(this_ptr),
"faultstring",
sizeof(
"faultstring")-1, 1, &rv2);
730 zend_call_method_with_0_params(
733 faultcode_val = zval_get_string(faultcode);
734 faultstring_val = zval_get_string(faultstring);
735 file_val = zval_get_string(
file);
736 line_val = zval_get_long(
line);
757 bool type_is_null = 1;
780 if (stype &&
ZSTR_LEN(stype) != 0) {
789 if (namens &&
ZSTR_LEN(namens) != 0) {
802 char *type_name =
NULL;
803 char *type_ns =
NULL;
884 smart_str_appends(&nscat, type_ns);
885 smart_str_appendc(&nscat,
':');
887 smart_str_appends(&nscat, type_name);
889 zend_hash_update_ptr(
typemap, nscat.
s, new_enc);
890 smart_str_free(&nscat);
966 zend_hash_num_elements(
Z_ARRVAL_P(tmp)) > 0) {
993 service->
trace =
true;
1011 service->
uri =
estrdup(
"http://unknown-uri/");
1017 service->
typemap = soap_create_typemap(service->
sdl, typemap_ht);
1021 server_obj->
service = service;
1044 zend_throw_error(
NULL,
"SoapServer::setPersistence(): Session persistence cannot be enabled because the session module is not enabled");
1051 1,
"must be either SOAP_PERSISTENCE_SESSION or SOAP_PERSISTENCE_REQUEST when the SOAP server is used in class mode"
1055 zend_throw_error(
NULL,
"SoapServer::setPersistence(): Persistence cannot be set when the SOAP server is used in function mode");
1130 ft =
EG(function_table);
1155 zval *function_name, function_copy;
1183 key = zend_string_tolower(
Z_STR_P(tmp_function));
1185 if ((f = zend_hash_find_ptr(
EG(function_table),
key)) ==
NULL) {
1201 key = zend_string_tolower(
Z_STR_P(function_name));
1203 if ((f = zend_hash_find_ptr(
EG(function_table),
key)) ==
NULL) {
1219 " If all PHP functions should be enabled, the flattened return value of get_defined_functions() can be used");
1240 zval exception_object;
1243 if (instanceof_function(
Z_OBJCE(exception_object), soap_fault_class_entry)) {
1244 soap_server_fault_ex(
function, &exception_object,
NULL);
1252 add_soap_fault_ex(&exception_object, this_ptr,
"Server",
"Internal Error",
NULL,
NULL);
1254 soap_server_fault_ex(
function, &exception_object,
NULL);
1265 xmlDocPtr doc_request =
NULL, doc_return =
NULL;
1266 zval function_name, *params, *soap_obj,
retval;
1268 uint32_t num_params = 0;
1269 int size, i, call_status = 0;
1276 xmlCharEncodingHandlerPtr old_encoding;
1291 soap_server_fault(
"Server",
"Input string is too long",
NULL,
NULL,
NULL);
1296 if (
SG(request_info).request_method &&
1297 strcmp(
SG(request_info).request_method,
"GET") == 0 &&
1298 SG(request_info).query_string &&
1299 stricmp(
SG(request_info).query_string,
"wsdl") == 0) {
1311 sapi_add_header(
"Content-Type: text/xml; charset=utf-8",
sizeof(
"Content-Type: text/xml; charset=utf-8")-1, 1);
1315 soap_server_fault(
"Server",
"Couldn't find WSDL",
NULL,
NULL,
NULL);
1325 soap_server_fault(
"Server",
"WSDL generation is not supported yet",
NULL,
NULL,
NULL);
1398 if (doc_request ==
NULL) {
1399 soap_server_fault(
"Client",
"Bad Request",
NULL,
NULL,
NULL);
1401 if (xmlGetIntSubset(doc_request) !=
NULL) {
1402 xmlNodePtr env =
get_node(doc_request->children,
"Envelope");
1403 if (env && env->ns) {
1410 xmlFreeDoc(doc_request);
1411 soap_server_fault(
"Server",
"DTD are not supported by SOAP",
NULL,
NULL,
NULL);
1427 function = deserialize_function_call(service->
sdl, doc_request, service->
actor, &function_name, &num_params, ¶ms, &
soap_version, &soap_headers);
1430 xmlFreeDoc(doc_request);
1434 xmlFreeDoc(doc_request);
1449 function_table = &((
Z_OBJCE_P(soap_obj))->function_table);
1452#ifdef SOAP_HAS_SESSION_SUPPORT
1464 soap_obj = tmp_soap_p;
1467 soap_server_fault(
"Server",
"SoapServer class was deserialized from the session prior to loading the class passed to SoapServer::setClass(). Start the session after loading all classes to resolve this issue.",
NULL,
NULL,
NULL);
1474 if (soap_obj ==
NULL) {
1479 zend_call_known_instance_method(
1491#ifdef SOAP_HAS_SESSION_SUPPORT
1495 if (tmp_soap_p !=
NULL) {
1496 soap_obj = tmp_soap_p;
1498 soap_obj = &tmp_soap;
1504 soap_obj = &tmp_soap;
1507 function_table = &((
Z_OBJCE_P(soap_obj))->function_table);
1510 function_table =
EG(function_table);
1517 if (soap_headers !=
NULL) {
1526 soap_server_fault(
"MustUnderstand",
"Header not understood",
NULL,
NULL,
NULL);
1545 instanceof_function(
Z_OBJCE(h->
retval), soap_fault_class_entry)) {
1557 soap_server_fault(
"MustUnderstand",
"Header not understood",
NULL,
NULL,
NULL);
1594 char *response_name;
1597 instanceof_function(
Z_OBJCE(
retval), soap_fault_class_entry)) {
1604 if (has_response_name) {
1605 response_name =
function->responseName;
1607 response_name =
emalloc(
Z_STRLEN(function_name) +
sizeof(
"Response"));
1609 memcpy(response_name+
Z_STRLEN(function_name),
"Response",
sizeof(
"Response"));
1613 if (!has_response_name) {
1614 efree(response_name);
1637 xmlDocDumpMemory(doc_return, &
buf, &
size);
1644 sapi_add_header(
"Content-Type: application/soap+xml; charset=utf-8",
sizeof(
"Content-Type: application/soap+xml; charset=utf-8")-1, 1);
1646 sapi_add_header(
"Content-Type: text/xml; charset=utf-8",
sizeof(
"Content-Type: text/xml; charset=utf-8")-1, 1);
1649 if (
INI_INT(
"zlib.output_compression")) {
1650 sapi_add_header(
"Connection: close",
sizeof(
"Connection: close")-1, 1);
1652 snprintf(cont_len,
sizeof(cont_len),
"Content-Length: %d",
size);
1656 if (service->
trace) {
1664 sapi_add_header(
"HTTP/1.1 202 Accepted",
sizeof(
"HTTP/1.1 202 Accepted")-1, 1);
1665 sapi_add_header(
"Content-Length: 0",
sizeof(
"Content-Length: 0")-1, 1);
1677 xmlFreeDoc(doc_return);
1682 while (soap_headers !=
NULL) {
1686 soap_headers = soap_headers->
next;
1701 if (num_params > 0) {
1702 for (i = 0; i < num_params;i++) {
1707 zval_ptr_dtor_str(&function_name);
1716 char *code, *string, *actor=
NULL;
1717 size_t code_len, string_len, actor_len = 0;
1721 xmlCharEncodingHandlerPtr old_encoding;
1724 &code, &code_len, &
string, &string_len, &actor, &actor_len, &details,
1734 soap_server_fault(code,
string, actor, details,
name);
1755 zend_throw_error(
NULL,
"SoapServer::addSoapHeader() may be called only during SOAP request processing");
1760 while (*
p !=
NULL) {
1786 xmlDocPtr doc_return;
1788 int use_http_error_status = 1;
1794 xmlDocDumpMemory(doc_return, &
buf, &
size);
1800 use_http_error_status = 0;
1807 if (use_http_error_status) {
1808 sapi_add_header(
"HTTP/1.1 500 Internal Server Error",
sizeof(
"HTTP/1.1 500 Internal Server Error")-1, 1);
1810 if (
INI_INT(
"zlib.output_compression")) {
1811 sapi_add_header(
"Connection: close",
sizeof(
"Connection: close")-1, 1);
1813 snprintf(cont_len,
sizeof(cont_len),
"Content-Length: %d",
size);
1817 sapi_add_header(
"Content-Type: application/soap+xml; charset=utf-8",
sizeof(
"Content-Type: application/soap+xml; charset=utf-8")-1, 1);
1819 sapi_add_header(
"Content-Type: text/xml; charset=utf-8",
sizeof(
"Content-Type: text/xml; charset=utf-8")-1, 1);
1824 xmlFreeDoc(doc_return);
1835 set_soap_fault(&
ret,
NULL, code,
string, actor, details,
name);
1844 bool _old_in_compilation;
1846 int _old_http_response_code;
1847 char *_old_http_status_line;
1849 _old_in_compilation =
CG(in_compilation);
1850 _old_current_execute_data =
EG(current_execute_data);
1851 _old_http_response_code =
SG(sapi_headers).http_response_code;
1852 _old_http_status_line =
SG(sapi_headers).http_status_line;
1873 old_error_handler(error_num, error_filename, error_lineno, message);
1876 int old =
PG(display_errors);
1897 buffer = zend_string_copy(message);
1909 zend_string_release(
buffer);
1913 PG(display_errors) = 0;
1914 SG(sapi_headers).http_status_line =
NULL;
1916 old_error_handler(error_num, error_filename, error_lineno, message);
1918 CG(in_compilation) = _old_in_compilation;
1919 EG(current_execute_data) = _old_current_execute_data;
1920 if (
SG(sapi_headers).http_status_line) {
1921 efree(
SG(sapi_headers).http_status_line);
1923 SG(sapi_headers).http_status_line = _old_http_status_line;
1924 SG(sapi_headers).http_response_code = _old_http_response_code;
1926 PG(display_errors) = old;
1929 soap_server_fault_ex(
NULL, &fault_obj,
NULL);
1936static void soap_error_handler(
int error_num,
zend_string *error_filename,
const uint32_t error_lineno,
zend_string *message)
1939 old_error_handler(error_num, error_filename, error_lineno, message);
1941 soap_real_error_handler(error_num, error_filename, error_lineno, message);
1965 instanceof_function(
Z_OBJCE_P(fault), soap_fault_class_entry)) {
2099 zend_hash_str_exists(
EG(function_table),
"gzinflate",
sizeof(
"gzinflate")-1) &&
2100 zend_hash_str_exists(
EG(function_table),
"gzdeflate",
sizeof(
"gzdeflate")-1) &&
2101 zend_hash_str_exists(
EG(function_table),
"gzuncompress",
sizeof(
"gzuncompress")-1) &&
2102 zend_hash_str_exists(
EG(function_table),
"gzcompress",
sizeof(
"gzcompress")-1) &&
2103 zend_hash_str_exists(
EG(function_table),
"gzencode",
sizeof(
"gzencode")-1)) {
2108 xmlCharEncodingHandlerPtr
encoding;
2128 zend_hash_num_elements(
Z_ARRVAL_P(tmp)) > 0) {
2168 "The \"ssl_method\" option is deprecated. "
2169 "Use \"ssl\" stream context options instead");
2178 int old_soap_version;
2207static bool do_request(
zval *this_ptr, xmlDoc *request,
const char *location,
const char *action,
int version,
bool one_way,
zval *response)
2214 bool _bailout =
false;
2218 xmlDocDumpMemory(request, (xmlChar**)&
buf, &buf_size);
2234 if (action ==
NULL) {
2284 zval* output_headers
2290 xmlDocPtr request =
NULL;
2294 xmlCharEncodingHandlerPtr old_encoding;
2315 if (location ==
NULL) {
2335 clear_soap_fault(this_ptr);
2373 soap_headers ==
NULL) {
2377 const char *location_c_str;
2378 if (location ==
NULL) {
2379 location_c_str = binding->
location;
2382 location_c_str =
ZSTR_VAL(location);
2386 request = serialize_function_call(this_ptr, fn,
NULL, fnb->input.ns, real_args, arg_count,
soap_version, soap_headers);
2387 ret = do_request(this_ptr, request, location_c_str, fnb->soapAction,
soap_version, one_way, &response);
2389 request = serialize_function_call(this_ptr, fn,
NULL,
sdl->target_ns, real_args, arg_count,
soap_version, soap_headers);
2390 ret = do_request(this_ptr, request, location_c_str,
NULL,
soap_version, one_way, &response);
2393 xmlFreeDoc(request);
2406 smart_str_appends(&
error,
"Function (\"");
2408 smart_str_appends(&
error,
"\") is not a valid method for this service");
2409 smart_str_0(&
error);
2411 smart_str_free(&
error);
2417 }
else if (location ==
NULL) {
2420 if (call_uri ==
NULL) {
2425 if (soap_action ==
NULL) {
2426 smart_str_append(&action, call_uri);
2427 smart_str_appendc(&action,
'#');
2428 smart_str_append(&action,
function);
2430 smart_str_append(&action, soap_action);
2432 smart_str_0(&action);
2436 smart_str_free(&action);
2437 xmlFreeDoc(request);
2486 smart_str_free(&action);
2488 xmlFreeDoc(request);
2496static bool verify_soap_headers_array(
const HashTable *
ht)
2502 !instanceof_function(
Z_OBJCE_P(tmp), soap_header_class_entry)) {
2511static void soap_client_call_common(
2519 bool free_soap_headers,
2520 zval *output_headers,
2530 if (!free_soap_headers) {
2532 free_soap_headers = 1;
2542 free_soap_headers = 0;
2546 uint32_t arg_count = zend_hash_num_elements(
args);
2548 if (arg_count > 0) {
2561 do_soap_call(
execute_data, this_ptr,
function, arg_count, real_args,
return_value, location, soap_action, uri, soap_headers, output_headers);
2563 if (arg_count > 0) {
2566 if (soap_headers && free_soap_headers) {
2568 efree(soap_headers);
2581 soap_client_call_common(
2627 if (output_headers) {
2628 output_headers = zend_try_array_init(output_headers);
2629 if (output_headers ==
NULL) {
2635 bool free_soap_headers =
false;
2639 if (!verify_soap_headers_array(soap_headers)) {
2642 free_soap_headers =
false;
2647 free_soap_headers =
true;
2653 soap_client_call_common(
2686 smart_str_free(&
buf);
2710 type_to_string(
type, &
buf, 0);
2712 smart_str_free(&
buf);
2772 char *location, *action;
2773 size_t location_size, action_size;
2780 &location, &location_size,
2781 &action, &action_size,
2782 &version, &one_way) ==
FAILURE) {
2850 if (!verify_soap_headers_array(
Z_ARRVAL_P(headers))) {
2856 instanceof_function(
Z_OBJCE_P(headers), soap_header_class_entry)) {
2857 zval default_headers;
2860 add_next_index_zval(&default_headers, headers);
2888 if (location &&
ZSTR_LEN(location) != 0) {
2896static void clear_soap_fault(
zval *obj)
2903static void add_soap_fault_ex(
zval *fault,
zval *obj,
char *fault_code,
char *fault_string,
char *fault_actor,
zval *fault_detail)
2906 set_soap_fault(fault,
NULL, fault_code, fault_string, fault_actor, fault_detail,
NULL);
2910 }
else if (instanceof_function(
Z_OBJCE_P(obj), soap_server_class_entry)) {
2923 add_soap_fault_ex(&fault, obj, fault_code, fault_string, fault_actor, fault_detail);
2927static void set_soap_fault(
zval *obj,
const char *fault_code_ns,
const char *fault_code,
const char *fault_string,
const char *fault_actor,
zval *fault_detail,
zend_string *
name)
2936 if (fault_code !=
NULL) {
2939 if (fault_code_ns) {
2945 if (
strcmp(fault_code,
"Client") == 0 ||
2946 strcmp(fault_code,
"Server") == 0 ||
2947 strcmp(fault_code,
"VersionMismatch") == 0 ||
2948 strcmp(fault_code,
"MustUnderstand") == 0) {
2952 if (
strcmp(fault_code,
"Client") == 0) {
2955 }
else if (
strcmp(fault_code,
"Server") == 0) {
2958 }
else if (
strcmp(fault_code,
"VersionMismatch") == 0 ||
2959 strcmp(fault_code,
"MustUnderstand") == 0 ||
2960 strcmp(fault_code,
"DataEncodingUnknown") == 0) {
2969 if (fault_actor !=
NULL) {
2983 uint32_t cur_param = 0,num_of_params = 0;
2994 num_of_params = zend_hash_num_elements(
function->requestParameters);
3012 *parameters = tmp_parameters;
3013 *num_params = num_of_params;
3022 while (trav !=
NULL) {
3029 if (num_of_params == 1 &&
3035 zend_hash_num_elements(
function->requestParameters) == 0) &&
3038 }
else if (num_of_params > 0) {
3042 while (trav != 0 && cur_param < num_of_params) {
3047 (param = zend_hash_index_find_ptr(
function->requestParameters, cur_param)) ==
NULL) {
3048 soap_server_fault(
"Client",
"Error cannot find parameter",
NULL,
NULL,
NULL);
3050 if (param ==
NULL) {
3062 if (num_of_params > cur_param) {
3063 soap_server_fault(
"Client",
"Missing parameter",
NULL,
NULL,
NULL);
3065 (*parameters) = tmp_parameters;
3066 (*num_params) = num_of_params;
3074 size_t xml_func_name_length =
strlen((
char*)
func->name);
3075 function = get_function(
sdl, (
char*)
func->name, xml_func_name_length);
3081 zend_hash_num_elements(
function->requestParameters) > 0)) {
3100static xmlNodePtr get_envelope(xmlNodePtr trav,
int *version,
char **envelope_ns) {
3101 while (trav !=
NULL) {
3117 soap_server_fault(
"VersionMismatch",
"Wrong Version",
NULL,
NULL,
NULL);
3127 char* envelope_ns =
NULL;
3135 env = get_envelope(request->children, version, &envelope_ns);
3137 soap_server_fault(
"Client",
"looks like we got XML without \"Envelope\" element",
NULL,
NULL,
NULL);
3140 attr = env->properties;
3143 soap_server_fault(
"Client",
"A SOAP Envelope element cannot have non Namespace qualified attributes",
NULL,
NULL,
NULL);
3146 soap_server_fault(
"Client",
"encodingStyle cannot be specified on the Envelope",
NULL,
NULL,
NULL);
3148 soap_server_fault(
"Client",
"Unknown data encoding style",
NULL,
NULL,
NULL);
3156 trav = env->children;
3178 soap_server_fault(
"Client",
"Body must be present in a SOAP envelope",
NULL,
NULL,
NULL);
3184 soap_server_fault(
"Client",
"A SOAP Body element cannot have non Namespace qualified attributes",
NULL,
NULL,
NULL);
3188 soap_server_fault(
"Client",
"encodingStyle cannot be specified on the Body",
NULL,
NULL,
NULL);
3190 soap_server_fault(
"Client",
"Unknown data encoding style",
NULL,
NULL,
NULL);
3197 soap_server_fault(
"Client",
"A SOAP 1.2 envelope can contain only Header and Body",
NULL,
NULL,
NULL);
3201 trav =
body->children;
3202 while (trav !=
NULL) {
3219 soap_server_fault(
"Client",
"looks like we got \"Body\" without function call",
NULL,
NULL,
NULL);
3225 soap_server_fault(
"Client",
"Unknown Data Encoding Style",
NULL,
NULL,
NULL);
3230 soap_server_fault(
"DataEncodingUnknown",
"Unknown Data Encoding Style",
NULL,
NULL,
NULL);
3236 soap_server_fault(
"rpc:ProcedureNotPresent",
"Procedure not present",
NULL,
NULL,
NULL);
3250 soap_server_fault(
"Client",
"A SOAP Header element cannot have non Namespace qualified attributes",
NULL,
NULL,
NULL);
3253 soap_server_fault(
"Client",
"encodingStyle cannot be specified on the Header",
NULL,
NULL,
NULL);
3255 soap_server_fault(
"Client",
"Unknown data encoding style",
NULL,
NULL,
NULL);
3260 trav =
head->children;
3261 while (trav !=
NULL) {
3263 xmlNodePtr hdr_func = trav;
3264 int mustUnderstand = 0;
3269 soap_server_fault(
"Client",
"Unknown Data Encoding Style",
NULL,
NULL,
NULL);
3274 (actor ==
NULL ||
strcmp((
char*)
attr->children->content,actor) != 0)) {
3281 soap_server_fault(
"DataEncodingUnknown",
"Unknown Data Encoding Style",
NULL,
NULL,
NULL);
3287 (actor ==
NULL ||
strcmp((
char*)
attr->children->content,actor) != 0)) {
3294 if (
strcmp((
char*)
attr->children->content,
"1") == 0 ||
3295 strcmp((
char*)
attr->children->content,
"true") == 0) {
3297 }
else if (
strcmp((
char*)
attr->children->content,
"0") == 0 ||
3298 strcmp((
char*)
attr->children->content,
"false") == 0) {
3301 soap_server_fault(
"Client",
"mustUnderstand value is not boolean",
NULL,
NULL,
NULL);
3311 if (fnb->input.headers) {
3315 smart_str_appends(&
key, (
char*)hdr_func->ns->href);
3316 smart_str_appendc(&
key,
':');
3320 if ((hdr = zend_hash_find_ptr(fnb->input.headers,
key.s)) !=
NULL) {
3323 smart_str_free(&
key);
3334 hdr_func = hdr_func->children;
3360 deserialize_parameters(
func,
function, num_params, parameters);
3368static void set_soap_header_attributes(xmlNodePtr h,
zval *
header,
int version)
3405 xmlNodePtr method =
NULL, param;
3407 uint32_t param_count;
3415 use = fnb->output.use;
3420 }
else if (
function->responseParameters) {
3429 method = xmlNewChild(
body, ns, BAD_CAST(function_name),
NULL);
3434 if (
function->responseParameters) {
3435 param_count = zend_hash_num_elements(
function->responseParameters);
3443 if (param_count == 1) {
3447 xmlNode *rpc_result;
3450 rpc_result = xmlNewChild(method, rpc_ns, BAD_CAST(
"result"),
NULL);
3451 param = serialize_parameter(parameter,
ret, 0,
"return", use, method);
3452 xmlNodeSetContent(rpc_result,param->name);
3454 param = serialize_parameter(parameter,
ret, 0,
"return", use, method);
3457 param = serialize_parameter(parameter,
ret, 0,
"return", use,
body);
3459 if (parameter && parameter->
element) {
3461 xmlNodeSetName(param, BAD_CAST(parameter->
element->
name));
3462 xmlSetNs(param, ns);
3464 }
else if (
strcmp((
char*)param->name,
"return") == 0) {
3466 xmlNodeSetName(param, BAD_CAST(function_name));
3467 xmlSetNs(param, ns);
3479 param = serialize_parameter(parameter,
data, i, param_name ?
ZSTR_VAL(param_name) :
NULL, use, method);
3481 param = serialize_parameter(parameter,
data, i, param_name ?
ZSTR_VAL(param_name) :
NULL, use,
body);
3483 if (parameter && parameter->
element) {
3485 xmlNodeSetName(param, BAD_CAST(parameter->
element->
name));
3486 xmlSetNs(param, ns);
3508 xmlNodePtr envelope =
NULL,
body, param;
3515 doc = xmlNewDoc(BAD_CAST(
"1.0"));
3518 doc->charset = XML_CHAR_ENCODING_UTF8;
3519 doc->encoding = xmlCharStrdup(
"UTF-8");
3522 envelope = xmlNewDocNode(doc,
NULL, BAD_CAST(
"Envelope"),
NULL);
3524 xmlSetNs(envelope,ns);
3526 envelope = xmlNewDocNode(doc,
NULL, BAD_CAST(
"Envelope"),
NULL);
3528 xmlSetNs(envelope,ns);
3530 soap_server_fault(
"Server",
"Unknown SOAP version",
NULL,
NULL,
NULL);
3532 xmlDocSetRootElement(doc, envelope);
3535 instanceof_function(
Z_OBJCE_P(
ret), soap_fault_class_entry)) {
3538 char *fault_ns =
NULL;
3543 zval *hdr_ret = tmp;
3547 head = xmlNewChild(envelope, ns, BAD_CAST(
"Header"),
NULL);
3549 instanceof_function(
Z_OBJCE_P(hdr_ret), soap_header_class_entry)) {
3556 smart_str_appendc(&
key,
':');
3571 smart_str_free(&
key);
3587 xmlNodeSetName(xmlHdr, BAD_CAST(hdr_name));
3591 xmlSetNs(xmlHdr, nsptr);
3596 body = xmlNewChild(envelope, ns, BAD_CAST(
"Body"),
NULL);
3597 param = xmlNewChild(
body, ns, BAD_CAST(
"Fault"),
NULL);
3613 fault->bindingAttributes) {
3616 if (fault_ns ==
NULL) {
3622 zend_hash_num_elements(
function->faults) == 1) {
3624 zend_hash_internal_pointer_reset(
function->faults);
3628 fault->bindingAttributes) {
3631 if (fault_ns ==
NULL) {
3637 if (fault_ns ==
NULL &&
3640 zend_hash_num_elements(fault->details) == 1) {
3643 zend_hash_internal_pointer_reset(fault->details);
3653 xmlNodePtr node = xmlNewNode(
NULL, BAD_CAST(
"faultcode"));
3655 xmlAddChild(param, node);
3658 xmlChar *code = xmlBuildQName(BAD_CAST(
ZSTR_VAL(str)), nsptr->prefix,
NULL, 0);
3659 xmlNodeSetContent(node, code);
3669 xmlNodeSetName(node, BAD_CAST(
"faultstring"));
3674 xmlNodeSetName(node, BAD_CAST(
"faultactor"));
3676 detail_name =
"detail";
3680 xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST(
"Code"),
NULL);
3682 node = xmlNewChild(node, ns, BAD_CAST(
"Value"),
NULL);
3685 xmlChar *code = xmlBuildQName(BAD_CAST(
ZSTR_VAL(str)), nsptr->prefix,
NULL, 0);
3686 xmlNodeSetContent(node, code);
3695 xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST(
"Reason"),
NULL);
3697 xmlNodeSetName(node, BAD_CAST(
"Text"));
3702 if (fault && fault->details && zend_hash_num_elements(fault->details) == 1) {
3712 node = xmlNewNode(
NULL, BAD_CAST(detail_name));
3713 xmlAddChild(param, node);
3715 zend_hash_internal_pointer_reset(fault->details);
3721 zend_hash_num_elements(
Z_OBJPROP_P(detail)) == 1 &&
3726 x = serialize_parameter(sparam, detail, 1,
NULL, use, node);
3734 if (fault->bindingAttributes) {
3744 xmlNodeSetName(x, BAD_CAST(sparam->
element->
name));
3755 serialize_zval(tmp,
NULL, detail_name, use, param);
3763 head = xmlNewChild(envelope, ns, BAD_CAST(
"Header"),
NULL);
3774 instanceof_function(
Z_OBJCE(h->
retval), soap_header_class_entry);
3776 if (is_header_object) {
3784 smart_str_appendc(&
key,
':');
3796 if (fnb->output.headers &&
3797 (hdr = zend_hash_find_ptr(fnb->output.headers,
key.s)) !=
NULL) {
3802 smart_str_free(&
key);
3812 xmlNodePtr xmlHdr =
NULL;
3817 if (is_header_object) {
3818 set_soap_header_attributes(xmlHdr, &h->
retval, version);
3823 xmlNodeSetName(xmlHdr, BAD_CAST(hdr_name));
3827 xmlSetNs(xmlHdr, nsptr);
3829 if (is_header_object) {
3830 set_soap_header_attributes(xmlHdr, &h->
retval, version);
3838 xmlUnlinkNode(
head);
3843 body = xmlNewChild(envelope, ns, BAD_CAST(
"Body"),
NULL);
3878static xmlDocPtr serialize_function_call(
zval *this_ptr,
sdlFunctionPtr function,
const char *function_name,
const char *uri,
zval *arguments, uint32_t arg_count,
int version,
HashTable *soap_headers)
3883 zval *zstyle, *zuse;
3890 doc = xmlNewDoc(BAD_CAST(
"1.0"));
3893 doc->encoding = xmlCharStrdup(
"UTF-8");
3894 doc->charset = XML_CHAR_ENCODING_UTF8;
3896 envelope = xmlNewDocNode(doc,
NULL, BAD_CAST(
"Envelope"),
NULL);
3898 xmlSetNs(envelope, ns);
3900 envelope = xmlNewDocNode(doc,
NULL, BAD_CAST(
"Envelope"),
NULL);
3902 xmlSetNs(envelope, ns);
3906 xmlDocSetRootElement(doc, envelope);
3909 head = xmlNewChild(envelope, ns, BAD_CAST(
"Header"),
NULL);
3912 body = xmlNewChild(envelope, ns, BAD_CAST(
"Body"),
NULL);
3917 hdrs = fnb->input.headers;
3921 use = fnb->input.use;
3941 if (function_name) {
3942 method = xmlNewChild(
body, ns, BAD_CAST(function_name),
NULL);
3962 for (i = 0;i < arg_count;i++) {
3967 param = serialize_parameter(parameter, &arguments[i], i,
NULL, use, method);
3969 param = serialize_parameter(parameter, &arguments[i], i,
NULL, use,
body);
3971 if (parameter && parameter->
element) {
3973 xmlNodeSetName(param, BAD_CAST(parameter->
element->
name));
3974 xmlSetNs(param, ns);
3981 uint32_t
n = zend_hash_num_elements(
function->requestParameters);
3983 if (
n > arg_count) {
3984 for (i = arg_count; i <
n; i++) {
3989 param = serialize_parameter(parameter,
NULL, i,
NULL, use, method);
3991 param = serialize_parameter(parameter,
NULL, i,
NULL, use,
body);
3993 if (parameter && parameter->
element) {
3995 xmlNodeSetName(param, BAD_CAST(parameter->
element->
name));
3996 xmlSetNs(param, ns);
4009 || !instanceof_function(
Z_OBJCE_P(
header), soap_header_class_entry)) {
4026 smart_str_appendc(&
key,
':');
4029 if ((hdr = zend_hash_find_ptr(hdrs,
key.s)) !=
NULL) {
4036 smart_str_free(&
key);
4045 xmlAddChild(
head, h);
4049 set_soap_header_attributes(h,
header, version);
4079static xmlNodePtr serialize_parameter(
sdlParamPtr param,
zval *param_val, uint32_t index,
const char *
name,
int style, xmlNodePtr parent)
4081 const char *paramName;
4082 xmlNodePtr xmlParam;
4083 char paramNameBuf[10];
4086 &&
Z_OBJCE_P(param_val) == soap_param_class_entry) {
4090 param_val = param_data;
4099 snprintf(paramNameBuf,
sizeof(paramNameBuf),
"param%d",index);
4100 paramName = paramNameBuf;
4106 xmlParam = serialize_zval(param_val, param, paramName, style, parent);
4112static xmlNodePtr serialize_zval(
zval *
val,
sdlParamPtr param,
const char *paramName,
int style, xmlNodePtr parent)
4114 xmlNodePtr xmlParam;
4119 if (param !=
NULL) {
4137 if (!
strcmp((
char*)xmlParam->name,
"BOGUS")) {
4138 xmlNodeSetName(xmlParam, BAD_CAST(paramName));
4153 if (response ==
FALSE) {
4163 if (param_name !=
NULL) {
4164 if ((tmp = zend_hash_str_find_ptr(
ht, param_name,
strlen(param_name))) !=
NULL) {
4174 if ((tmp = zend_hash_index_find_ptr(
ht, index)) !=
NULL) {
4207 if (params ==
NULL) {
4215 xmlNodePtr node = params;
4228 }
else if ((
void*)param->
element->
namens != (
void*)node->ns) {
4255 if (
function->responseParameters &&
4256 zend_hash_num_elements(
function->responseParameters) > 0) {
4257 if (zend_hash_num_elements(
function->responseParameters) == 1) {
4258 zend_hash_internal_pointer_reset(
function->responseParameters);
4262 smart_str_appendc(
buf,
' ');
4264 smart_str_appendl(
buf,
"UNKNOWN ", 8);
4268 smart_str_appendl(
buf,
"list(", 5);
4271 smart_str_appendl(
buf,
", ", 2);
4276 smart_str_appendl(
buf,
"UNKNOWN", 7);
4278 smart_str_appendl(
buf,
" $", 2);
4282 smart_str_appendl(
buf,
") ", 2);
4285 smart_str_appendl(
buf,
"void ", 5);
4290 smart_str_appendc(
buf,
'(');
4295 smart_str_appendl(
buf,
", ", 2);
4300 smart_str_appendl(
buf,
"UNKNOWN", 7);
4302 smart_str_appendl(
buf,
" $", 2);
4307 smart_str_appendc(
buf,
')');
4316 switch (model->
kind) {
4319 smart_str_appendl(
buf,
";\n", 2);
4322 for (i = 0;i < level;i++) {
4323 smart_str_appendc(
buf,
' ');
4325 smart_str_appendl(
buf,
"<anyXML> any;\n",
sizeof(
"<anyXML> any;\n")-1);
4333 model_to_string(tmp,
buf, level);
4350 for (i = 0;i < level;i++) {
4351 smart_str_appendc(&spaces,
' ');
4356 switch (
type->kind) {
4359 smart_str_appendl(
buf,
type->encode->details.type_str,
strlen(
type->encode->details.type_str));
4360 smart_str_appendc(
buf,
' ');
4362 smart_str_appendl(
buf,
"anyType ",
sizeof(
"anyType ")-1);
4367 smart_str_appendl(
buf,
"list ", 5);
4369 if (
type->elements) {
4372 smart_str_appendl(
buf,
" {", 2);
4376 smart_str_appendc(
buf,
'}');
4380 smart_str_appendl(
buf,
"union ", 6);
4382 if (
type->elements) {
4386 smart_str_appendl(
buf,
" {", 2);
4389 smart_str_appendc(
buf,
',');
4394 smart_str_appendc(
buf,
'}');
4406 if (
type->attributes &&
4409 attr->extraAttributes &&
4419 smart_str_appendl(
buf,
"anyType",
sizeof(
"anyType")-1);
4423 smart_str_appendc(
buf,
' ');
4426 smart_str_appends(
buf,
end);
4430 if (
type->attributes &&
4433 attr->extraAttributes &&
4435 smart_str_appends(
buf,
ext->val);
4436 smart_str_appendc(
buf,
' ');
4437 }
else if (
type->elements &&
4438 zend_hash_num_elements(
type->elements) == 1 &&
4439 (zend_hash_internal_pointer_reset(
type->elements),
4443 smart_str_appendc(
buf,
' ');
4445 smart_str_appendl(
buf,
"anyType ", 8);
4448 if (
type->attributes &&
4451 attr->extraAttributes &&
4453 smart_str_appendc(
buf,
'[');
4454 smart_str_appends(
buf,
ext->val);
4455 smart_str_appendc(
buf,
']');
4457 smart_str_appendl(
buf,
"[]", 2);
4461 smart_str_appendl(
buf,
"struct ", 7);
4463 smart_str_appendc(
buf,
' ');
4464 smart_str_appendl(
buf,
"{\n", 2);
4479 smart_str_appendc(
buf,
' ');
4480 smart_str_appendl(
buf,
type->encode->details.type_str,
strlen(
type->encode->details.type_str));
4481 smart_str_appendl(
buf,
" _;\n", 4);
4485 model_to_string(
type->model,
buf, level+1);
4487 if (
type->attributes) {
4494 smart_str_appendc(
buf,
' ');
4495 if (
attr->encode &&
attr->encode->details.type_str) {
4496 smart_str_appends(
buf,
attr->encode->details.type_str);
4497 smart_str_appendc(
buf,
' ');
4499 smart_str_appendl(
buf,
"UNKNOWN ", 8);
4501 smart_str_appends(
buf,
attr->name);
4502 smart_str_appendl(
buf,
";\n", 2);
4508 smart_str_appendc(
buf,
'}');
4514 smart_str_free(&spaces);
4519static void delete_argv(
struct _soap_class *
class)
4522 for (uint32_t i = 0; i <
class->argc; i++) {
4543 if (service->
actor) {
4553 xmlCharEncCloseFunc(service->
encoding);
#define sapi_add_header(a, b, c)
file_private const char ext[]
readfile(string $filename, bool $use_include_path=false, $context=null)
file(string $filename, int $flags=0, $context=null)
header(string $header, bool $replace=true, int $response_code=0)
strchr(string $haystack, string $needle, bool $before_needle=false)
memset(ptr, 0, type->size)
zend_ffi_ctype_name_buf buf
PHPAPI int php_check_open_basedir(const char *path)
int main(int argc, char **argv)
PHPAPI zend_string * php_escape_html_entities(const unsigned char *old, size_t oldlen, int all, int flags, const char *hint_charset)
PHPAPI php_stream_filter * php_stream_filter_create(const char *filtername, zval *filterparams, uint8_t persistent)
PHPAPI php_stream_filter * php_stream_filter_remove(php_stream_filter *filter, int call_dtor)
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format,...)
PHPAPI size_t php_write(void *buf, size_t size)
PHPAPI zend_result php_output_get_length(zval *p)
PHPAPI zend_result php_output_discard(void)
PHPAPI zend_result php_output_start_default(void)
PHPAPI zend_result php_output_get_contents(zval *p)
php_info_print_table_start()
php_info_print_table_row(2, "PDO Driver for Firebird", "enabled")
php_info_print_table_end()
#define PHP_MSHUTDOWN_FUNCTION
#define PHP_MINIT_FUNCTION
#define PHP_MINFO_FUNCTION
#define PHP_RINIT_FUNCTION
encodePtr get_conversion(int encode)
void delete_encoder(zval *zv)
xmlNodePtr to_xml_user(encodeTypePtr type, zval *data, int style, xmlNodePtr parent)
zval * to_zval_user(zval *ret, encodeTypePtr type, xmlNodePtr node)
xmlNsPtr encode_add_ns(xmlNodePtr node, const char *ns)
xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr parent)
zval * master_to_zval(zval *ret, encodePtr encode, xmlNodePtr data)
void encode_reset_ns(void)
#define Z_VAR_ENC_NS_P(zv)
#define SOAP_1_1_ENV_NS_PREFIX
#define Z_VAR_ENC_NAMENS_P(zv)
#define RPC_SOAP12_NS_PREFIX
#define Z_VAR_ENC_VALUE_P(zv)
#define RPC_SOAP12_NAMESPACE
#define Z_VAR_ENC_STYPE_P(zv)
#define Z_VAR_ENC_NAME_P(zv)
#define SOAP_1_1_ENC_NS_PREFIX
#define SOAP_1_2_ENC_NS_PREFIX
#define SOAP_1_2_ENV_NS_PREFIX
#define SOAP_1_1_ENC_NAMESPACE
#define SOAP_1_1_ENV_NAMESPACE
#define Z_VAR_ENC_TYPE_P(zv)
#define XSD_1999_NAMESPACE
#define SOAP_1_2_ENV_NAMESPACE
#define SOAP_1_2_ENC_NAMESPACE
unsigned const char * end
#define TRACK_VARS_SERVER
int make_http_soap_request(zval *this_ptr, zend_string *buf, char *location, char *soapaction, int soap_version, zval *return_value)
#define PHP_INI_STAGE_RUNTIME
#define STD_PHP_INI_ENTRY
#define STD_PHP_INI_BOOLEAN
#define PHP_INI_STAGE_HTACCESS
PHP_JSON_API size_t int options
php_json_error_code error_code
bool parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunctionPtr fn, char *fn_name, zval *return_value, zval *soap_headers)
struct php_pcntl_pending_signal * head
unsigned char key[REFLECTION_KEY_LEN]
encodePtr get_encoder_ex(sdlPtr sdl, const char *nscat, size_t len)
void delete_sdl(sdl *handle)
encodePtr get_encoder(sdlPtr sdl, const char *ns, const char *type)
sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl)
struct _sdlContentModel * sdlContentModelPtr
struct _sdlFault * sdlFaultPtr
@ XSD_TYPEKIND_RESTRICTION
struct _sdlSoapBindingFunctionHeader * sdlSoapBindingFunctionHeaderPtr
struct _sdlSoapBindingFunctionFault * sdlSoapBindingFunctionFaultPtr
struct _sdlExtraAttribute * sdlExtraAttributePtr
PHPAPI zval * php_set_session_var(zend_string *name, zval *state_val, php_unserialize_data_t *var_hash)
PHPAPI php_session_status php_get_session_status(void)
PHPAPI zend_result php_session_start(void)
PHPAPI zval * php_get_session_var_str(const char *name, size_t name_len)
#define SOAP_1_2_ACTOR_UNLIMATERECEIVER
zend_class_entry * soap_sdl_class_entry
#define SOAP_WAIT_ONE_WAY_CALLS
zend_module_entry soap_module_entry
#define SOAP_ACTOR_UNLIMATERECEIVER
#define Z_CLIENT_PROXY_PORT_P(zv)
#define Z_CLIENT_LOGIN_P(zv)
zend_class_entry * soap_url_class_entry
#define Z_CLIENT_USER_AGENT_P(zv)
#define Z_CLIENT_LAST_REQUEST_HEADERS_P(zv)
#define Z_CLIENT_CONNECTION_TIMEOUT_P(zv)
struct _encode * encodePtr
#define Z_CLIENT_ENCODING_P(zv)
#define Z_CLIENT_PROXY_LOGIN_P(zv)
#define SOAP_PERSISTENCE_SESSION
#define Z_CLIENT_SOAP_VERSION_P(zv)
struct _soapMapping soapMapping
#define Z_CLIENT_TRACE_P(zv)
#define Z_CLIENT_USE_P(zv)
struct _soapService * soapServicePtr
#define Z_CLIENT_COMPRESSION_P(zv)
#define Z_CLIENT_KEEP_ALIVE_P(zv)
zend_class_entry * soap_var_class_entry
#define Z_CLIENT_TYPEMAP_P(zv)
#define SOAP_1_1_ACTOR_NEXT
#define Z_CLIENT_LAST_RESPONSE_HEADERS_P(zv)
struct _sdlFunction * sdlFunctionPtr
#define Z_CLIENT_URI_P(zv)
#define Z_CLIENT_LAST_REQUEST_P(zv)
xmlCharEncodingHandlerPtr encoding
#define Z_CLIENT_USE_DIGEST_P(zv)
#define Z_CLIENT_PROXY_PASSWORD_P(zv)
#define Z_CLIENT_FEATURES_P(zv)
zend_class_entry * soap_class_entry
struct _sdlBinding * sdlBindingPtr
#define Z_CLIENT_SSL_METHOD_P(zv)
struct _sdlSoapBindingFunction * sdlSoapBindingFunctionPtr
#define Z_CLIENT_SDL_P(zv)
#define Z_CLIENT_STYLE_P(zv)
struct _sdlType * sdlTypePtr
#define Z_CLIENT_DEFAULT_HEADERS_P(zv)
#define Z_CLIENT_EXCEPTIONS_P(zv)
#define Z_CLIENT_LOCATION_P(zv)
struct _soapService soapService
#define SOAP_AUTHENTICATION_DIGEST
#define Z_CLIENT_PASSWORD_P(zv)
#define Z_CLIENT_PROXY_HOST_P(zv)
#define Z_CLIENT_CLASSMAP_P(zv)
bool use_soap_error_handler
#define Z_CLIENT_STREAM_CONTEXT_P(zv)
#define soap_error0(severity, format)
#define SOAP_FUNCTIONS_ALL
struct _sdlAttribute * sdlAttributePtr
struct _sdlParam * sdlParamPtr
#define Z_CLIENT_SOAP_FAULT_P(zv)
#define SOAP_1_2_ACTOR_NEXT
#define Z_CLIENT_COOKIES_P(zv)
#define Z_CLIENT_LAST_RESPONSE_P(zv)
#define SOAP_PERSISTENCE_REQUEST
#define SOAP_1_2_ACTOR_NONE
#define php_stream_context_from_zval(zcontext, nocontext)
PHPAPI php_stream_context * php_stream_context_alloc(void)
PHPAPI void php_stream_context_set_option(php_stream_context *context, const char *wrappername, const char *optionname, zval *optionvalue)
#define php_stream_filter_append(chain, filter)
struct _php_stream_context php_stream_context
struct _php_stream_filter php_stream_filter
#define php_stream_rewind(stream)
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
xmlDocPtr soap_xmlParseFile(const char *filename)
xmlAttrPtr get_attribute_ex(xmlAttrPtr node, char *name, char *ns)
#define get_node(node, name)
#define Z_SERVER_SOAP_FAULT_P(zv)
#define Z_FAULT_CODE_P(zv)
#define Z_FAULT_HEADERFAULT_P(zv)
#define Z_FAULT_DETAIL_P(zv)
#define Z_HEADER_MUST_UNDERSTAND_P(zv)
#define FETCH_THIS_SDL(ss)
#define Z_PARAM_DATA_P(zv)
#define FETCH_THIS_SERVICE_NO_BAILOUT(ss)
void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail)
#define FETCH_THIS_SERVICE(ss)
#define Z_FAULT_CODENS_P(zv)
#define Z_PARAM_NAME_P(zv)
#define SOAP_CLIENT_BEGIN_CODE()
struct _soapHeader soapHeader
#define SOAP_CLIENT_END_CODE()
#define Z_FAULT_ACTOR_P(zv)
#define SOAP_SERVER_END_CODE()
#define Z_HEADER_NAME_P(zv)
#define Z_HEADER_ACTOR_P(zv)
#define SOAP_SERVER_BEGIN_CODE()
#define Z_HEADER_DATA_P(zv)
#define Z_FAULT_STRING_P(zv)
#define Z_FAULT_NAME_P(zv)
#define Z_HEADER_NAMESPACE_P(zv)
is_soap_fault(mixed $object)
zend_string * clark_notation
xmlNodePtr(* to_xml)(encodeTypePtr type, zval *data, int style, xmlNodePtr parent)
zval *(* to_zval)(zval *ret, encodeTypePtr type, xmlNodePtr data)
sdlBindingType bindingType
union _sdlContentModel::@136103057302222375117000326337202052042061025370 u
HashTable * responseParameters
struct _sdlBinding * binding
HashTable * requestParameters
struct _soapService::_soap_functions soap_functions
struct _soapHeader ** soap_headers_ptr
xmlCharEncodingHandlerPtr encoding
zend_string * last_response_body
struct _soapService::_soap_class soap_class
zend_function * constructor
zend_string * function_name
struct _zend_function::@236135173067030250234125302313220025134003177336 common
PHPAPI void php_url_free(php_url *theurl)
ZEND_API void(* zend_error_cb)(int type, zend_string *error_filename, const uint32_t error_lineno, zend_string *message)
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
ZEND_API ZEND_COLD void zend_type_error(const char *format,...)
#define ZEND_TSRMLS_CACHE_UPDATE()
#define ZEND_TSRMLS_CACHE_DEFINE()
ZEND_API zval * zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, bool silent, zval *rv)
ZEND_API const char * zend_zval_value_name(const zval *arg)
ZEND_API zend_result add_next_index_stringl(zval *arg, const char *str, size_t length)
ZEND_API HashTable module_registry
ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *class_type)
ZEND_API zval * zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, bool silent, zval *rv)
ZEND_API void add_index_str(zval *arg, zend_ulong index, zend_string *str)
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec,...)
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
ZEND_API ZEND_COLD void zend_argument_must_not_be_empty_error(uint32_t arg_num)
ZEND_API void add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n)
ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *format,...)
ZEND_API ZEND_COLD void zend_argument_type_error(uint32_t arg_num, const char *format,...)
ZEND_API void zend_update_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, zval *value)
ZEND_API zend_result add_next_index_str(zval *arg, zend_string *str)
#define Z_PARAM_ARRAY_HT_OR_STR_OR_NULL(dest_ht, dest_str)
#define ZEND_PARSE_PARAMETERS_END()
#define Z_PARAM_STR_OR_NULL(dest)
#define ZEND_PARSE_PARAMETERS_NONE()
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor)
#define ZVAL_STRING(z, s)
#define ZEND_DECLARE_MODULE_GLOBALS(module_name)
#define array_init_size(arg, size)
#define ZEND_GET_MODULE(name)
#define zend_parse_parameters_none()
#define Z_PARAM_STRING(dest, dest_len)
#define Z_PARAM_STR(dest)
#define Z_PARAM_STRING_OR_NULL(dest, dest_len)
#define Z_PARAM_STR_OR_LONG_OR_NULL(dest_str, dest_long, is_null)
#define ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args)
#define call_user_function(function_table, object, function_name, retval_ptr, param_count, params)
#define Z_PARAM_BOOL(dest)
#define RETURN_EMPTY_STRING()
#define Z_PARAM_ZVAL_OR_NULL(dest)
#define Z_PARAM_ZVAL(dest)
#define ZVAL_STRINGL(z, s, l)
#define RETVAL_COPY_VALUE(zv)
#define RETURN_STR_COPY(s)
#define ZVAL_EMPTY_STRING(z)
#define estrndup(s, length)
#define FREE_HASHTABLE(ht)
#define safe_emalloc(nmemb, size, offset)
strcmp(string $string1, string $string2)
zend_string_release_ex(func->internal_function.function_name, 0)
ZEND_API bool zend_is_auto_global(zend_string *name)
#define ZEND_CALL_FUNC_NAME
ZEND_API bool zend_is_unwind_exit(const zend_object *ex)
ZEND_API zend_class_entry * zend_ce_exception
ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception)
ZEND_API void zend_clear_exception(void)
ZEND_API zend_class_entry * zend_ce_error
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
union _zend_function zend_function
ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)
ZEND_API zval *ZEND_FASTCALL zend_hash_str_find(const HashTable *ht, const char *str, size_t len)
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData)
ZEND_API void * zend_hash_str_find_ptr_lc(const HashTable *ht, const char *str, size_t len)
ZEND_API void ZEND_FASTCALL zend_array_destroy(HashTable *ht)
ZEND_API HashTable *ZEND_FASTCALL zend_array_dup(HashTable *source)
ZEND_API zval *ZEND_FASTCALL zend_hash_update(HashTable *ht, zend_string *key, zval *pData)
ZEND_API void * zend_hash_find_ptr_lc(const HashTable *ht, zend_string *key)
ZEND_API zend_result ZEND_FASTCALL zend_hash_del(HashTable *ht, zend_string *key)
ZEND_API zval *ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key)
ZEND_API zval *ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h)
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
#define ZEND_HASH_MAP_FOREACH_VAL(ht, _val)
#define ZEND_HASH_MAP_FOREACH_PTR(ht, _ptr)
#define ZEND_HASH_FOREACH_PTR(ht, _ptr)
#define zend_new_array(size)
#define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val)
#define zend_hash_get_current_data_ptr(ht)
#define ZEND_HASH_FOREACH_END()
#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(ht, _key, _val)
#define ZEND_HASH_FOREACH_VAL(ht, _val)
#define UNREGISTER_INI_ENTRIES()
#define REGISTER_INI_ENTRIES()
#define DISPLAY_INI_ENTRIES()
#define ZEND_INI_MH(name)
#define ZEND_INI_GET_ADDR()
struct _zend_string zend_string
#define ZEND_MOD_OPTIONAL(name)
struct _zend_module_dep zend_module_dep
struct _zend_module_entry zend_module_entry
#define STANDARD_MODULE_PROPERTIES
#define ZEND_MOD_REQUIRED(name)
#define STANDARD_MODULE_HEADER_EX
ZEND_API zend_result zend_std_cast_object_tostring(zend_object *readobj, zval *writeobj, int type)
ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2)
ZEND_API const zend_object_handlers std_object_handlers
ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce)
ZEND_API void zend_object_std_dtor(zend_object *object)
ZEND_API void ZEND_FASTCALL convert_to_null(zval *op)
#define convert_to_string(op)
#define zend_never_inline
#define EXPECTED(condition)
#define XtOffsetOf(s_type, field)
#define ZEND_UNREACHABLE()
#define UNEXPECTED(condition)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define ZEND_SIZE_T_INT_OVFL(size)
#define ZSTR_INIT_LITERAL(s, persistent)
#define zend_string_equals_literal(str, literal)
#define Z_STRVAL_P(zval_p)
#define Z_ARRVAL_P(zval_p)
#define ZVAL_STR_COPY(z, s)
struct _zend_array HashTable
#define Z_STRLEN_P(zval_p)
#define Z_OBJCE_P(zval_p)
#define Z_OBJPROP_P(zval_p)
#define ZVAL_OBJ_COPY(z, o)
ZEND_RESULT_CODE zend_result
struct _zend_object_handlers zend_object_handlers
#define SEPARATE_ARRAY(zv)
struct _zend_execute_data zend_execute_data
#define ZVAL_COPY_VALUE(z, v)
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
fbc internal_function handler(call, ret)
function(EX_VAR(opline->result.var))