[wsf-c-dev] svn commit r377 - wsf/php/src
svn at wso2.com
svn at wso2.com
Tue Jan 9 00:58:43 PST 2007
Author: nandika
Date: Tue Jan 9 00:58:42 2007
New Revision: 377
Modified:
wsf/php/src/wsf.c
wsf/php/src/wsf.h
Log:
unused functions removed
Modified: wsf/php/src/wsf.c
==============================================================================
--- wsf/php/src/wsf.c (original)
+++ wsf/php/src/wsf.c Tue Jan 9 00:58:42 2007
@@ -32,7 +32,7 @@
#include <axis2_error_default.h>
#include <axis2_log_default.h>
#include "wsf_util.h"
-#include "wsf_worker.h"
+
#include <axis2_svc_client.h>
#include <axiom_soap.h>
#include <axis2_http_transport.h>
@@ -41,10 +41,20 @@
ZEND_DECLARE_MODULE_GLOBALS(wsf)
+zend_class_entry *ws_client_class_entry;
+zend_class_entry *ws_service_class_entry;
+zend_class_entry *ws_header_class_entry;
+zend_class_entry *ws_param_class_entry;
+zend_class_entry *ws_fault_class_entry;
+zend_class_entry *ws_message_class_entry;
+zend_class_entry *ws_var_class_entry;
+zend_class_entry *ws_client_proxy_class_entry;
+
+
/* True global values, worker is thread safe */
static axis2_env_t *env;
static axis2_env_t *ws_env_svr;
-static wsf_worker_t *worker;
+wsf_worker_t *worker;
/** WSMessage functions */
PHP_METHOD(ws_message, __construct);
@@ -93,12 +103,6 @@
/** WSHeader class functions */
PHP_METHOD(ws_header, __construct);
-PHP_METHOD(ws_header, __destruct);
-
-
-/** WSVAR class entry **/
-PHP_METHOD(ws_var, __construct);
-PHP_METHOD(ws_var, __destruct);
/** WSFault */
@@ -163,18 +167,10 @@
{NULL , NULL, NULL}
};
-zend_function_entry php_ws_var_class_functions[] =
-{
- PHP_ME(ws_var, __construct, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ws_var, __destruct, NULL, ZEND_ACC_PUBLIC)
- {NULL, NULL, NULL}
-};
-
/* {{{ WSHeader class functions */
zend_function_entry php_ws_header_class_functions[] =
{
PHP_ME(ws_header, __construct, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ws_header, __destruct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
@@ -201,6 +197,8 @@
zend_object_handle handle TSRMLS_DC);
static axis2_env_t *ws_env_create(axis2_char_t *logpath);
+static axis2_env_t *ws_env_create_for_client(axis2_char_t *logpath);
+
static void ws_env_free(axis2_env_t *env);
@@ -689,6 +687,35 @@
}
/* }}} */
+static axis2_env_t *ws_env_create_for_client(axis2_char_t *logpath)
+{
+ axis2_allocator_t *allocator = NULL;
+ axis2_error_t *error = NULL;
+ axis2_log_t *log = NULL;
+ axis2_char_t client_log[250];
+ axis2_thread_pool_t *thread_pool = NULL;
+ const axis2_char_t *LOG_NAME = "wsf.log";
+
+ allocator = emalloc(sizeof(axis2_allocator_t));
+
+ allocator->free_fn = ws_free_wrapper_cli;
+ allocator->malloc_fn = ws_malloc_wrapper_cli;
+ allocator->realloc = ws_realloc_warpper_cli;
+
+ error = axis2_error_create(allocator);
+ if (logpath &&
+ 0 == strcmp(logpath, "") ||
+ 0 == strcmp(logpath, ".")||
+ 0 == strcmp(logpath, "./")) {
+ snprintf(client_log, 256, "%s", LOG_NAME);
+ } else {
+ snprintf(client_log, 256, "%s/%s", logpath, LOG_NAME);
+ }
+
+ thread_pool = axis2_thread_pool_init(allocator);
+ log = axis2_log_create(allocator, NULL, client_log);
+ return axis2_env_create_with_error_log_thread_pool(allocator, error, log, thread_pool);
+}
PHP_FUNCTION(is_ws_fault)
@@ -813,12 +840,10 @@
Z_TYPE_PP(tmp) == IS_BOOL){
add_property_bool(object, "secure", Z_BVAL_PP(tmp));
}
- /*
if(zend_hash_find(ht, "reliable", sizeof("reliable"), (void **)&tmp) == SUCCESS &&
Z_TYPE_PP(tmp) == IS_BOOL){
add_property_bool(object, "reliable", Z_BVAL_PP(tmp));
}
- */
}
}
@@ -2317,59 +2342,6 @@
{
}
-/*** {{{ proto object WSVar::WSVar { mixed data, int encoding [, string typename[, string type_namespace [,
- string node_name, string node_namespace ]]]])
- WSVar constructor
-**/
-PHP_METHOD(ws_var, __construct)
-{
- /*
- zval *data, *type;
- char *stype = NULL, *ns = NULL, *name = NULL, *namens = NULL;
- int stype_len, ns_len , name_len , namens_len;
-
- 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) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid Parameters ");
- }
-
- if(Z_TYPE_P(type) == IS_NULL) {
- add_property_long(this_ptr, "enc_type", UNKNOWN_TYPE);
- } else {
- if (zend_hash_index_exists(&WSF_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_ERROR, "Invalid type ID");
- }
- }
-
- if (data) {
-#ifndef ZEND_ENGINE_2
- zval_add_ref(&data);
-#endif
- add_property_zval(this_ptr, "enc_value", data);
- }
-
- if (stype && stype_len > 0) {
- add_property_stringl(this_ptr, "enc_stype", stype, stype_len, 1);
- }
- if (ns && ns_len > 0) {
- add_property_stringl(this_ptr, "enc_ns", ns, ns_len, 1);
- }
- if (name && name_len > 0) {
- add_property_stringl(this_ptr, "enc_name", name, name_len, 1);
- }
- if (namens && namens_len > 0) {
- add_property_stringl(this_ptr, "enc_namens", namens, namens_len, 1);
- }
- */
-}
-
-PHP_METHOD(ws_var, __destruct)
-{
-
-}
-
PHP_METHOD(ws_header, __construct)
{
zval *data = NULL, *role = NULL;
@@ -2410,7 +2382,3 @@
}
}
-PHP_METHOD(ws_header, __destruct)
-{
-
-}
Modified: wsf/php/src/wsf.h
==============================================================================
--- wsf/php/src/wsf.h (original)
+++ wsf/php/src/wsf.h Tue Jan 9 00:58:42 2007
@@ -33,6 +33,7 @@
#include "php_ini.h"
#include "SAPI.h"
+#include "wsf_worker.h"
#ifndef PHP_WIN32
# define TRUE 1
@@ -80,14 +81,16 @@
#define phpext_wsf_ptr &wsf_module_entry
-zend_class_entry *ws_client_class_entry;
-zend_class_entry *ws_service_class_entry;
-zend_class_entry *ws_header_class_entry;
-zend_class_entry *ws_param_class_entry;
-zend_class_entry *ws_fault_class_entry;
-zend_class_entry *ws_message_class_entry;
-zend_class_entry *ws_var_class_entry;
-zend_class_entry *ws_client_proxy_class_entry;
+extern zend_class_entry *ws_client_class_entry;
+extern zend_class_entry *ws_service_class_entry;
+extern zend_class_entry *ws_header_class_entry;
+extern zend_class_entry *ws_param_class_entry;
+extern zend_class_entry *ws_fault_class_entry;
+extern zend_class_entry *ws_message_class_entry;
+extern zend_class_entry *ws_var_class_entry;
+extern zend_class_entry *ws_client_proxy_class_entry;
+
+extern wsf_worker_t* worker;
ZEND_BEGIN_MODULE_GLOBALS(wsf)
long enable_trace;
More information about the Wsf-c-dev
mailing list