Re: [AXIS2] PHP extension for axis2 [ starting with om]

2005-12-03 Thread Samisa Abeysinghe

nandika jayawardana wrote:


Hi all,

I have started writing a php extension for axis2c starting with om.

For that I have added axis2_xml_reader api in this extension.
Lot has to be done before everything in axis2 is supported.

Pls commit this code.
I think we can put it in a folder named c/bindings/php .


I would like to propose that we place this OM integration code in 
c/bindings/php/axiom. This way this extention can live inside ext/axiom 
folder once it is integrated to the php source tree. Once we have the 
engine implemented in C, the php binding should go in ext/axis2 IMHO.


Thanks,
Samisa...



Thanks
nandika



#ifndef AXIS2_CE_H
#define AXIS2_CE_H

zend_class_entry *axis2_xml_reader_class_entry;
zend_class_entry *axis2_xml_writer_class_entry;
zend_class_entry *axis2_om_element_class_entry;
zend_class_entry *axis2_om_comment_class_entry;
zend_class_entry *axis2_om_text_class_entry;
zend_class_entry *axis2_om_pi_entry;
zend_class_entry *axis2_om_stax_builder_class_entry;
zend_class_entry *axis2_om_document_class_entry;
zend_class_entry *axis2_om_attribute_class_entry;
zend_class_entry *axis2_om_namespace_class_entry;


#endif /* AXIS2_CE_H */



#ifndef AXIS2_PROPERTIES_H
#define AXIS2_PROPERTIES_H

#endif /* AXIS2_PROPERTIES_H */



/*
 +--+
 | PHP Version 5|
 +--+
 | Copyright (c) 1997-2004 The PHP Group|
 +--+
 | This source file is subject to version 3.0 of the PHP license,   |
 | that is bundled with this package in the file LICENSE, and is|
 | available through the world-wide-web at the following url:   |
 | http://www.php.net/license/3_0.txt.  |
 | If you did not receive a copy of the PHP license and are unable to   |
 | obtain it through the world-wide-web, please send a note to  |
 | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
 +--+
 | Author:  |
 +--+
*/

/* $Id: header,v 1.15 2004/01/08 16:46:52 sniper Exp $ */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_axis2.h"
#include "axis2_env.h"
#include "axis2_error_default.h"
#include "axis2_stream_default.h"
#include "axis2_log_default.h"


zend_object_value axis2_objects_new(zend_class_entry *class_type TSRMLS_DC );



/* If you declare any globals in php_axis2.h uncomment this:
*/
ZEND_DECLARE_MODULE_GLOBALS(axis2)


/* True global resources - no need for thread safety here */
static int le_axis2;

static zend_object_handlers axis2_object_handlers;

/* {{{ axis2_functions[]
*
* Every user visible function must have an entry in axis2_functions[].
*/
function_entry axis2_functions[] = {
PHP_FE(axis2_helloworld,NULL)   
{NULL, NULL, NULL}  /* Must be the last line in axis2_functions[] */
};
/* }}} */

/* {{{ axis2_module_entry
*/
zend_module_entry axis2_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"axis2",
axis2_functions,
PHP_MINIT(axis2),
PHP_MSHUTDOWN(axis2),
PHP_RINIT(axis2),   /* Replace with NULL if there's nothing 
to do at request start */
PHP_RSHUTDOWN(axis2),   /* Replace with NULL if there's nothing to do 
at request end */
PHP_MINFO(axis2),
#if ZEND_MODULE_API_NO >= 20010901
"0.1", /* Replace with version number for your extension */
#endif
STANDARD_MODULE_PROPERTIES
};
/* }}} */

#ifdef COMPILE_DL_AXIS2
ZEND_GET_MODULE(axis2)
#endif

/* {{{ PHP_INI
*/
/* Remove comments and fill if you need to have entries in php.ini
PHP_INI_BEGIN()
   STD_PHP_INI_ENTRY("axis2.global_value",  "42", PHP_INI_ALL, 
OnUpdateLong, global_value, zend_axis2_globals, axis2_globals)
   STD_PHP_INI_ENTRY("axis2.global_string", "foobar", PHP_INI_ALL, 
OnUpdateString, global_string, zend_axis2_globals, axis2_globals)
PHP_INI_END()
*/
/* }}} */

/* {{{ php_axis2_init_globals
*/

static void php_axis2_init_globals(zend_axis2_globals *axis2_globals)
{
   axis2_allocator_t *allocator = NULL;
   axis2_error_t *err = NULL;
   axis2_log_t *log = NULL;
   axis2_stream_t *stream = NULL;
   axis2_env_t *environment = NULL;
   allocator = axis2_allocator_init (NULL);
   log = axis2_log_create(allocator, NULL);
   stream = axis2_stream

[AXIS2] PHP extension for axis2 - automake/autoconf problems

2005-12-03 Thread Samisa Abeysinghe

I have been looking into getting this PHP binding code working on Linux.
The PHP source depends on autoconf-2.13 and automake-1.5.

Our build system is based on autoconf-2.59 and automake-1.9

This is a problem when it comes to working on both axis2c and PHP 
extentions on the same machine :(


Thanks,
Samisa...

nandika jayawardana wrote:


Hi all,

I have started writing a php extension for axis2c starting with om.

For that I have added axis2_xml_reader api in this extension.
Lot has to be done before everything in axis2 is supported.

Pls commit this code.
I think we can put it in a folder named c/bindings/php .

Thanks
nandika



#ifndef AXIS2_CE_H
#define AXIS2_CE_H

zend_class_entry *axis2_xml_reader_class_entry;
zend_class_entry *axis2_xml_writer_class_entry;
zend_class_entry *axis2_om_element_class_entry;
zend_class_entry *axis2_om_comment_class_entry;
zend_class_entry *axis2_om_text_class_entry;
zend_class_entry *axis2_om_pi_entry;
zend_class_entry *axis2_om_stax_builder_class_entry;
zend_class_entry *axis2_om_document_class_entry;
zend_class_entry *axis2_om_attribute_class_entry;
zend_class_entry *axis2_om_namespace_class_entry;


#endif /* AXIS2_CE_H */



#ifndef AXIS2_PROPERTIES_H
#define AXIS2_PROPERTIES_H

#endif /* AXIS2_PROPERTIES_H */



/*
 +--+
 | PHP Version 5|
 +--+
 | Copyright (c) 1997-2004 The PHP Group|
 +--+
 | This source file is subject to version 3.0 of the PHP license,   |
 | that is bundled with this package in the file LICENSE, and is|
 | available through the world-wide-web at the following url:   |
 | http://www.php.net/license/3_0.txt.  |
 | If you did not receive a copy of the PHP license and are unable to   |
 | obtain it through the world-wide-web, please send a note to  |
 | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
 +--+
 | Author:  |
 +--+
*/

/* $Id: header,v 1.15 2004/01/08 16:46:52 sniper Exp $ */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_axis2.h"
#include "axis2_env.h"
#include "axis2_error_default.h"
#include "axis2_stream_default.h"
#include "axis2_log_default.h"


zend_object_value axis2_objects_new(zend_class_entry *class_type TSRMLS_DC );



/* If you declare any globals in php_axis2.h uncomment this:
*/
ZEND_DECLARE_MODULE_GLOBALS(axis2)


/* True global resources - no need for thread safety here */
static int le_axis2;

static zend_object_handlers axis2_object_handlers;

/* {{{ axis2_functions[]
*
* Every user visible function must have an entry in axis2_functions[].
*/
function_entry axis2_functions[] = {
PHP_FE(axis2_helloworld,NULL)   
{NULL, NULL, NULL}  /* Must be the last line in axis2_functions[] */
};
/* }}} */

/* {{{ axis2_module_entry
*/
zend_module_entry axis2_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"axis2",
axis2_functions,
PHP_MINIT(axis2),
PHP_MSHUTDOWN(axis2),
PHP_RINIT(axis2),   /* Replace with NULL if there's nothing 
to do at request start */
PHP_RSHUTDOWN(axis2),   /* Replace with NULL if there's nothing to do 
at request end */
PHP_MINFO(axis2),
#if ZEND_MODULE_API_NO >= 20010901
"0.1", /* Replace with version number for your extension */
#endif
STANDARD_MODULE_PROPERTIES
};
/* }}} */

#ifdef COMPILE_DL_AXIS2
ZEND_GET_MODULE(axis2)
#endif

/* {{{ PHP_INI
*/
/* Remove comments and fill if you need to have entries in php.ini
PHP_INI_BEGIN()
   STD_PHP_INI_ENTRY("axis2.global_value",  "42", PHP_INI_ALL, 
OnUpdateLong, global_value, zend_axis2_globals, axis2_globals)
   STD_PHP_INI_ENTRY("axis2.global_string", "foobar", PHP_INI_ALL, 
OnUpdateString, global_string, zend_axis2_globals, axis2_globals)
PHP_INI_END()
*/
/* }}} */

/* {{{ php_axis2_init_globals
*/

static void php_axis2_init_globals(zend_axis2_globals *axis2_globals)
{
   axis2_allocator_t *allocator = NULL;
   axis2_error_t *err = NULL;
   axis2_log_t *log = NULL;
   axis2_stream_t *stream = NULL;
   axis2_env_t *environment = NULL;
   allocator = axis2_allocator_init (NULL);
   log = axis2_log_create(allocator, NULL);
   stream = ax