Lines Matching refs:service

68 static void delete_service(void *service);
1139 soapServicePtr service; in PHP_METHOD() local
1156 service = emalloc(sizeof(soapService)); in PHP_METHOD()
1157 memset(service, 0, sizeof(soapService)); in PHP_METHOD()
1158 service->send_errors = 1; in PHP_METHOD()
1177 service->uri = estrndup(Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); in PHP_METHOD()
1184 service->actor = estrndup(Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); in PHP_METHOD()
1195 service->encoding = encoding; in PHP_METHOD()
1201 service->class_map = zend_array_dup(Z_ARRVAL_P(tmp)); in PHP_METHOD()
1212 service->features = Z_LVAL_P(tmp); in PHP_METHOD()
1222 service->send_errors = 0; in PHP_METHOD()
1224 service->send_errors = 1; in PHP_METHOD()
1226 service->send_errors = Z_LVAL_P(tmp); in PHP_METHOD()
1234 service->version = version; in PHP_METHOD()
1235 service->type = SOAP_FUNCTIONS; in PHP_METHOD()
1236 service->soap_functions.functions_all = FALSE; in PHP_METHOD()
1237 service->soap_functions.ft = emalloc(sizeof(HashTable)); in PHP_METHOD()
1238 zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0); in PHP_METHOD()
1241 service->sdl = get_sdl(getThis(), Z_STRVAL_P(wsdl), cache_wsdl); in PHP_METHOD()
1242 if (service->uri == NULL) { in PHP_METHOD()
1243 if (service->sdl->target_ns) { in PHP_METHOD()
1244 service->uri = estrdup(service->sdl->target_ns); in PHP_METHOD()
1247 service->uri = estrdup("http://unknown-uri/"); in PHP_METHOD()
1253 service->typemap = soap_create_typemap(service->sdl, typemap_ht); in PHP_METHOD()
1256 res = zend_register_resource(service, le_service); in PHP_METHOD()
1268 soapServicePtr service; in PHP_METHOD() local
1273 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1276 if (service->type == SOAP_CLASS) { in PHP_METHOD()
1279 service->soap_class.persistence = value; in PHP_METHOD()
1299 soapServicePtr service; in PHP_METHOD() local
1307 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1316 service->type = SOAP_CLASS; in PHP_METHOD()
1317 service->soap_class.ce = ce; in PHP_METHOD()
1319 service->soap_class.persistence = SOAP_PERSISTENCE_REQUEST; in PHP_METHOD()
1320 service->soap_class.argc = num_args; in PHP_METHOD()
1321 if (service->soap_class.argc > 0) { in PHP_METHOD()
1323 service->soap_class.argv = safe_emalloc(sizeof(zval), service->soap_class.argc, 0); in PHP_METHOD()
1324 for (i = 0;i < service->soap_class.argc;i++) { in PHP_METHOD()
1325 ZVAL_COPY(&service->soap_class.argv[i], &argv[i]); in PHP_METHOD()
1342 soapServicePtr service; in PHP_METHOD() local
1347 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1353 service->type = SOAP_OBJECT; in PHP_METHOD()
1355 ZVAL_COPY(&service->soap_object, obj); in PHP_METHOD()
1366 soapServicePtr service; in PHP_METHOD() local
1375 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1378 if (service->type == SOAP_OBJECT) { in PHP_METHOD()
1379 ft = &(Z_OBJCE(service->soap_object)->function_table); in PHP_METHOD()
1380 } else if (service->type == SOAP_CLASS) { in PHP_METHOD()
1381 ft = &service->soap_class.ce->function_table; in PHP_METHOD()
1382 } else if (service->soap_functions.functions_all == TRUE) { in PHP_METHOD()
1384 } else if (service->soap_functions.ft != NULL) { in PHP_METHOD()
1387 ZEND_HASH_FOREACH_VAL(service->soap_functions.ft, name) { in PHP_METHOD()
1395 …if ((service->type != SOAP_OBJECT && service->type != SOAP_CLASS) || (f->common.fn_flags & ZEND_AC… in PHP_METHOD()
1410 soapServicePtr service; in PHP_METHOD() local
1415 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1424 if (service->type == SOAP_FUNCTIONS) { in PHP_METHOD()
1427 if (service->soap_functions.ft == NULL) { in PHP_METHOD()
1428 service->soap_functions.functions_all = FALSE; in PHP_METHOD()
1429 service->soap_functions.ft = emalloc(sizeof(HashTable)); in PHP_METHOD()
1430 …zend_hash_init(service->soap_functions.ft, zend_hash_num_elements(Z_ARRVAL_P(function_name)), NULL… in PHP_METHOD()
1451 zend_hash_update(service->soap_functions.ft, key, &function_copy); in PHP_METHOD()
1467 if (service->soap_functions.ft == NULL) { in PHP_METHOD()
1468 service->soap_functions.functions_all = FALSE; in PHP_METHOD()
1469 service->soap_functions.ft = emalloc(sizeof(HashTable)); in PHP_METHOD()
1470 zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0); in PHP_METHOD()
1474 zend_hash_update(service->soap_functions.ft, key, &function_copy); in PHP_METHOD()
1478 if (service->soap_functions.ft != NULL) { in PHP_METHOD()
1479 zend_hash_destroy(service->soap_functions.ft); in PHP_METHOD()
1480 efree(service->soap_functions.ft); in PHP_METHOD()
1481 service->soap_functions.ft = NULL; in PHP_METHOD()
1483 service->soap_functions.functions_all = TRUE; in PHP_METHOD()
1494 static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr function, zval *this_ptr)… in _soap_server_exception() argument
1502 if (service->send_errors) { in _soap_server_exception()
1521 soapServicePtr service; local
1539 FETCH_THIS_SERVICE(service);
1540 SOAP_GLOBAL(soap_version) = service->version;
1556 if (service->sdl) {
1567 ZVAL_STRING(&param, service->sdl->source);
1670 SOAP_GLOBAL(sdl) = service->sdl;
1672 SOAP_GLOBAL(encoding) = service->encoding;
1674 SOAP_GLOBAL(class_map) = service->class_map;
1676 SOAP_GLOBAL(typemap) = service->typemap;
1678 SOAP_GLOBAL(features) = service->features;
1680 …function = deserialize_function_call(service->sdl, doc_request, service->actor, &function_name, &n…
1685 _soap_server_exception(service, function, getThis());
1689 service->soap_headers_ptr = &soap_headers;
1692 if (service->type == SOAP_OBJECT) {
1693 soap_obj = &service->soap_object;
1695 } else if (service->type == SOAP_CLASS) {
1698 if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
1712 Z_OBJCE_P(tmp_soap_p) == service->soap_class.ce) {
1720 object_init_ex(&tmp_soap, service->soap_class.ce);
1727 …if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->s…
1732 _soap_server_exception(service, function, getThis());
1741 int class_name_len = ZSTR_LEN(service->soap_class.ce->name);
1744 memcpy(class_name, ZSTR_VAL(service->soap_class.ce->name), class_name_len+1);
1748 ZVAL_STR_COPY(&constructor, service->soap_class.ce->name);
1749 … (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soa…
1755 _soap_server_exception(service, function, getThis());
1770 if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
1790 if (service->soap_functions.functions_all == TRUE) {
1793 function_table = service->soap_functions.ft;
1807 if (service->sdl && !h->function && !h->hdr) {
1817 ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
1819 if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
1838 if (service->type == SOAP_CLASS && soap_obj) {zval_ptr_dtor(soap_obj);}
1842 _soap_server_exception(service, function, getThis());
1844 if (service->type == SOAP_CLASS && soap_obj) {zval_ptr_dtor(soap_obj);}
1856 ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
1858 if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
1860 if (service->type == SOAP_CLASS) {
1862 if (service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
1881 _soap_server_exception(service, function, getThis());
1882 if (service->type == SOAP_CLASS) {
1884 if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
1911 …doc_return = serialize_response_call(function, response_name, service->uri, &retval, soap_headers,…
1920 _soap_server_exception(service, function, getThis());
1921 if (service->type == SOAP_CLASS) {
1923 if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
1991 service->soap_headers_ptr = NULL;
2014 soapServicePtr service; local
2018 FETCH_THIS_SERVICE(service);
2020 SOAP_GLOBAL(encoding) = service->encoding;
2037 soapServicePtr service; local
2043 FETCH_THIS_SERVICE(service);
2045 if (!service || !service->soap_headers_ptr) {
2054 p = service->soap_headers_ptr;
2211 soapServicePtr service; local
2220 (service = (soapServicePtr)zend_fetch_resource_ex(tmp, "service", le_service)) &&
2221 !service->send_errors) {
4834 soapServicePtr service = (soapServicePtr)data; local
4836 if (service->soap_functions.ft) {
4837 zend_hash_destroy(service->soap_functions.ft);
4838 efree(service->soap_functions.ft);
4841 if (service->typemap) {
4842 zend_hash_destroy(service->typemap);
4843 efree(service->typemap);
4846 if (service->soap_class.argc) {
4848 for (i = 0; i < service->soap_class.argc;i++) {
4849 zval_ptr_dtor(&service->soap_class.argv[i]);
4851 efree(service->soap_class.argv);
4854 if (service->actor) {
4855 efree(service->actor);
4857 if (service->uri) {
4858 efree(service->uri);
4860 if (service->sdl) {
4861 delete_sdl(service->sdl);
4863 if (service->encoding) {
4864 xmlCharEncCloseFunc(service->encoding);
4866 if (service->class_map) {
4867 zend_hash_destroy(service->class_map);
4868 FREE_HASHTABLE(service->class_map);
4870 zval_ptr_dtor(&service->soap_object);
4871 efree(service);