summaryrefslogtreecommitdiff
path: root/ext/soap/soap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/soap.c')
-rw-r--r--ext/soap/soap.c544
1 files changed, 271 insertions, 273 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index cf409cedf2..e2a9a84a15 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -49,21 +49,21 @@ typedef struct _soapHeader {
static void function_to_string(sdlFunctionPtr function, smart_str *buf);
static void type_to_string(sdlTypePtr type, smart_str *buf, int level);
-static void clear_soap_fault(zval *obj TSRMLS_DC);
-static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, char *name TSRMLS_DC);
-static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail TSRMLS_DC);
-static void soap_server_fault(char* code, char* string, char *actor, zval* details, char *name TSRMLS_DC);
-static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader* hdr TSRMLS_DC);
+static void clear_soap_fault(zval *obj);
+static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, char *name);
+static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail);
+static void soap_server_fault(char* code, char* string, char *actor, zval* details, char *name);
+static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader* hdr);
static sdlParamPtr get_param(sdlFunctionPtr function, char *param_name, int index, int);
static sdlFunctionPtr get_function(sdlPtr sdl, const char *function_name);
static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr node);
-static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, char* actor, zval *function_name, int *num_params, zval **parameters, int *version, soapHeader **headers TSRMLS_DC);
-static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function_name,char *uri,zval *ret, soapHeader *headers, int version TSRMLS_DC);
-static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function, char *function_name, char *uri, zval *arguments, int arg_count, int version, HashTable *soap_headers TSRMLS_DC);
-static xmlNodePtr serialize_parameter(sdlParamPtr param,zval *param_val,int index,char *name, int style, xmlNodePtr parent TSRMLS_DC);
-static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName, int style, xmlNodePtr parent TSRMLS_DC);
+static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, char* actor, zval *function_name, int *num_params, zval **parameters, int *version, soapHeader **headers);
+static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function_name,char *uri,zval *ret, soapHeader *headers, int version);
+static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function, char *function_name, char *uri, zval *arguments, int arg_count, int version, HashTable *soap_headers);
+static xmlNodePtr serialize_parameter(sdlParamPtr param,zval *param_val,int index,char *name, int style, xmlNodePtr parent);
+static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName, int style, xmlNodePtr parent);
static void delete_service(void *service);
static void delete_url(void *handle);
@@ -105,7 +105,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const
CG(in_compilation) = _old_in_compilation; \
EG(current_execute_data) = _old_current_execute_data; \
if (EG(exception) == NULL || \
- !instanceof_function(EG(exception)->ce, soap_fault_class_entry TSRMLS_CC)) {\
+ !instanceof_function(EG(exception)->ce, soap_fault_class_entry)) {\
_bailout = 1;\
}\
if (_old_stack_top != EG(vm_stack_top)) { \
@@ -139,18 +139,18 @@ static void soap_error_handler(int error_num, const char *error_filename, const
}
#define FIND_SDL_PROPERTY(ss,tmp) (tmp = zend_hash_str_find(Z_OBJPROP_P(ss), "sdl", sizeof("sdl")-1))
-#define FETCH_SDL_RES(ss,tmp) ss = (sdlPtr) zend_fetch_resource(tmp TSRMLS_CC, -1, "sdl", NULL, 1, le_sdl)
+#define FETCH_SDL_RES(ss,tmp) ss = (sdlPtr) zend_fetch_resource(tmp, -1, "sdl", NULL, 1, le_sdl)
#define FIND_TYPEMAP_PROPERTY(ss,tmp) (tmp = zend_hash_str_find(Z_OBJPROP_P(ss), "typemap", sizeof("typemap")-1))
-#define FETCH_TYPEMAP_RES(ss,tmp) ss = (HashTable*) zend_fetch_resource(tmp TSRMLS_CC, -1, "typemap", NULL, 1, le_typemap)
+#define FETCH_TYPEMAP_RES(ss,tmp) ss = (HashTable*) zend_fetch_resource(tmp, -1, "typemap", NULL, 1, le_typemap)
#define FETCH_THIS_SERVICE(ss) \
{ \
zval *tmp; \
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()),"service", sizeof("service")-1)) != NULL) { \
- ss = (soapServicePtr)zend_fetch_resource(tmp TSRMLS_CC, -1, "service", NULL, 1, le_service); \
+ ss = (soapServicePtr)zend_fetch_resource(tmp, -1, "service", NULL, 1, le_service); \
} else { \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not fetch service object"); \
+ php_error_docref(NULL, E_WARNING, "Can not fetch service object"); \
SOAP_SERVER_END_CODE(); \
return; \
} \
@@ -509,12 +509,12 @@ static PHP_INI_MH(OnUpdateCacheDir)
p = new_value->val;
}
- if (PG(open_basedir) && *p && php_check_open_basedir(p TSRMLS_CC)) {
+ if (PG(open_basedir) && *p && php_check_open_basedir(p)) {
return FAILURE;
}
}
- OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
+ OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
return SUCCESS;
}
@@ -574,7 +574,7 @@ static void php_soap_prepare_globals()
zend_hash_str_add_ptr(&defEncNs, SOAP_1_2_ENC_NAMESPACE, sizeof(SOAP_1_2_ENC_NAMESPACE)-1, SOAP_1_2_ENC_NS_PREFIX);
}
-static void php_soap_init_globals(zend_soap_globals *soap_globals TSRMLS_DC)
+static void php_soap_init_globals(zend_soap_globals *soap_globals)
{
soap_globals->defEnc = defEnc;
soap_globals->defEncIndex = defEncIndex;
@@ -621,22 +621,22 @@ PHP_RINIT_FUNCTION(soap)
return SUCCESS;
}
-static void delete_sdl_res(zend_resource *res TSRMLS_DC)
+static void delete_sdl_res(zend_resource *res)
{
delete_sdl(res->ptr);
}
-static void delete_url_res(zend_resource *res TSRMLS_DC)
+static void delete_url_res(zend_resource *res)
{
delete_url(res->ptr);
}
-static void delete_service_res(zend_resource *res TSRMLS_DC)
+static void delete_service_res(zend_resource *res)
{
delete_service(res->ptr);
}
-static void delete_hashtable_res(zend_resource *res TSRMLS_DC)
+static void delete_hashtable_res(zend_resource *res)
{
delete_hashtable(res->ptr);
}
@@ -668,26 +668,26 @@ PHP_MINIT_FUNCTION(soap)
INIT_OVERLOADED_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, soap_client_functions,
(zend_function *)&fe, NULL, NULL);
- soap_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
+ soap_class_entry = zend_register_internal_class(&ce);
}
/* Register SoapVar class */
INIT_CLASS_ENTRY(ce, PHP_SOAP_VAR_CLASSNAME, soap_var_functions);
- soap_var_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
+ soap_var_class_entry = zend_register_internal_class(&ce);
/* Register SoapServer class */
INIT_CLASS_ENTRY(ce, PHP_SOAP_SERVER_CLASSNAME, soap_server_functions);
- soap_server_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
+ soap_server_class_entry = zend_register_internal_class(&ce);
/* Register SoapFault class */
INIT_CLASS_ENTRY(ce, PHP_SOAP_FAULT_CLASSNAME, soap_fault_functions);
- soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
+ soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default());
/* Register SoapParam class */
INIT_CLASS_ENTRY(ce, PHP_SOAP_PARAM_CLASSNAME, soap_param_functions);
- soap_param_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
+ soap_param_class_entry = zend_register_internal_class(&ce);
INIT_CLASS_ENTRY(ce, PHP_SOAP_HEADER_CLASSNAME, soap_header_functions);
- soap_header_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
+ soap_header_class_entry = zend_register_internal_class(&ce);
le_sdl = zend_register_list_destructors_ex(delete_sdl_res, NULL, "SOAP SDL", module_number);
le_url = zend_register_list_destructors_ex(delete_url_res, NULL, "SOAP URL", module_number);
@@ -817,11 +817,11 @@ PHP_METHOD(SoapParam, SoapParam)
size_t name_length;
zval *this_ptr;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs", &data, &name, &name_length) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs", &data, &name, &name_length) == FAILURE) {
return;
}
if (name_length == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter name");
+ php_error_docref(NULL, E_WARNING, "Invalid parameter name");
return;
}
@@ -842,15 +842,15 @@ PHP_METHOD(SoapHeader, SoapHeader)
zend_bool must_understand = 0;
zval *this_ptr;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|zbz", &ns, &ns_len, &name, &name_len, &data, &must_understand, &actor) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|zbz", &ns, &ns_len, &name, &name_len, &data, &must_understand, &actor) == FAILURE) {
return;
}
if (ns_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid namespace");
+ php_error_docref(NULL, E_WARNING, "Invalid namespace");
return;
}
if (name_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid header name");
+ php_error_docref(NULL, E_WARNING, "Invalid header name");
return;
}
@@ -870,7 +870,7 @@ PHP_METHOD(SoapHeader, SoapHeader)
} else if (Z_TYPE_P(actor) == IS_STRING && Z_STRLEN_P(actor) > 0) {
add_property_stringl(this_ptr, "actor", Z_STRVAL_P(actor), Z_STRLEN_P(actor));
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid actor");
+ php_error_docref(NULL, E_WARNING, "Invalid actor");
}
}
@@ -882,7 +882,7 @@ PHP_METHOD(SoapFault, SoapFault)
size_t fault_string_len, fault_actor_len = 0, name_len = 0, fault_code_len = 0;
zval *code = NULL, *details = NULL, *headerfault = NULL, *this_ptr;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs|s!z!s!z",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs|s!z!s!z",
&code,
&fault_string, &fault_string_len,
&fault_actor, &fault_actor_len,
@@ -906,15 +906,15 @@ PHP_METHOD(SoapFault, SoapFault)
fault_code = Z_STRVAL_P(t_code);
fault_code_len = Z_STRLEN_P(t_code);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid fault code");
+ php_error_docref(NULL, E_WARNING, "Invalid fault code");
return;
}
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid fault code");
+ php_error_docref(NULL, E_WARNING, "Invalid fault code");
return;
}
if (fault_code != NULL && fault_code_len == 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid fault code");
+ php_error_docref(NULL, E_WARNING, "Invalid fault code");
return;
}
if (name != NULL && name_len == 0) {
@@ -922,7 +922,7 @@ PHP_METHOD(SoapFault, SoapFault)
}
this_ptr = getThis();
- set_soap_fault(this_ptr, fault_code_ns, fault_code, fault_string, fault_actor, details, name TSRMLS_CC);
+ set_soap_fault(this_ptr, fault_code_ns, fault_code, fault_string, fault_actor, details, name);
if (headerfault != NULL) {
add_property_zval(this_ptr, "headerfault", headerfault);
}
@@ -944,10 +944,10 @@ PHP_METHOD(SoapFault, __toString)
}
this_ptr = getThis();
- faultcode = zend_read_property(soap_fault_class_entry, this_ptr, "faultcode", sizeof("faultcode")-1, 1 TSRMLS_CC);
- faultstring = zend_read_property(soap_fault_class_entry, this_ptr, "faultstring", sizeof("faultstring")-1, 1 TSRMLS_CC);
- file = zend_read_property(soap_fault_class_entry, this_ptr, "file", sizeof("file")-1, 1 TSRMLS_CC);
- line = zend_read_property(soap_fault_class_entry, this_ptr, "line", sizeof("line")-1, 1 TSRMLS_CC);
+ faultcode = zend_read_property(soap_fault_class_entry, this_ptr, "faultcode", sizeof("faultcode")-1, 1);
+ faultstring = zend_read_property(soap_fault_class_entry, this_ptr, "faultstring", sizeof("faultstring")-1, 1);
+ file = zend_read_property(soap_fault_class_entry, this_ptr, "file", sizeof("file")-1, 1);
+ line = zend_read_property(soap_fault_class_entry, this_ptr, "line", sizeof("line")-1, 1);
fci.size = sizeof(fci);
fci.function_table = &Z_OBJCE_P(getThis())->function_table;
@@ -959,7 +959,7 @@ PHP_METHOD(SoapFault, __toString)
fci.params = NULL;
fci.no_separation = 1;
- zend_call_function(&fci, NULL TSRMLS_CC);
+ zend_call_function(&fci, NULL);
zval_ptr_dtor(&fci.function_name);
@@ -981,7 +981,7 @@ PHP_METHOD(SoapVar, SoapVar)
char *stype = NULL, *ns = NULL, *name = NULL, *namens = NULL;
size_t stype_len = 0, ns_len = 0, name_len = 0, namens_len = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z!z|ssss", &data, &type, &stype, &stype_len, &ns, &ns_len, &name, &name_len, &namens, &namens_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "z!z|ssss", &data, &type, &stype, &stype_len, &ns, &ns_len, &name, &name_len, &namens, &namens_len) == FAILURE) {
return;
}
@@ -992,7 +992,7 @@ PHP_METHOD(SoapVar, SoapVar)
if (zend_hash_index_exists(&SOAP_GLOBAL(defEncIndex), Z_LVAL_P(type))) {
add_property_long(this_ptr, "enc_type", Z_LVAL_P(type));
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid type ID");
+ php_error_docref(NULL, E_WARNING, "Invalid type ID");
return;
}
}
@@ -1016,7 +1016,7 @@ PHP_METHOD(SoapVar, SoapVar)
}
/* }}} */
-static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht TSRMLS_DC)
+static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht)
{
zval *tmp;
HashTable *ht2;
@@ -1031,7 +1031,7 @@ static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht TSRMLS_DC)
zend_string *name;
if (Z_TYPE_P(tmp) != IS_ARRAY) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong 'typemap' option");
+ php_error_docref(NULL, E_WARNING, "Wrong 'typemap' option");
return NULL;
}
ht2 = Z_ARRVAL_P(tmp);
@@ -1133,12 +1133,12 @@ PHP_METHOD(SoapServer, SoapServer)
SOAP_SERVER_BEGIN_CODE();
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z|a", &wsdl, &options) == FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) {
+ php_error_docref(NULL, E_ERROR, "Invalid parameters");
}
if (Z_TYPE_P(wsdl) != IS_STRING && Z_TYPE_P(wsdl) != IS_NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
+ php_error_docref(NULL, E_ERROR, "Invalid parameters");
}
service = emalloc(sizeof(soapService));
@@ -1156,7 +1156,7 @@ PHP_METHOD(SoapServer, SoapServer)
(Z_LVAL_P(tmp) == SOAP_1_1 || Z_LVAL_P(tmp) == SOAP_1_2)) {
version = Z_LVAL_P(tmp);
} else {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "'soap_version' option must be SOAP_1_1 or SOAP_1_2");
+ php_error_docref(NULL, E_ERROR, "'soap_version' option must be SOAP_1_1 or SOAP_1_2");
}
}
@@ -1164,7 +1164,7 @@ PHP_METHOD(SoapServer, SoapServer)
Z_TYPE_P(tmp) == IS_STRING) {
service->uri = estrndup(Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
} else if (Z_TYPE_P(wsdl) == IS_NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "'uri' option is required in nonWSDL mode");
+ php_error_docref(NULL, E_ERROR, "'uri' option is required in nonWSDL mode");
}
if ((tmp = zend_hash_str_find(ht, "actor", sizeof("actor")-1)) != NULL &&
@@ -1178,7 +1178,7 @@ PHP_METHOD(SoapServer, SoapServer)
encoding = xmlFindCharEncodingHandler(Z_STRVAL_P(tmp));
if (encoding == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid 'encoding' option - '%s'", Z_STRVAL_P(tmp));
+ php_error_docref(NULL, E_ERROR, "Invalid 'encoding' option - '%s'", Z_STRVAL_P(tmp));
} else {
service->encoding = encoding;
}
@@ -1217,7 +1217,7 @@ PHP_METHOD(SoapServer, SoapServer)
}
} else if (Z_TYPE_P(wsdl) == IS_NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "'uri' option is required in nonWSDL mode");
+ php_error_docref(NULL, E_ERROR, "'uri' option is required in nonWSDL mode");
}
service->version = version;
@@ -1227,7 +1227,7 @@ PHP_METHOD(SoapServer, SoapServer)
zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0);
if (Z_TYPE_P(wsdl) != IS_NULL) {
- service->sdl = get_sdl(getThis(), Z_STRVAL_P(wsdl), cache_wsdl TSRMLS_CC);
+ service->sdl = get_sdl(getThis(), Z_STRVAL_P(wsdl), cache_wsdl);
if (service->uri == NULL) {
if (service->sdl->target_ns) {
service->uri = estrdup(service->sdl->target_ns);
@@ -1239,10 +1239,10 @@ PHP_METHOD(SoapServer, SoapServer)
}
if (typemap_ht) {
- service->typemap = soap_create_typemap(service->sdl, typemap_ht TSRMLS_CC);
+ service->typemap = soap_create_typemap(service->sdl, typemap_ht);
}
- res = zend_register_resource(NULL, service, le_service TSRMLS_CC);
+ res = zend_register_resource(NULL, service, le_service);
add_property_resource(getThis(), "service", res);
SOAP_SERVER_END_CODE();
@@ -1261,17 +1261,17 @@ PHP_METHOD(SoapServer, setPersistence)
FETCH_THIS_SERVICE(service);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &value) != FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &value) != FAILURE) {
if (service->type == SOAP_CLASS) {
if (value == SOAP_PERSISTENCE_SESSION ||
value == SOAP_PERSISTENCE_REQUEST) {
service->soap_class.persistence = value;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set persistence with bogus value (%pd)", value);
+ php_error_docref(NULL, E_WARNING, "Tried to set persistence with bogus value (%pd)", value);
return;
}
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set persistence when you are using you SOAP SERVER in function mode, no persistence needed");
+ php_error_docref(NULL, E_WARNING, "Tried to set persistence when you are using you SOAP SERVER in function mode, no persistence needed");
return;
}
}
@@ -1295,11 +1295,11 @@ PHP_METHOD(SoapServer, setClass)
FETCH_THIS_SERVICE(service);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S*", &classname, &argv, &num_args) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S*", &classname, &argv, &num_args) == FAILURE) {
return;
}
- ce = zend_lookup_class(classname TSRMLS_CC);
+ ce = zend_lookup_class(classname);
if (ce) {
service->type = SOAP_CLASS;
@@ -1315,7 +1315,7 @@ PHP_METHOD(SoapServer, setClass)
}
}
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to set a non existent class (%s)", classname->val);
+ php_error_docref(NULL, E_WARNING, "Tried to set a non existent class (%s)", classname->val);
return;
}
@@ -1335,7 +1335,7 @@ PHP_METHOD(SoapServer, setObject)
FETCH_THIS_SERVICE(service);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
return;
}
@@ -1403,7 +1403,7 @@ PHP_METHOD(SoapServer, addFunction)
FETCH_THIS_SERVICE(service);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &function_name) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &function_name) == FAILURE) {
return;
}
@@ -1424,7 +1424,7 @@ PHP_METHOD(SoapServer, addFunction)
zend_function *f;
if (Z_TYPE_P(tmp_function) != IS_STRING) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to add a function that isn't a string");
+ php_error_docref(NULL, E_WARNING, "Tried to add a function that isn't a string");
return;
}
@@ -1432,7 +1432,7 @@ PHP_METHOD(SoapServer, addFunction)
zend_str_tolower_copy(key->val, Z_STRVAL_P(tmp_function), Z_STRLEN_P(tmp_function));
if ((f = zend_hash_find_ptr(EG(function_table), key)) == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to add a non existent function '%s'", Z_STRVAL_P(tmp_function));
+ php_error_docref(NULL, E_WARNING, "Tried to add a non existent function '%s'", Z_STRVAL_P(tmp_function));
return;
}
@@ -1450,7 +1450,7 @@ PHP_METHOD(SoapServer, addFunction)
zend_str_tolower_copy(key->val, Z_STRVAL_P(function_name), Z_STRLEN_P(function_name));
if ((f = zend_hash_find_ptr(EG(function_table), key)) == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to add a non existent function '%s'", Z_STRVAL_P(function_name));
+ php_error_docref(NULL, E_WARNING, "Tried to add a non existent function '%s'", Z_STRVAL_P(function_name));
return;
}
if (service->soap_functions.ft == NULL) {
@@ -1471,7 +1471,7 @@ PHP_METHOD(SoapServer, addFunction)
}
service->soap_functions.functions_all = TRUE;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value passed");
+ php_error_docref(NULL, E_WARNING, "Invalid value passed");
return;
}
}
@@ -1507,7 +1507,7 @@ PHP_METHOD(SoapServer, handle)
FETCH_THIS_SERVICE(service);
SOAP_GLOBAL(soap_version) = service->version;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &arg, &arg_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &arg, &arg_len) == FAILURE) {
return;
}
@@ -1529,8 +1529,8 @@ PHP_METHOD(SoapServer, handle)
sapi_add_header("Content-Type: text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
ZVAL_STRING(&param, service->sdl->source);
ZVAL_STRING(&readfile, "readfile");
- if (call_user_function(EG(function_table), NULL, &readfile, &readfile_ret, 1, &param TSRMLS_CC) == FAILURE) {
- soap_server_fault("Server", "Couldn't find WSDL", NULL, NULL, NULL TSRMLS_CC);
+ if (call_user_function(EG(function_table), NULL, &readfile, &readfile_ret, 1, &param ) == FAILURE) {
+ soap_server_fault("Server", "Couldn't find WSDL", NULL, NULL, NULL);
}
zval_ptr_dtor(&param);
@@ -1540,7 +1540,7 @@ PHP_METHOD(SoapServer, handle)
SOAP_SERVER_END_CODE();
return;
} else {
- soap_server_fault("Server", "WSDL generation is not supported yet", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Server", "WSDL generation is not supported yet", NULL, NULL, NULL);
/*
sapi_add_header("Content-Type: text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8"), 1);
PUTS("<?xml version=\"1.0\" ?>\n<definitions\n");
@@ -1557,8 +1557,8 @@ PHP_METHOD(SoapServer, handle)
ZVAL_NULL(&retval);
- if (php_output_start_default(TSRMLS_C) != SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR,"ob_start failed");
+ if (php_output_start_default() != SUCCESS) {
+ php_error_docref(NULL, E_ERROR,"ob_start failed");
}
if (ZEND_NUM_ARGS() == 0) {
@@ -1567,7 +1567,7 @@ PHP_METHOD(SoapServer, handle)
php_stream_filter *zf = NULL;
zend_string *server = zend_string_init("_SERVER", sizeof("_SERVER")-1, 0);
- zend_is_auto_global(server TSRMLS_CC);
+ zend_is_auto_global(server);
if ((server_vars = zend_hash_find(&EG(symbol_table).ht, server)) != NULL &&
Z_TYPE_P(server_vars) == IS_ARRAY &&
(encoding = zend_hash_str_find(Z_ARRVAL_P(server_vars), "HTTP_CONTENT_ENCODING", sizeof("HTTP_CONTENT_ENCODING")-1)) != NULL &&
@@ -1582,28 +1582,28 @@ PHP_METHOD(SoapServer, handle)
array_init_size(&filter_params, 1);
add_assoc_long_ex(&filter_params, "window", sizeof("window")-1, 0x2f); /* ANY WBITS */
- zf = php_stream_filter_create("zlib.inflate", &filter_params, 0 TSRMLS_CC);
+ zf = php_stream_filter_create("zlib.inflate", &filter_params, 0);
zval_dtor(&filter_params);
if (zf) {
php_stream_filter_append(&SG(request_info).request_body->readfilters, zf);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING,"Can't uncompress compressed request");
+ php_error_docref(NULL, E_WARNING,"Can't uncompress compressed request");
zend_string_release(server);
return;
}
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING,"Request is compressed with unknown compression '%s'",Z_STRVAL_P(encoding));
+ php_error_docref(NULL, E_WARNING,"Request is compressed with unknown compression '%s'",Z_STRVAL_P(encoding));
zend_string_release(server);
return;
}
}
zend_string_release(server);
- doc_request = soap_xmlParseFile("php://input" TSRMLS_CC);
+ doc_request = soap_xmlParseFile("php://input");
if (zf) {
- php_stream_filter_remove(zf, 1 TSRMLS_CC);
+ php_stream_filter_remove(zf, 1);
}
} else {
zval_ptr_dtor(&retval);
@@ -1614,7 +1614,7 @@ PHP_METHOD(SoapServer, handle)
}
if (doc_request == NULL) {
- soap_server_fault("Client", "Bad Request", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "Bad Request", NULL, NULL, NULL);
}
if (xmlGetIntSubset(doc_request) != NULL) {
xmlNodePtr env = get_node(doc_request->children,"Envelope");
@@ -1626,7 +1626,7 @@ PHP_METHOD(SoapServer, handle)
}
}
xmlFreeDoc(doc_request);
- soap_server_fault("Server", "DTD are not supported by SOAP", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Server", "DTD are not supported by SOAP", NULL, NULL, NULL);
}
old_sdl = SOAP_GLOBAL(sdl);
@@ -1640,16 +1640,16 @@ PHP_METHOD(SoapServer, handle)
old_features = SOAP_GLOBAL(features);
SOAP_GLOBAL(features) = service->features;
old_soap_version = SOAP_GLOBAL(soap_version);
- function = deserialize_function_call(service->sdl, doc_request, service->actor, &function_name, &num_params, &params, &soap_version, &soap_headers TSRMLS_CC);
+ function = deserialize_function_call(service->sdl, doc_request, service->actor, &function_name, &num_params, &params, &soap_version, &soap_headers);
xmlFreeDoc(doc_request);
if (EG(exception)) {
zval exception_object;
ZVAL_OBJ(&exception_object, EG(exception));
- php_output_discard(TSRMLS_C);
- if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry TSRMLS_CC)) {
- soap_server_fault_ex(function, &exception_object, NULL TSRMLS_CC);
+ php_output_discard();
+ if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) {
+ soap_server_fault_ex(function, &exception_object, NULL);
}
goto fail;
}
@@ -1669,7 +1669,7 @@ PHP_METHOD(SoapServer, handle)
if (PS(session_status) != php_session_active &&
PS(session_status) != php_session_disabled) {
- php_session_start(TSRMLS_C);
+ php_session_start();
}
/* Find the soap object and assign */
@@ -1694,16 +1694,16 @@ PHP_METHOD(SoapServer, handle)
zval c_ret, constructor;
ZVAL_STRING(&constructor, ZEND_CONSTRUCTOR_FUNC_NAME);
- if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv TSRMLS_CC) == FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Error calling constructor");
+ if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv) == FAILURE) {
+ php_error_docref(NULL, E_ERROR, "Error calling constructor");
}
if (EG(exception)) {
zval exception_object;
ZVAL_OBJ(&exception_object, EG(exception));
- php_output_discard(TSRMLS_C);
- if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry TSRMLS_CC)) {
- soap_server_fault_ex(function, &exception_object, NULL TSRMLS_CC);
+ php_output_discard();
+ if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) {
+ soap_server_fault_ex(function, &exception_object, NULL);
}
zval_dtor(&constructor);
zval_dtor(&c_ret);
@@ -1721,17 +1721,17 @@ PHP_METHOD(SoapServer, handle)
zval c_ret, constructor;
ZVAL_STR_COPY(&constructor, service->soap_class.ce->name);
- if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv TSRMLS_CC) == FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Error calling constructor");
+ if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv) == FAILURE) {
+ php_error_docref(NULL, E_ERROR, "Error calling constructor");
}
if (EG(exception)) {
zval exception_object;
ZVAL_OBJ(&exception_object, EG(exception));
- php_output_discard(TSRMLS_C);
- if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry TSRMLS_CC)) {
- soap_server_fault_ex(function, &exception_object, NULL TSRMLS_CC);
+ php_output_discard();
+ if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) {
+ soap_server_fault_ex(function, &exception_object, NULL);
}
zval_dtor(&constructor);
zval_dtor(&c_ret);
@@ -1787,7 +1787,7 @@ PHP_METHOD(SoapServer, handle)
#if 0
if (service->sdl && !h->function && !h->hdr) {
if (h->mustUnderstand) {
- soap_server_fault("MustUnderstand","Header not understood", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("MustUnderstand","Header not understood", NULL, NULL, NULL);
} else {
continue;
}
@@ -1798,16 +1798,16 @@ PHP_METHOD(SoapServer, handle)
((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
zend_hash_str_exists(function_table, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) {
if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
- call_status = call_user_function(NULL, soap_obj, &h->function_name, &h->retval, h->num_params, h->parameters TSRMLS_CC);
+ call_status = call_user_function(NULL, soap_obj, &h->function_name, &h->retval, h->num_params, h->parameters);
} else {
- call_status = call_user_function(EG(function_table), NULL, &h->function_name, &h->retval, h->num_params, h->parameters TSRMLS_CC);
+ call_status = call_user_function(EG(function_table), NULL, &h->function_name, &h->retval, h->num_params, h->parameters);
}
if (call_status != SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function '%s' call failed", Z_STRVAL(h->function_name));
+ php_error_docref(NULL, E_WARNING, "Function '%s' call failed", Z_STRVAL(h->function_name));
return;
}
if (Z_TYPE(h->retval) == IS_OBJECT &&
- instanceof_function(Z_OBJCE(h->retval), soap_fault_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE(h->retval), soap_fault_class_entry)) {
//??? zval *headerfault = NULL;
zval *tmp;
@@ -1815,8 +1815,8 @@ PHP_METHOD(SoapServer, handle)
Z_TYPE_P(tmp) != IS_NULL) {
//??? headerfault = tmp;
}
- php_output_discard(TSRMLS_C);
- soap_server_fault_ex(function, &h->retval, h TSRMLS_CC);
+ php_output_discard();
+ soap_server_fault_ex(function, &h->retval, h);
efree(fn_name);
if (service->type == SOAP_CLASS && soap_obj) {zval_ptr_dtor(soap_obj);}
goto fail;
@@ -1824,8 +1824,8 @@ PHP_METHOD(SoapServer, handle)
zval exception_object;
ZVAL_OBJ(&exception_object, EG(exception));
- php_output_discard(TSRMLS_C);
- if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry TSRMLS_CC)) {
+ php_output_discard();
+ if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) {
//??? zval *headerfault = NULL;
zval *tmp;
@@ -1833,14 +1833,14 @@ PHP_METHOD(SoapServer, handle)
Z_TYPE_P(tmp) != IS_NULL) {
//??? headerfault = tmp;
}
- soap_server_fault_ex(function, &exception_object, h TSRMLS_CC);
+ soap_server_fault_ex(function, &exception_object, h);
}
efree(fn_name);
if (service->type == SOAP_CLASS && soap_obj) {zval_ptr_dtor(soap_obj);}
goto fail;
}
} else if (h->mustUnderstand) {
- soap_server_fault("MustUnderstand","Header not understood", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("MustUnderstand","Header not understood", NULL, NULL, NULL);
}
efree(fn_name);
}
@@ -1851,7 +1851,7 @@ PHP_METHOD(SoapServer, handle)
((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
zend_hash_str_exists(function_table, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) {
if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
- call_status = call_user_function(NULL, soap_obj, &function_name, &retval, num_params, params TSRMLS_CC);
+ call_status = call_user_function(NULL, soap_obj, &function_name, &retval, num_params, params);
if (service->type == SOAP_CLASS) {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
if (service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
@@ -1864,7 +1864,7 @@ PHP_METHOD(SoapServer, handle)
#endif
}
} else {
- call_status = call_user_function(EG(function_table), NULL, &function_name, &retval, num_params, params TSRMLS_CC);
+ call_status = call_user_function(EG(function_table), NULL, &function_name, &retval, num_params, params);
}
} else {
php_error(E_ERROR, "Function '%s' doesn't exist", Z_STRVAL(function_name));
@@ -1875,9 +1875,9 @@ PHP_METHOD(SoapServer, handle)
zval exception_object;
ZVAL_OBJ(&exception_object, EG(exception));
- php_output_discard(TSRMLS_C);
- if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry TSRMLS_CC)) {
- soap_server_fault_ex(function, &exception_object, NULL TSRMLS_CC);
+ php_output_discard();
+ if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) {
+ soap_server_fault_ex(function, &exception_object, NULL);
}
if (service->type == SOAP_CLASS) {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
@@ -1895,9 +1895,9 @@ PHP_METHOD(SoapServer, handle)
char *response_name;
if (Z_TYPE(retval) == IS_OBJECT &&
- instanceof_function(Z_OBJCE(retval), soap_fault_class_entry TSRMLS_CC)) {
- php_output_discard(TSRMLS_C);
- soap_server_fault_ex(function, &retval, NULL TSRMLS_CC);
+ instanceof_function(Z_OBJCE(retval), soap_fault_class_entry)) {
+ php_output_discard();
+ soap_server_fault_ex(function, &retval, NULL);
goto fail;
}
@@ -1908,10 +1908,10 @@ PHP_METHOD(SoapServer, handle)
memcpy(response_name,Z_STRVAL(function_name),Z_STRLEN(function_name));
memcpy(response_name+Z_STRLEN(function_name),"Response",sizeof("Response"));
}
- doc_return = serialize_response_call(function, response_name, service->uri, &retval, soap_headers, soap_version TSRMLS_CC);
+ doc_return = serialize_response_call(function, response_name, service->uri, &retval, soap_headers, soap_version);
efree(response_name);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function '%s' call failed", Z_STRVAL(function_name));
+ php_error_docref(NULL, E_WARNING, "Function '%s' call failed", Z_STRVAL(function_name));
return;
}
@@ -1919,9 +1919,9 @@ PHP_METHOD(SoapServer, handle)
zval exception_object;
ZVAL_OBJ(&exception_object, EG(exception));
- php_output_discard(TSRMLS_C);
- if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry TSRMLS_CC)) {
- soap_server_fault_ex(function, &exception_object, NULL TSRMLS_CC);
+ php_output_discard();
+ if (instanceof_function(Z_OBJCE(exception_object), soap_fault_class_entry)) {
+ soap_server_fault_ex(function, &exception_object, NULL);
}
if (service->type == SOAP_CLASS) {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
@@ -1936,14 +1936,14 @@ PHP_METHOD(SoapServer, handle)
}
/* Flush buffer */
- php_output_discard(TSRMLS_C);
+ php_output_discard();
if (doc_return) {
/* xmlDocDumpMemoryEnc(doc_return, &buf, &size, XML_CHAR_ENCODING_UTF8); */
xmlDocDumpMemory(doc_return, &buf, &size);
if (size == 0) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Dump memory failed");
+ php_error_docref(NULL, E_ERROR, "Dump memory failed");
}
if (soap_version == SOAP_1_2) {
@@ -1960,7 +1960,7 @@ PHP_METHOD(SoapServer, handle)
snprintf(cont_len, sizeof(cont_len), "Content-Length: %d", size);
sapi_add_header(cont_len, strlen(cont_len), 1);
}
- php_write(buf, size TSRMLS_CC);
+ php_write(buf, size);
xmlFree(buf);
} else {
sapi_add_header("HTTP/1.1 202 Accepted", sizeof("HTTP/1.1 202 Accepted")-1, 1);
@@ -2024,13 +2024,13 @@ PHP_METHOD(SoapServer, fault)
old_encoding = SOAP_GLOBAL(encoding);
SOAP_GLOBAL(encoding) = service->encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|szs",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|szs",
&code, &code_len, &string, &string_len, &actor, &actor_len, &details,
&name, &name_len) == FAILURE) {
return;
}
- soap_server_fault(code, string, actor, details, name TSRMLS_CC);
+ soap_server_fault(code, string, actor, details, name);
SOAP_GLOBAL(encoding) = old_encoding;
SOAP_SERVER_END_CODE();
@@ -2048,11 +2048,11 @@ PHP_METHOD(SoapServer, addSoapHeader)
FETCH_THIS_SERVICE(service);
if (!service || !service->soap_headers_ptr) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The SoapServer::addSoapHeader function may be called only during SOAP request processing");
+ php_error_docref(NULL, E_WARNING, "The SoapServer::addSoapHeader function may be called only during SOAP request processing");
return;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &fault, soap_header_class_entry) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &fault, soap_header_class_entry) == FAILURE) {
return;
}
@@ -2069,7 +2069,7 @@ PHP_METHOD(SoapServer, addSoapHeader)
SOAP_SERVER_END_CODE();
}
-static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader *hdr TSRMLS_DC)
+static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader *hdr)
{
int soap_version;
xmlChar *buf;
@@ -2082,12 +2082,12 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
soap_version = SOAP_GLOBAL(soap_version);
- doc_return = serialize_response_call(function, NULL, NULL, fault, hdr, soap_version TSRMLS_CC);
+ doc_return = serialize_response_call(function, NULL, NULL, fault, hdr, soap_version);
xmlDocDumpMemory(doc_return, &buf, &size);
server = zend_string_init("_SERVER", sizeof("_SERVER") - 1, 0);
- zend_is_auto_global(server TSRMLS_CC);
+ zend_is_auto_global(server);
if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) != IS_UNDEF &&
(agent_name = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT")-1)) != NULL &&
Z_TYPE_P(agent_name) == IS_STRING) {
@@ -2115,21 +2115,21 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
sapi_add_header("Content-Type: text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
}
- php_write(buf, size TSRMLS_CC);
+ php_write(buf, size);
xmlFreeDoc(doc_return);
xmlFree(buf);
- zend_clear_exception(TSRMLS_C);
+ zend_clear_exception();
}
-static void soap_server_fault(char* code, char* string, char *actor, zval* details, char* name TSRMLS_DC)
+static void soap_server_fault(char* code, char* string, char *actor, zval* details, char* name)
{
zval ret;
ZVAL_NULL(&ret);
- set_soap_fault(&ret, NULL, code, string, actor, details, name TSRMLS_CC);
+ set_soap_fault(&ret, NULL, code, string, actor, details, name);
/* TODO: Which function */
- soap_server_fault_ex(NULL, &ret, NULL TSRMLS_CC);
+ soap_server_fault_ex(NULL, &ret, NULL);
zend_bailout();
}
@@ -2139,7 +2139,6 @@ static void soap_error_handler(int error_num, const char *error_filename, const
zend_execute_data *_old_current_execute_data;
int _old_http_response_code;
char *_old_http_status_line;
- TSRMLS_FETCH();
_old_in_compilation = CG(in_compilation);
_old_current_execute_data = EG(current_execute_data);
@@ -2152,7 +2151,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const
}
if (Z_OBJ(SOAP_GLOBAL(error_object)) &&
- instanceof_function(Z_OBJCE(SOAP_GLOBAL(error_object)), soap_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE(SOAP_GLOBAL(error_object)), soap_class_entry)) {
zval *tmp;
int use_exceptions = 0;
@@ -2195,9 +2194,9 @@ static void soap_error_handler(int error_num, const char *error_filename, const
if (code == NULL) {
code = "Client";
}
- add_soap_fault_ex(&fault, &SOAP_GLOBAL(error_object), code, buffer, NULL, NULL TSRMLS_CC);
+ add_soap_fault_ex(&fault, &SOAP_GLOBAL(error_object), code, buffer, NULL, NULL);
Z_ADDREF(fault);
- zend_throw_exception_object(&fault TSRMLS_CC);
+ zend_throw_exception_object(&fault);
old_objects = EG(objects_store).object_buckets;
EG(objects_store).object_buckets = NULL;
@@ -2248,9 +2247,9 @@ static void soap_error_handler(int error_num, const char *error_filename, const
code = "Server";
}
if (Z_OBJ(SOAP_GLOBAL(error_object)) &&
- instanceof_function(Z_OBJCE(SOAP_GLOBAL(error_object)), soap_server_class_entry TSRMLS_CC) &&
+ instanceof_function(Z_OBJCE(SOAP_GLOBAL(error_object)), soap_server_class_entry) &&
(tmp = zend_hash_str_find(Z_OBJPROP(SOAP_GLOBAL(error_object)), "service", sizeof("service")-1)) != NULL &&
- (service = (soapServicePtr)zend_fetch_resource(tmp TSRMLS_CC, -1, "service", NULL, 1, le_service)) &&
+ (service = (soapServicePtr)zend_fetch_resource(tmp, -1, "service", NULL, 1, le_service)) &&
!service->send_errors) {
strcpy(buffer, "Internal Error");
} else {
@@ -2272,14 +2271,14 @@ static void soap_error_handler(int error_num, const char *error_filename, const
}
/* Get output buffer and send as fault detials */
- if (php_output_get_length(&outbuflen TSRMLS_CC) != FAILURE && Z_LVAL(outbuflen) != 0) {
- php_output_get_contents(&outbuf TSRMLS_CC);
+ if (php_output_get_length(&outbuflen) != FAILURE && Z_LVAL(outbuflen) != 0) {
+ php_output_get_contents(&outbuf);
}
- php_output_discard(TSRMLS_C);
+ php_output_discard();
}
ZVAL_NULL(&fault_obj);
- set_soap_fault(&fault_obj, NULL, code, buffer, NULL, &outbuf, NULL TSRMLS_CC);
+ set_soap_fault(&fault_obj, NULL, code, buffer, NULL, &outbuf, NULL);
fault = 1;
}
@@ -2299,7 +2298,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const
PG(display_errors) = old;
if (fault) {
- soap_server_fault_ex(NULL, &fault_obj, NULL TSRMLS_CC);
+ soap_server_fault_ex(NULL, &fault_obj, NULL);
zend_bailout();
}
}
@@ -2310,7 +2309,7 @@ PHP_FUNCTION(use_soap_error_handler)
zend_bool handler = 1;
ZVAL_BOOL(return_value, SOAP_GLOBAL(use_soap_error_handler));
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &handler) == SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &handler) == SUCCESS) {
SOAP_GLOBAL(use_soap_error_handler) = handler;
}
}
@@ -2319,9 +2318,9 @@ PHP_FUNCTION(is_soap_fault)
{
zval *fault;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &fault) == SUCCESS &&
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &fault) == SUCCESS &&
Z_TYPE_P(fault) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(fault), soap_fault_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE_P(fault), soap_fault_class_entry)) {
RETURN_TRUE;
}
RETURN_FALSE
@@ -2344,12 +2343,12 @@ PHP_METHOD(SoapClient, SoapClient)
SOAP_CLIENT_BEGIN_CODE();
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z|a", &wsdl, &options) == FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) {
+ php_error_docref(NULL, E_ERROR, "Invalid parameters");
}
if (Z_TYPE_P(wsdl) != IS_STRING && Z_TYPE_P(wsdl) != IS_NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "$wsdl must be string or null");
+ php_error_docref(NULL, E_ERROR, "$wsdl must be string or null");
}
cache_wsdl = SOAP_GLOBAL(cache_enabled) ? SOAP_GLOBAL(cache_mode) : 0;
@@ -2364,7 +2363,7 @@ PHP_METHOD(SoapClient, SoapClient)
Z_TYPE_P(tmp) == IS_STRING) {
add_property_str(this_ptr, "uri", zend_string_copy(Z_STR_P(tmp)));
} else {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "'uri' option is required in nonWSDL mode");
+ php_error_docref(NULL, E_ERROR, "'uri' option is required in nonWSDL mode");
}
if ((tmp = zend_hash_str_find(ht, "style", sizeof("style")-1)) != NULL &&
@@ -2390,7 +2389,7 @@ PHP_METHOD(SoapClient, SoapClient)
Z_TYPE_P(tmp) == IS_STRING) {
add_property_str(this_ptr, "location", zend_string_copy(Z_STR_P(tmp)));
} else if (Z_TYPE_P(wsdl) == IS_NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "'location' option is required in nonWSDL mode");
+ php_error_docref(NULL, E_ERROR, "'location' option is required in nonWSDL mode");
}
if ((tmp = zend_hash_str_find(ht, "soap_version", sizeof("soap_version")-1)) != NULL) {
@@ -2434,7 +2433,7 @@ PHP_METHOD(SoapClient, SoapClient)
if ((tmp = zend_hash_str_find(ht, "local_cert", sizeof("local_cert")-1)) != NULL &&
Z_TYPE_P(tmp) == IS_STRING) {
if (!context) {
- context = php_stream_context_alloc(TSRMLS_C);
+ context = php_stream_context_alloc();
}
php_stream_context_set_option(context, "ssl", "local_cert", tmp);
if ((tmp = zend_hash_str_find(ht, "passphrase", sizeof("passphrase")-1)) != NULL &&
@@ -2469,7 +2468,7 @@ PHP_METHOD(SoapClient, SoapClient)
encoding = xmlFindCharEncodingHandler(Z_STRVAL_P(tmp));
if (encoding == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid 'encoding' option - '%s'", Z_STRVAL_P(tmp));
+ php_error_docref(NULL, E_ERROR, "Invalid 'encoding' option - '%s'", Z_STRVAL_P(tmp));
} else {
xmlCharEncCloseFunc(encoding);
add_property_str(this_ptr, "_encoding", zend_string_copy(Z_STR_P(tmp)));
@@ -2532,7 +2531,7 @@ PHP_METHOD(SoapClient, SoapClient)
add_property_long(this_ptr, "_ssl_method", Z_LVAL_P(tmp));
}
} else if (Z_TYPE_P(wsdl) == IS_NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "'location' and 'uri' options are required in nonWSDL mode");
+ php_error_docref(NULL, E_ERROR, "'location' and 'uri' options are required in nonWSDL mode");
}
add_property_long(this_ptr, "_soap_version", soap_version);
@@ -2544,8 +2543,8 @@ PHP_METHOD(SoapClient, SoapClient)
old_soap_version = SOAP_GLOBAL(soap_version);
SOAP_GLOBAL(soap_version) = soap_version;
- sdl = get_sdl(this_ptr, Z_STRVAL_P(wsdl), cache_wsdl TSRMLS_CC);
- res = zend_register_resource(NULL, sdl, le_sdl TSRMLS_CC);
+ sdl = get_sdl(this_ptr, Z_STRVAL_P(wsdl), cache_wsdl);
+ res = zend_register_resource(NULL, sdl, le_sdl);
add_property_resource(this_ptr, "sdl", res);
@@ -2553,11 +2552,11 @@ PHP_METHOD(SoapClient, SoapClient)
}
if (typemap_ht) {
- HashTable *typemap = soap_create_typemap(sdl, typemap_ht TSRMLS_CC);
+ HashTable *typemap = soap_create_typemap(sdl, typemap_ht);
if (typemap) {
zend_resource *res;
- res = zend_register_resource(NULL, typemap, le_typemap TSRMLS_CC);
+ res = zend_register_resource(NULL, typemap, le_typemap);
add_property_resource(this_ptr, "typemap", res);
}
}
@@ -2565,7 +2564,7 @@ PHP_METHOD(SoapClient, SoapClient)
}
/* }}} */
-static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, int one_way, zval *response TSRMLS_DC)
+static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, int one_way, zval *response)
{
int ret = TRUE;
char *buf;
@@ -2579,7 +2578,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
xmlDocDumpMemory(request, (xmlChar**)&buf, &buf_size);
if (!buf) {
- add_soap_fault(this_ptr, "HTTP", "Error build soap request", NULL, NULL TSRMLS_CC);
+ add_soap_fault(this_ptr, "HTTP", "Error build soap request", NULL, NULL);
return FALSE;
}
@@ -2603,12 +2602,12 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
ZVAL_LONG(&params[3], version);
ZVAL_LONG(&params[4], one_way);
- if (call_user_function(NULL, this_ptr, &func, response, 5, params TSRMLS_CC) != SUCCESS) {
- add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL TSRMLS_CC);
+ if (call_user_function(NULL, this_ptr, &func, response, 5, params) != SUCCESS) {
+ add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL);
ret = FALSE;
} else if (Z_TYPE_P(response) != IS_STRING) {
if ((fault = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault")-1)) == NULL) {
- add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL TSRMLS_CC);
+ add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL);
}
ret = FALSE;
} else if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
@@ -2640,7 +2639,7 @@ static void do_soap_call(zend_execute_data *execute_data,
char* call_uri,
HashTable* soap_headers,
zval* output_headers
- TSRMLS_DC)
+ )
{
zval *tmp;
zval *trace;
@@ -2684,7 +2683,7 @@ static void do_soap_call(zend_execute_data *execute_data,
FETCH_TYPEMAP_RES(typemap,tmp);
}
- clear_soap_fault(this_ptr TSRMLS_CC);
+ clear_soap_fault(this_ptr);
SOAP_GLOBAL(soap_version) = soap_version;
old_sdl = SOAP_GLOBAL(sdl);
@@ -2731,18 +2730,18 @@ static void do_soap_call(zend_execute_data *execute_data,
}
if (binding->bindingType == BINDING_SOAP) {
sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes;
- request = serialize_function_call(this_ptr, fn, NULL, fnb->input.ns, real_args, arg_count, soap_version, soap_headers TSRMLS_CC);
- ret = do_request(this_ptr, request, location, fnb->soapAction, soap_version, one_way, &response TSRMLS_CC);
+ request = serialize_function_call(this_ptr, fn, NULL, fnb->input.ns, real_args, arg_count, soap_version, soap_headers);
+ ret = do_request(this_ptr, request, location, fnb->soapAction, soap_version, one_way, &response);
} else {
- request = serialize_function_call(this_ptr, fn, NULL, sdl->target_ns, real_args, arg_count, soap_version, soap_headers TSRMLS_CC);
- ret = do_request(this_ptr, request, location, NULL, soap_version, one_way, &response TSRMLS_CC);
+ request = serialize_function_call(this_ptr, fn, NULL, sdl->target_ns, real_args, arg_count, soap_version, soap_headers);
+ ret = do_request(this_ptr, request, location, NULL, soap_version, one_way, &response);
}
xmlFreeDoc(request);
if (ret && Z_TYPE(response) == IS_STRING) {
encode_reset_ns();
- ret = parse_packet_soap(this_ptr, Z_STRVAL(response), Z_STRLEN(response), fn, NULL, return_value, output_headers TSRMLS_CC);
+ ret = parse_packet_soap(this_ptr, Z_STRVAL(response), Z_STRLEN(response), fn, NULL, return_value, output_headers);
encode_finish();
}
@@ -2754,7 +2753,7 @@ static void do_soap_call(zend_execute_data *execute_data,
smart_str_appends(&error,function);
smart_str_appends(&error,"\") is not a valid method for this service");
smart_str_0(&error);
- add_soap_fault(this_ptr, "Client", error.s->val, NULL, NULL TSRMLS_CC);
+ add_soap_fault(this_ptr, "Client", error.s->val, NULL, NULL);
smart_str_free(&error);
}
} else {
@@ -2762,14 +2761,14 @@ static void do_soap_call(zend_execute_data *execute_data,
smart_str action = {0};
if ((uri = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "uri", sizeof("uri")-1)) == NULL) {
- add_soap_fault(this_ptr, "Client", "Error finding \"uri\" property", NULL, NULL TSRMLS_CC);
+ add_soap_fault(this_ptr, "Client", "Error finding \"uri\" property", NULL, NULL);
} else if (location == NULL) {
- add_soap_fault(this_ptr, "Client", "Error could not find \"location\" property", NULL, NULL TSRMLS_CC);
+ add_soap_fault(this_ptr, "Client", "Error could not find \"location\" property", NULL, NULL);
} else {
if (call_uri == NULL) {
call_uri = Z_STRVAL_P(uri);
}
- request = serialize_function_call(this_ptr, NULL, function, call_uri, real_args, arg_count, soap_version, soap_headers TSRMLS_CC);
+ request = serialize_function_call(this_ptr, NULL, function, call_uri, real_args, arg_count, soap_version, soap_headers);
if (soap_action == NULL) {
smart_str_appends(&action, call_uri);
@@ -2780,14 +2779,14 @@ static void do_soap_call(zend_execute_data *execute_data,
}
smart_str_0(&action);
- ret = do_request(this_ptr, request, location, action.s->val, soap_version, 0, &response TSRMLS_CC);
+ ret = do_request(this_ptr, request, location, action.s->val, soap_version, 0, &response);
smart_str_free(&action);
xmlFreeDoc(request);
if (ret && Z_TYPE(response) == IS_STRING) {
encode_reset_ns();
- ret = parse_packet_soap(this_ptr, Z_STRVAL(response), Z_STRLEN(response), NULL, function, return_value, output_headers TSRMLS_CC);
+ ret = parse_packet_soap(this_ptr, Z_STRVAL(response), Z_STRLEN(response), NULL, function, return_value, output_headers);
encode_finish();
}
@@ -2800,7 +2799,7 @@ static void do_soap_call(zend_execute_data *execute_data,
if ((fault = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault")-1)) != NULL) {
ZVAL_COPY(return_value, fault);
} else {
- add_soap_fault_ex(return_value, this_ptr, "Client", "Unknown Error", NULL, NULL TSRMLS_CC);
+ add_soap_fault_ex(return_value, this_ptr, "Client", "Unknown Error", NULL, NULL);
}
} else {
zval* fault;
@@ -2811,11 +2810,11 @@ static void do_soap_call(zend_execute_data *execute_data,
if (!EG(exception) &&
Z_TYPE_P(return_value) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(return_value), soap_fault_class_entry TSRMLS_CC) &&
+ instanceof_function(Z_OBJCE_P(return_value), soap_fault_class_entry) &&
((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_exceptions", sizeof("_exceptions")-1)) == NULL ||
Z_TYPE_P(tmp) != IS_FALSE)) {
Z_ADDREF_P(return_value);
- zend_throw_exception_object(return_value TSRMLS_CC);
+ zend_throw_exception_object(return_value);
}
} zend_catch {
@@ -2838,14 +2837,14 @@ static void do_soap_call(zend_execute_data *execute_data,
SOAP_CLIENT_END_CODE();
}
-static void verify_soap_headers_array(HashTable *ht TSRMLS_DC)
+static void verify_soap_headers_array(HashTable *ht)
{
zval *tmp;
ZEND_HASH_FOREACH_VAL(ht, tmp) {
if (Z_TYPE_P(tmp) != IS_OBJECT ||
- !instanceof_function(Z_OBJCE_P(tmp), soap_header_class_entry TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid SOAP header");
+ !instanceof_function(Z_OBJCE_P(tmp), soap_header_class_entry)) {
+ php_error_docref(NULL, E_ERROR, "Invalid SOAP header");
}
} ZEND_HASH_FOREACH_END();
}
@@ -2870,7 +2869,7 @@ PHP_METHOD(SoapClient, __call)
zend_bool free_soap_headers = 0;
zval *this_ptr;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sa|a!zz/",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sa|a!zz/",
&function, &function_len, &args, &options, &headers, &output_headers) == FAILURE) {
return;
}
@@ -2896,17 +2895,17 @@ PHP_METHOD(SoapClient, __call)
if (headers == NULL || Z_TYPE_P(headers) == IS_NULL) {
} else if (Z_TYPE_P(headers) == IS_ARRAY) {
soap_headers = Z_ARRVAL_P(headers);
- verify_soap_headers_array(soap_headers TSRMLS_CC);
+ verify_soap_headers_array(soap_headers);
free_soap_headers = 0;
} else if (Z_TYPE_P(headers) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(headers), soap_header_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE_P(headers), soap_header_class_entry)) {
soap_headers = emalloc(sizeof(HashTable));
zend_hash_init(soap_headers, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_next_index_insert(soap_headers, headers);
Z_ADDREF_P(headers);
free_soap_headers = 1;
} else{
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid SOAP header");
+ php_error_docref(NULL, E_WARNING, "Invalid SOAP header");
return;
}
@@ -2944,7 +2943,7 @@ PHP_METHOD(SoapClient, __call)
if (output_headers) {
array_init(output_headers);
}
- do_soap_call(execute_data, this_ptr, function, function_len, arg_count, real_args, return_value, location, soap_action, uri, soap_headers, output_headers TSRMLS_CC);
+ do_soap_call(execute_data, this_ptr, function, function_len, arg_count, real_args, return_value, location, soap_action, uri, soap_headers, output_headers);
if (arg_count > 0) {
efree(real_args);
}
@@ -3095,7 +3094,7 @@ PHP_METHOD(SoapClient, __doRequest)
zend_long one_way = 0;
zval *this_ptr = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssl|l",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sssl|l",
&buf, &buf_size,
&location, &location_size,
&action, &action_size,
@@ -3106,11 +3105,11 @@ PHP_METHOD(SoapClient, __doRequest)
one_way = 0;
}
if (one_way) {
- if (make_http_soap_request(this_ptr, buf, buf_size, location, action, version, NULL TSRMLS_CC)) {
+ if (make_http_soap_request(this_ptr, buf, buf_size, location, action, version, NULL)) {
RETURN_EMPTY_STRING();
}
} else if (make_http_soap_request(this_ptr, buf, buf_size, location, action, version,
- return_value TSRMLS_CC)) {
+ return_value)) {
return;
}
RETURN_NULL();
@@ -3129,7 +3128,7 @@ PHP_METHOD(SoapClient, __setCookie)
zval *cookies;
zval *this_ptr = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &name, &name_len, &val, &val_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &name, &name_len, &val, &val_len) == FAILURE) {
return;
}
@@ -3183,7 +3182,7 @@ PHP_METHOD(SoapClient, __setSoapHeaders)
zval *headers = NULL;
zval *this_ptr = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z", &headers) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &headers) == FAILURE) {
return;
}
@@ -3192,12 +3191,12 @@ PHP_METHOD(SoapClient, __setSoapHeaders)
} else if (Z_TYPE_P(headers) == IS_ARRAY) {
zval *default_headers;
- verify_soap_headers_array(Z_ARRVAL_P(headers) TSRMLS_CC);
+ verify_soap_headers_array(Z_ARRVAL_P(headers));
if ((default_headers = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")-1)) == NULL) {
add_property_zval(this_ptr, "__default_headers", headers);
}
} else if (Z_TYPE_P(headers) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(headers), soap_header_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE_P(headers), soap_header_class_entry)) {
zval default_headers;
array_init(&default_headers);
@@ -3206,7 +3205,7 @@ PHP_METHOD(SoapClient, __setSoapHeaders)
add_property_zval(this_ptr, "__default_headers", &default_headers);
Z_DELREF_P(&default_headers);
} else{
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid SOAP header");
+ php_error_docref(NULL, E_WARNING, "Invalid SOAP header");
}
RETURN_TRUE;
}
@@ -3227,7 +3226,7 @@ PHP_METHOD(SoapClient, __setLocation)
zval *tmp;
zval *this_ptr = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &location, &location_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &location, &location_len) == FAILURE) {
return;
}
@@ -3245,39 +3244,39 @@ PHP_METHOD(SoapClient, __setLocation)
}
/* }}} */
-static void clear_soap_fault(zval *obj TSRMLS_DC)
+static void clear_soap_fault(zval *obj)
{
if (obj != NULL && Z_TYPE_P(obj) == IS_OBJECT) {
zend_hash_str_del(Z_OBJPROP_P(obj), "__soap_fault", sizeof("__soap_fault")-1);
}
}
-static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail TSRMLS_DC)
+static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail)
{
ZVAL_NULL(fault);
- set_soap_fault(fault, NULL, fault_code, fault_string, fault_actor, fault_detail, NULL TSRMLS_CC);
+ set_soap_fault(fault, NULL, fault_code, fault_string, fault_actor, fault_detail, NULL);
add_property_zval(obj, "__soap_fault", fault);
Z_DELREF_P(fault);
}
-void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail TSRMLS_DC)
+void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail)
{
zval fault;
ZVAL_NULL(&fault);
- set_soap_fault(&fault, NULL, fault_code, fault_string, fault_actor, fault_detail, NULL TSRMLS_CC);
+ set_soap_fault(&fault, NULL, fault_code, fault_string, fault_actor, fault_detail, NULL);
add_property_zval(obj, "__soap_fault", &fault);
Z_DELREF(fault);
}
-static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, char *name TSRMLS_DC)
+static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, char *name)
{
if (Z_TYPE_P(obj) != IS_OBJECT) {
object_init_ex(obj, soap_fault_class_entry);
}
add_property_string(obj, "faultstring", fault_string ? fault_string : "");
- zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, (fault_string ? fault_string : "") TSRMLS_CC);
+ zend_update_property_string(zend_exception_get_default(), obj, "message", sizeof("message")-1, (fault_string ? fault_string : ""));
if (fault_code != NULL) {
int soap_version = SOAP_GLOBAL(soap_version);
@@ -3323,7 +3322,7 @@ static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, cha
}
}
-static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, int *num_params, zval **parameters TSRMLS_DC)
+static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, int *num_params, zval **parameters)
{
int cur_param = 0,num_of_params = 0;
zval *tmp_parameters = NULL;
@@ -3350,7 +3349,7 @@ static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, i
/* TODO: may be "nil" is not OK? */
ZVAL_NULL(&tmp_parameters[cur_param]);
} else {
- master_to_zval(&tmp_parameters[cur_param], param->encode, val TSRMLS_CC);
+ master_to_zval(&tmp_parameters[cur_param], param->encode, val);
}
cur_param++;
} ZEND_HASH_FOREACH_END();
@@ -3390,15 +3389,14 @@ static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, i
sdlParamPtr param = NULL;
if (function != NULL &&
(param = zend_hash_index_find_ptr(function->requestParameters, cur_param)) == NULL) {
- TSRMLS_FETCH();
- soap_server_fault("Client", "Error cannot find parameter", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "Error cannot find parameter", NULL, NULL, NULL);
}
if (param == NULL) {
enc = NULL;
} else {
enc = param->encode;
}
- master_to_zval(&tmp_parameters[cur_param], enc, trav TSRMLS_CC);
+ master_to_zval(&tmp_parameters[cur_param], enc, trav);
cur_param++;
}
trav = trav->next;
@@ -3406,7 +3404,7 @@ static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, i
}
}
if (num_of_params > cur_param) {
- soap_server_fault("Client","Missing parameter", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client","Missing parameter", NULL, NULL, NULL);
}
(*parameters) = tmp_parameters;
(*num_params) = num_of_params;
@@ -3440,7 +3438,7 @@ static sdlFunctionPtr find_function(sdlPtr sdl, xmlNodePtr func, zval* function_
return function;
}
-static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, char* actor, zval *function_name, int *num_params, zval **parameters, int *version, soapHeader **headers TSRMLS_DC)
+static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, char* actor, zval *function_name, int *num_params, zval **parameters, int *version, soapHeader **headers)
{
char* envelope_ns = NULL;
xmlNodePtr trav,env,head,body,func;
@@ -3465,24 +3463,24 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
envelope_ns = SOAP_1_2_ENV_NAMESPACE;
SOAP_GLOBAL(soap_version) = SOAP_1_2;
} else {
- soap_server_fault("VersionMismatch", "Wrong Version", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("VersionMismatch", "Wrong Version", NULL, NULL, NULL);
}
}
trav = trav->next;
}
if (env == NULL) {
- soap_server_fault("Client", "looks like we got XML without \"Envelope\" element", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "looks like we got XML without \"Envelope\" element", NULL, NULL, NULL);
}
attr = env->properties;
while (attr != NULL) {
if (attr->ns == NULL) {
- soap_server_fault("Client", "A SOAP Envelope element cannot have non Namespace qualified attributes", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "A SOAP Envelope element cannot have non Namespace qualified attributes", NULL, NULL, NULL);
} else if (attr_is_equal_ex(attr,"encodingStyle",SOAP_1_2_ENV_NAMESPACE)) {
if (*version == SOAP_1_2) {
- soap_server_fault("Client", "encodingStyle cannot be specified on the Envelope", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "encodingStyle cannot be specified on the Envelope", NULL, NULL, NULL);
} else if (strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
- soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL);
}
}
attr = attr->next;
@@ -3512,26 +3510,26 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
trav = trav->next;
}
if (body == NULL) {
- soap_server_fault("Client", "Body must be present in a SOAP envelope", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "Body must be present in a SOAP envelope", NULL, NULL, NULL);
}
attr = body->properties;
while (attr != NULL) {
if (attr->ns == NULL) {
if (*version == SOAP_1_2) {
- soap_server_fault("Client", "A SOAP Body element cannot have non Namespace qualified attributes", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "A SOAP Body element cannot have non Namespace qualified attributes", NULL, NULL, NULL);
}
} else if (attr_is_equal_ex(attr,"encodingStyle",SOAP_1_2_ENV_NAMESPACE)) {
if (*version == SOAP_1_2) {
- soap_server_fault("Client", "encodingStyle cannot be specified on the Body", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "encodingStyle cannot be specified on the Body", NULL, NULL, NULL);
} else if (strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
- soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL);
}
}
attr = attr->next;
}
if (trav != NULL && *version == SOAP_1_2) {
- soap_server_fault("Client", "A SOAP 1.2 envelope can contain only Header and Body", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "A SOAP 1.2 envelope can contain only Header and Body", NULL, NULL, NULL);
}
func = NULL;
@@ -3540,7 +3538,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
if (trav->type == XML_ELEMENT_NODE) {
/*
if (func != NULL) {
- soap_server_fault("Client", "looks like we got \"Body\" with several functions call", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "looks like we got \"Body\" with several functions call", NULL, NULL, NULL);
}
*/
func = trav;
@@ -3553,24 +3551,24 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
if (function != NULL) {
ZVAL_STRING(function_name, (char *)function->functionName);
} else {
- soap_server_fault("Client", "looks like we got \"Body\" without function call", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "looks like we got \"Body\" without function call", NULL, NULL, NULL);
}
} else {
if (*version == SOAP_1_1) {
attr = get_attribute_ex(func->properties,"encodingStyle",SOAP_1_1_ENV_NAMESPACE);
if (attr && strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
- soap_server_fault("Client","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client","Unknown Data Encoding Style", NULL, NULL, NULL);
}
} else {
attr = get_attribute_ex(func->properties,"encodingStyle",SOAP_1_2_ENV_NAMESPACE);
if (attr && strcmp((char*)attr->children->content,SOAP_1_2_ENC_NAMESPACE) != 0) {
- soap_server_fault("DataEncodingUnknown","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("DataEncodingUnknown","Unknown Data Encoding Style", NULL, NULL, NULL);
}
}
function = find_function(sdl, func, function_name);
if (sdl != NULL && function == NULL) {
if (*version == SOAP_1_2) {
- soap_server_fault("rpc:ProcedureNotPresent","Procedure not present", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("rpc:ProcedureNotPresent","Procedure not present", NULL, NULL, NULL);
} else {
php_error(E_ERROR, "Procedure '%s' not present", func->name);
}
@@ -3584,12 +3582,12 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
attr = head->properties;
while (attr != NULL) {
if (attr->ns == NULL) {
- soap_server_fault("Client", "A SOAP Header element cannot have non Namespace qualified attributes", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "A SOAP Header element cannot have non Namespace qualified attributes", NULL, NULL, NULL);
} else if (attr_is_equal_ex(attr,"encodingStyle",SOAP_1_2_ENV_NAMESPACE)) {
if (*version == SOAP_1_2) {
- soap_server_fault("Client", "encodingStyle cannot be specified on the Header", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "encodingStyle cannot be specified on the Header", NULL, NULL, NULL);
} else if (strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
- soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL);
}
}
attr = attr->next;
@@ -3603,7 +3601,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
if (*version == SOAP_1_1) {
attr = get_attribute_ex(hdr_func->properties,"encodingStyle",SOAP_1_1_ENV_NAMESPACE);
if (attr && strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
- soap_server_fault("Client","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client","Unknown Data Encoding Style", NULL, NULL, NULL);
}
attr = get_attribute_ex(hdr_func->properties,"actor",envelope_ns);
if (attr != NULL) {
@@ -3615,7 +3613,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
} else if (*version == SOAP_1_2) {
attr = get_attribute_ex(hdr_func->properties,"encodingStyle",SOAP_1_2_ENV_NAMESPACE);
if (attr && strcmp((char*)attr->children->content,SOAP_1_2_ENC_NAMESPACE) != 0) {
- soap_server_fault("DataEncodingUnknown","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("DataEncodingUnknown","Unknown Data Encoding Style", NULL, NULL, NULL);
}
attr = get_attribute_ex(hdr_func->properties,"role",envelope_ns);
if (attr != NULL) {
@@ -3635,7 +3633,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
strcmp((char*)attr->children->content,"false") == 0) {
mustUnderstand = 0;
} else {
- soap_server_fault("Client","mustUnderstand value is not boolean", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Client","mustUnderstand value is not boolean", NULL, NULL, NULL);
}
}
h = emalloc(sizeof(soapHeader));
@@ -3663,7 +3661,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
if (h->hdr) {
h->num_params = 1;
h->parameters = emalloc(sizeof(zval));
- master_to_zval(&h->parameters[0], h->hdr->encode, hdr_func TSRMLS_CC);
+ master_to_zval(&h->parameters[0], h->hdr->encode, hdr_func);
} else {
if (h->function && h->function->binding && h->function->binding->bindingType == BINDING_SOAP) {
sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)h->function->bindingAttributes;
@@ -3671,7 +3669,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
hdr_func = hdr_func->children;
}
}
- deserialize_parameters(hdr_func, h->function, &h->num_params, &h->parameters TSRMLS_CC);
+ deserialize_parameters(hdr_func, h->function, &h->num_params, &h->parameters);
}
ZVAL_NULL(&h->retval);
if (last == NULL) {
@@ -3694,7 +3692,7 @@ ignore_header:
} else {
func = func->children;
}
- deserialize_parameters(func, function, num_params, parameters TSRMLS_CC);
+ deserialize_parameters(func, function, num_params, parameters);
encode_finish();
@@ -3738,7 +3736,7 @@ static void set_soap_header_attributes(xmlNodePtr h, HashTable *ht, int version)
}
}
-static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, char *function_name, char *uri, zval *ret, int version, int main, xmlNodePtr *node TSRMLS_DC)
+static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, char *function_name, char *uri, zval *ret, int version, int main, xmlNodePtr *node)
{
xmlNodePtr method = NULL, param;
sdlParamPtr parameter = NULL;
@@ -3786,13 +3784,13 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
if (main && version == SOAP_1_2) {
xmlNs *rpc_ns = xmlNewNs(body, BAD_CAST(RPC_SOAP12_NAMESPACE), BAD_CAST(RPC_SOAP12_NS_PREFIX));
rpc_result = xmlNewChild(method, rpc_ns, BAD_CAST("result"), NULL);
- param = serialize_parameter(parameter, ret, 0, "return", use, method TSRMLS_CC);
+ param = serialize_parameter(parameter, ret, 0, "return", use, method);
xmlNodeSetContent(rpc_result,param->name);
} else {
- param = serialize_parameter(parameter, ret, 0, "return", use, method TSRMLS_CC);
+ param = serialize_parameter(parameter, ret, 0, "return", use, method);
}
} else {
- param = serialize_parameter(parameter, ret, 0, "return", use, body TSRMLS_CC);
+ param = serialize_parameter(parameter, ret, 0, "return", use, body);
if (function && function->binding->bindingType == BINDING_SOAP) {
if (parameter && parameter->element) {
ns = encode_add_ns(param, parameter->element->namens);
@@ -3815,9 +3813,9 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(ret), param_index, param_name, data) {
parameter = get_param(function, param_name->val, param_index, TRUE);
if (style == SOAP_RPC) {
- param = serialize_parameter(parameter, data, i, param_name->val, use, method TSRMLS_CC);
+ param = serialize_parameter(parameter, data, i, param_name->val, use, method);
} else {
- param = serialize_parameter(parameter, data, i, param_name->val, use, body TSRMLS_CC);
+ param = serialize_parameter(parameter, data, i, param_name->val, use, body);
if (function && function->binding->bindingType == BINDING_SOAP) {
if (parameter && parameter->element) {
ns = encode_add_ns(param, parameter->element->namens);
@@ -3840,7 +3838,7 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
return use;
}
-static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function_name, char *uri, zval *ret, soapHeader* headers, int version TSRMLS_DC)
+static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function_name, char *uri, zval *ret, soapHeader* headers, int version)
{
xmlDocPtr doc;
xmlNodePtr envelope = NULL, body, param;
@@ -3863,12 +3861,12 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
ns = xmlNewNs(envelope, BAD_CAST(SOAP_1_2_ENV_NAMESPACE), BAD_CAST(SOAP_1_2_ENV_NS_PREFIX));
xmlSetNs(envelope,ns);
} else {
- soap_server_fault("Server", "Unknown SOAP version", NULL, NULL, NULL TSRMLS_CC);
+ soap_server_fault("Server", "Unknown SOAP version", NULL, NULL, NULL);
}
xmlDocSetRootElement(doc, envelope);
if (Z_TYPE_P(ret) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(ret), soap_fault_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE_P(ret), soap_fault_class_entry)) {
char *detail_name;
HashTable* prop;
zval *tmp;
@@ -3887,7 +3885,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
head = xmlNewChild(envelope, ns, BAD_CAST("Header"), NULL);
if (Z_TYPE_P(hdr_ret) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(hdr_ret), soap_header_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE_P(hdr_ret), soap_header_class_entry)) {
HashTable* ht = Z_OBJPROP_P(hdr_ret);
sdlSoapBindingFunctionHeaderPtr hdr;
smart_str key = {0};
@@ -3918,11 +3916,11 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
}
if (headers->function) {
- if (serialize_response_call2(head, headers->function, Z_STRVAL(headers->function_name), uri, hdr_ret, version, 0, NULL TSRMLS_CC) == SOAP_ENCODED) {
+ if (serialize_response_call2(head, headers->function, Z_STRVAL(headers->function_name), uri, hdr_ret, version, 0, NULL) == SOAP_ENCODED) {
use = SOAP_ENCODED;
}
} else {
- xmlNodePtr xmlHdr = master_to_xml(hdr_enc, hdr_ret, hdr_use, head TSRMLS_CC);
+ xmlNodePtr xmlHdr = master_to_xml(hdr_enc, hdr_ret, hdr_use, head);
if (hdr_name) {
xmlNodeSetName(xmlHdr, BAD_CAST(hdr_name));
}
@@ -3987,7 +3985,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
if (version == SOAP_1_1) {
if ((tmp = zend_hash_str_find(prop, "faultcode", sizeof("faultcode")-1)) != NULL) {
xmlNodePtr node = xmlNewNode(NULL, BAD_CAST("faultcode"));
- zend_string *str = php_escape_html_entities((unsigned char*)Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0, 0, NULL TSRMLS_CC);
+ zend_string *str = php_escape_html_entities((unsigned char*)Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0, 0, NULL);
xmlAddChild(param, node);
if (fault_ns) {
xmlNsPtr nsptr = encode_add_ns(node, fault_ns);
@@ -4000,18 +3998,18 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
zend_string_release(str);
}
if ((tmp = zend_hash_str_find(prop, "faultstring", sizeof("faultstring")-1)) != NULL) {
- xmlNodePtr node = master_to_xml(get_conversion(IS_STRING), tmp, SOAP_LITERAL, param TSRMLS_CC);
+ xmlNodePtr node = master_to_xml(get_conversion(IS_STRING), tmp, SOAP_LITERAL, param);
xmlNodeSetName(node, BAD_CAST("faultstring"));
}
if ((tmp = zend_hash_str_find(prop, "faultactor", sizeof("faultactor")-1)) != NULL) {
- xmlNodePtr node = master_to_xml(get_conversion(IS_STRING), tmp, SOAP_LITERAL, param TSRMLS_CC);
+ xmlNodePtr node = master_to_xml(get_conversion(IS_STRING), tmp, SOAP_LITERAL, param);
xmlNodeSetName(node, BAD_CAST("faultactor"));
}
detail_name = "detail";
} else {
if ((tmp = zend_hash_str_find(prop, "faultcode", sizeof("faultcode")-1)) != NULL) {
xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Code"), NULL);
- zend_string *str = php_escape_html_entities((unsigned char*)Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0, 0, NULL TSRMLS_CC);
+ zend_string *str = php_escape_html_entities((unsigned char*)Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0, 0, NULL);
node = xmlNewChild(node, ns, BAD_CAST("Value"), NULL);
if (fault_ns) {
xmlNsPtr nsptr = encode_add_ns(node, fault_ns);
@@ -4025,7 +4023,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
}
if ((tmp = zend_hash_str_find(prop, "faultstring", sizeof("faultstring")-1)) != NULL) {
xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Reason"), NULL);
- node = master_to_xml(get_conversion(IS_STRING), tmp, SOAP_LITERAL, node TSRMLS_CC);
+ node = master_to_xml(get_conversion(IS_STRING), tmp, SOAP_LITERAL, node);
xmlNodeSetName(node, BAD_CAST("Text"));
xmlSetNs(node, ns);
}
@@ -4055,7 +4053,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
detail = tmp;
}
- x = serialize_parameter(sparam, detail, 1, NULL, use, node TSRMLS_CC);
+ x = serialize_parameter(sparam, detail, 1, NULL, use, node);
if (function &&
function->binding &&
@@ -4083,7 +4081,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
}
} else if ((tmp = zend_hash_str_find(prop, "detail", sizeof("detail")-1)) != NULL &&
Z_TYPE_P(tmp) != IS_NULL) {
- serialize_zval(tmp, NULL, detail_name, use, param TSRMLS_CC);
+ serialize_zval(tmp, NULL, detail_name, use, param);
}
} else {
@@ -4102,7 +4100,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
HashTable *ht = NULL;
if (Z_TYPE(h->retval) == IS_OBJECT &&
- instanceof_function(Z_OBJCE(h->retval), soap_header_class_entry TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE(h->retval), soap_header_class_entry)) {
zval *tmp;
sdlSoapBindingFunctionHeaderPtr hdr;
smart_str key = {0};
@@ -4140,14 +4138,14 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
if (h->function) {
xmlNodePtr xmlHdr = NULL;
- if (serialize_response_call2(head, h->function, Z_STRVAL(h->function_name), uri, hdr_ret, version, 0, &xmlHdr TSRMLS_CC) == SOAP_ENCODED) {
+ if (serialize_response_call2(head, h->function, Z_STRVAL(h->function_name), uri, hdr_ret, version, 0, &xmlHdr) == SOAP_ENCODED) {
use = SOAP_ENCODED;
}
if (ht) {
set_soap_header_attributes(xmlHdr, ht, version);
}
} else {
- xmlNodePtr xmlHdr = master_to_xml(hdr_enc, hdr_ret, hdr_use, head TSRMLS_CC);
+ xmlNodePtr xmlHdr = master_to_xml(hdr_enc, hdr_ret, hdr_use, head);
if (hdr_name) {
xmlNodeSetName(xmlHdr, BAD_CAST(hdr_name));
}
@@ -4171,7 +4169,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
body = xmlNewChild(envelope, ns, BAD_CAST("Body"), NULL);
- if (serialize_response_call2(body, function, function_name, uri, ret, version, 1, NULL TSRMLS_CC) == SOAP_ENCODED) {
+ if (serialize_response_call2(body, function, function_name, uri, ret, version, 1, NULL) == SOAP_ENCODED) {
use = SOAP_ENCODED;
}
@@ -4197,7 +4195,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
return doc;
}
-static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function, char *function_name, char *uri, zval *arguments, int arg_count, int version, HashTable *soap_headers TSRMLS_DC)
+static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function, char *function_name, char *uri, zval *arguments, int arg_count, int version, HashTable *soap_headers)
{
xmlDoc *doc;
xmlNodePtr envelope = NULL, body, method = NULL, head = NULL;
@@ -4282,9 +4280,9 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
sdlParamPtr parameter = get_param(function, NULL, i, FALSE);
if (style == SOAP_RPC) {
- param = serialize_parameter(parameter, &arguments[i], i, NULL, use, method TSRMLS_CC);
+ param = serialize_parameter(parameter, &arguments[i], i, NULL, use, method);
} else if (style == SOAP_DOCUMENT) {
- param = serialize_parameter(parameter, &arguments[i], i, NULL, use, body TSRMLS_CC);
+ param = serialize_parameter(parameter, &arguments[i], i, NULL, use, body);
if (function && function->binding->bindingType == BINDING_SOAP) {
if (parameter && parameter->element) {
ns = encode_add_ns(param, parameter->element->namens);
@@ -4304,9 +4302,9 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
sdlParamPtr parameter = get_param(function, NULL, i, FALSE);
if (style == SOAP_RPC) {
- param = serialize_parameter(parameter, NULL, i, NULL, use, method TSRMLS_CC);
+ param = serialize_parameter(parameter, NULL, i, NULL, use, method);
} else if (style == SOAP_DOCUMENT) {
- param = serialize_parameter(parameter, NULL, i, NULL, use, body TSRMLS_CC);
+ param = serialize_parameter(parameter, NULL, i, NULL, use, body);
if (function && function->binding->bindingType == BINDING_SOAP) {
if (parameter && parameter->element) {
ns = encode_add_ns(param, parameter->element->namens);
@@ -4354,7 +4352,7 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
}
if ((tmp = zend_hash_str_find(ht, "data", sizeof("data")-1)) != NULL) {
- h = master_to_xml(enc, tmp, hdr_use, head TSRMLS_CC);
+ h = master_to_xml(enc, tmp, hdr_use, head);
xmlNodeSetName(h, BAD_CAST(Z_STRVAL_P(name)));
} else {
h = xmlNewNode(NULL, BAD_CAST(Z_STRVAL_P(name)));
@@ -4385,7 +4383,7 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
return doc;
}
-static xmlNodePtr serialize_parameter(sdlParamPtr param, zval *param_val, int index, char *name, int style, xmlNodePtr parent TSRMLS_DC)
+static xmlNodePtr serialize_parameter(sdlParamPtr param, zval *param_val, int index, char *name, int style, xmlNodePtr parent)
{
char *paramName;
xmlNodePtr xmlParam;
@@ -4415,12 +4413,12 @@ static xmlNodePtr serialize_parameter(sdlParamPtr param, zval *param_val, int in
}
}
- xmlParam = serialize_zval(param_val, param, paramName, style, parent TSRMLS_CC);
+ xmlParam = serialize_zval(param_val, param, paramName, style, parent);
return xmlParam;
}
-static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName, int style, xmlNodePtr parent TSRMLS_DC)
+static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName, int style, xmlNodePtr parent)
{
xmlNodePtr xmlParam;
encodePtr enc;
@@ -4443,7 +4441,7 @@ static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName,
} else {
enc = NULL;
}
- xmlParam = master_to_xml(enc, val, style, parent TSRMLS_CC);
+ xmlParam = master_to_xml(enc, val, style, parent);
zval_ptr_dtor(&defval);
if (!strcmp((char*)xmlParam->name, "BOGUS")) {
xmlNodeSetName(xmlParam, BAD_CAST(paramName));