Lines Matching refs:service

68 static void delete_service(void *service);
1141 soapServicePtr service; in PHP_METHOD() local
1158 service = emalloc(sizeof(soapService)); in PHP_METHOD()
1159 memset(service, 0, sizeof(soapService)); in PHP_METHOD()
1160 service->send_errors = 1; in PHP_METHOD()
1179 service->uri = estrndup(Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); in PHP_METHOD()
1186 service->actor = estrndup(Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); in PHP_METHOD()
1197 service->encoding = encoding; in PHP_METHOD()
1203 service->class_map = zend_array_dup(Z_ARRVAL_P(tmp)); in PHP_METHOD()
1214 service->features = Z_LVAL_P(tmp); in PHP_METHOD()
1224 service->send_errors = 0; in PHP_METHOD()
1226 service->send_errors = 1; in PHP_METHOD()
1228 service->send_errors = Z_LVAL_P(tmp); in PHP_METHOD()
1236 service->version = version; in PHP_METHOD()
1237 service->type = SOAP_FUNCTIONS; in PHP_METHOD()
1238 service->soap_functions.functions_all = FALSE; in PHP_METHOD()
1239 service->soap_functions.ft = emalloc(sizeof(HashTable)); in PHP_METHOD()
1240 zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0); in PHP_METHOD()
1243 service->sdl = get_sdl(getThis(), Z_STRVAL_P(wsdl), cache_wsdl); in PHP_METHOD()
1244 if (service->uri == NULL) { in PHP_METHOD()
1245 if (service->sdl->target_ns) { in PHP_METHOD()
1246 service->uri = estrdup(service->sdl->target_ns); in PHP_METHOD()
1249 service->uri = estrdup("http://unknown-uri/"); in PHP_METHOD()
1255 service->typemap = soap_create_typemap(service->sdl, typemap_ht); in PHP_METHOD()
1258 res = zend_register_resource(service, le_service); in PHP_METHOD()
1270 soapServicePtr service; in PHP_METHOD() local
1275 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1278 if (service->type == SOAP_CLASS) { in PHP_METHOD()
1281 service->soap_class.persistence = value; in PHP_METHOD()
1301 soapServicePtr service; in PHP_METHOD() local
1309 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1318 service->type = SOAP_CLASS; in PHP_METHOD()
1319 service->soap_class.ce = ce; in PHP_METHOD()
1321 service->soap_class.persistence = SOAP_PERSISTENCE_REQUEST; in PHP_METHOD()
1322 service->soap_class.argc = num_args; in PHP_METHOD()
1323 if (service->soap_class.argc > 0) { in PHP_METHOD()
1325 service->soap_class.argv = safe_emalloc(sizeof(zval), service->soap_class.argc, 0); in PHP_METHOD()
1326 for (i = 0;i < service->soap_class.argc;i++) { in PHP_METHOD()
1327 ZVAL_COPY(&service->soap_class.argv[i], &argv[i]); in PHP_METHOD()
1344 soapServicePtr service; in PHP_METHOD() local
1349 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1355 service->type = SOAP_OBJECT; in PHP_METHOD()
1357 ZVAL_COPY(&service->soap_object, obj); in PHP_METHOD()
1368 soapServicePtr service; in PHP_METHOD() local
1377 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1380 if (service->type == SOAP_OBJECT) { in PHP_METHOD()
1381 ft = &(Z_OBJCE(service->soap_object)->function_table); in PHP_METHOD()
1382 } else if (service->type == SOAP_CLASS) { in PHP_METHOD()
1383 ft = &service->soap_class.ce->function_table; in PHP_METHOD()
1384 } else if (service->soap_functions.functions_all == TRUE) { in PHP_METHOD()
1386 } else if (service->soap_functions.ft != NULL) { in PHP_METHOD()
1389 ZEND_HASH_FOREACH_VAL(service->soap_functions.ft, name) { in PHP_METHOD()
1397 …if ((service->type != SOAP_OBJECT && service->type != SOAP_CLASS) || (f->common.fn_flags & ZEND_AC… in PHP_METHOD()
1412 soapServicePtr service; in PHP_METHOD() local
1417 FETCH_THIS_SERVICE(service); in PHP_METHOD()
1426 if (service->type == SOAP_FUNCTIONS) { in PHP_METHOD()
1429 if (service->soap_functions.ft == NULL) { in PHP_METHOD()
1430 service->soap_functions.functions_all = FALSE; in PHP_METHOD()
1431 service->soap_functions.ft = emalloc(sizeof(HashTable)); in PHP_METHOD()
1432 …zend_hash_init(service->soap_functions.ft, zend_hash_num_elements(Z_ARRVAL_P(function_name)), NULL… in PHP_METHOD()
1453 zend_hash_update(service->soap_functions.ft, key, &function_copy); in PHP_METHOD()
1469 if (service->soap_functions.ft == NULL) { in PHP_METHOD()
1470 service->soap_functions.functions_all = FALSE; in PHP_METHOD()
1471 service->soap_functions.ft = emalloc(sizeof(HashTable)); in PHP_METHOD()
1472 zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0); in PHP_METHOD()
1476 zend_hash_update(service->soap_functions.ft, key, &function_copy); in PHP_METHOD()
1480 if (service->soap_functions.ft != NULL) { in PHP_METHOD()
1481 zend_hash_destroy(service->soap_functions.ft); in PHP_METHOD()
1482 efree(service->soap_functions.ft); in PHP_METHOD()
1483 service->soap_functions.ft = NULL; in PHP_METHOD()
1485 service->soap_functions.functions_all = TRUE; in PHP_METHOD()
1496 static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr function, zval *this_ptr)… in _soap_server_exception() argument
1504 if (service->send_errors) { in _soap_server_exception()
1523 soapServicePtr service; local
1540 FETCH_THIS_SERVICE(service);
1541 SOAP_GLOBAL(soap_version) = service->version;
1557 if (service->sdl) {
1568 ZVAL_STRING(&param, service->sdl->source);
1671 SOAP_GLOBAL(sdl) = service->sdl;
1673 SOAP_GLOBAL(encoding) = service->encoding;
1675 SOAP_GLOBAL(class_map) = service->class_map;
1677 SOAP_GLOBAL(typemap) = service->typemap;
1679 SOAP_GLOBAL(features) = service->features;
1681 …function = deserialize_function_call(service->sdl, doc_request, service->actor, &function_name, &n…
1686 _soap_server_exception(service, function, getThis());
1690 service->soap_headers_ptr = &soap_headers;
1693 if (service->type == SOAP_OBJECT) {
1694 soap_obj = &service->soap_object;
1696 } else if (service->type == SOAP_CLASS) {
1699 if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
1714 Z_OBJCE_P(tmp_soap) == service->soap_class.ce) {
1723 object_init_ex(&tmp_soap, service->soap_class.ce);
1730 …if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->s…
1735 _soap_server_exception(service, function, getThis());
1744 int class_name_len = ZSTR_LEN(service->soap_class.ce->name);
1747 memcpy(class_name, ZSTR_VAL(service->soap_class.ce->name), class_name_len+1);
1751 ZVAL_STR_COPY(&constructor, service->soap_class.ce->name);
1752 … (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soa…
1758 _soap_server_exception(service, function, getThis());
1773 if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
1794 if (service->soap_functions.functions_all == TRUE) {
1797 function_table = service->soap_functions.ft;
1811 if (service->sdl && !h->function && !h->hdr) {
1821 ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
1823 if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
1842 if (service->type == SOAP_CLASS && soap_obj) {zval_ptr_dtor(soap_obj);}
1846 _soap_server_exception(service, function, getThis());
1848 if (service->type == SOAP_CLASS && soap_obj) {zval_ptr_dtor(soap_obj);}
1860 ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
1862 if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
1864 if (service->type == SOAP_CLASS) {
1866 if (service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
1885 _soap_server_exception(service, function, getThis());
1886 if (service->type == SOAP_CLASS) {
1888 if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
1915 …doc_return = serialize_response_call(function, response_name, service->uri, &retval, soap_headers,…
1924 _soap_server_exception(service, function, getThis());
1925 if (service->type == SOAP_CLASS) {
1927 if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
1995 service->soap_headers_ptr = NULL;
2018 soapServicePtr service; local
2022 FETCH_THIS_SERVICE(service);
2024 SOAP_GLOBAL(encoding) = service->encoding;
2041 soapServicePtr service; local
2047 FETCH_THIS_SERVICE(service);
2049 if (!service || !service->soap_headers_ptr) {
2058 p = service->soap_headers_ptr;
2235 soapServicePtr service; local
2244 (service = (soapServicePtr)zend_fetch_resource_ex(tmp, "service", le_service)) &&
2245 !service->send_errors) {
4858 soapServicePtr service = (soapServicePtr)data; local
4860 if (service->soap_functions.ft) {
4861 zend_hash_destroy(service->soap_functions.ft);
4862 efree(service->soap_functions.ft);
4865 if (service->typemap) {
4866 zend_hash_destroy(service->typemap);
4867 efree(service->typemap);
4870 if (service->soap_class.argc) {
4872 for (i = 0; i < service->soap_class.argc;i++) {
4873 zval_ptr_dtor(&service->soap_class.argv[i]);
4875 efree(service->soap_class.argv);
4878 if (service->actor) {
4879 efree(service->actor);
4881 if (service->uri) {
4882 efree(service->uri);
4884 if (service->sdl) {
4885 delete_sdl(service->sdl);
4887 if (service->encoding) {
4888 xmlCharEncCloseFunc(service->encoding);
4890 if (service->class_map) {
4891 zend_hash_destroy(service->class_map);
4892 FREE_HASHTABLE(service->class_map);
4894 zval_ptr_dtor(&service->soap_object);
4895 efree(service);