[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] cvs: pecl /axis2 axis2.c axis2_ce.h axis2_fe.h php_axis2.h
From:       "Nabeel Yoosuf" <nabeel () php ! net>
Date:       2006-04-30 1:11:25
Message-ID: cvsnabeel1146359485 () cvsserver
[Download RAW message or body]

nabeel		Sun Apr 30 01:11:25 2006 UTC

  Modified files:              
    /pecl/axis2	axis2_ce.h axis2_fe.h axis2.c php_axis2.h 
  Log:
  - add new class Axis2Constant to keep all the constants used
  - fix a bug axis2_php_objects_types_t ordering
  - add function entries and class entries for Axis2Constant and ServiceClient
  - include libxml to handle domDocument  and SimpleXMLElement objects
  - include DOM extension
  - move serialization methods to axis2.c
  
  
  
http://cvs.php.net/viewcvs.cgi/pecl/axis2/axis2_ce.h?r1=1.3&r2=1.4&diff_format=u
Index: pecl/axis2/axis2_ce.h
diff -u pecl/axis2/axis2_ce.h:1.3 pecl/axis2/axis2_ce.h:1.4
--- pecl/axis2/axis2_ce.h:1.3	Sat Apr  1 10:50:35 2006
+++ pecl/axis2/axis2_ce.h	Sun Apr 30 01:11:25 2006
@@ -61,6 +61,7 @@
 
 /** client */
 zend_class_entry *axis2_soap_client_class_entry;
+zend_class_entry *axis2_service_client_class_entry;
 
 /** server */
 zend_class_entry *axis2_soap_server_class_entry;
@@ -71,4 +72,5 @@
 
 zend_class_entry *axis2_fault_class_entry;
 
+zend_class_entry *axis2_constants_class_entry;
 #endif /* AXIS2_CE_H */
http://cvs.php.net/viewcvs.cgi/pecl/axis2/axis2_fe.h?r1=1.4&r2=1.5&diff_format=u
Index: pecl/axis2/axis2_fe.h
diff -u pecl/axis2/axis2_fe.h:1.4 pecl/axis2/axis2_fe.h:1.5
--- pecl/axis2/axis2_fe.h:1.4	Fri Apr  7 13:53:15 2006
+++ pecl/axis2/axis2_fe.h	Sun Apr 30 01:11:25 2006
@@ -66,12 +66,15 @@
 
 /** client */
 extern zend_function_entry php_axis2_soap_client_class_functions[];
+extern zend_function_entry php_axis2_service_client_class_functions[];
 
 /** server */
 extern zend_function_entry php_axis2_soap_server_class_functions[];
 
 extern zend_function_entry php_axis2_fault_class_functions[];
 
+extern zend_function_entry php_axis2_constants_class_functions[];
+
 /** axis2 om namespace */
 PHP_METHOD(axis2_om_namespace, __construct);
 PHP_FUNCTION(axis2_om_namespace_equals);
@@ -260,6 +263,18 @@
 PHP_FUNCTION(axis2_soap_client_get_response_soap);
 PHP_FUNCTION(axis2_soap_client_get_response_soap_text);
 
+/** ServiceClient functions */
+PHP_METHOD(axis2_service_client, __construct);
+PHP_FUNCTION(axis2_service_client_send_receive);
+PHP_FUNCTION(axis2_service_client_send_receive_dom);
+PHP_FUNCTION(axis2_service_client_send_receive_simple_xml);
+PHP_FUNCTION(axis2_service_client_add_header);
+PHP_FUNCTION(axis2_service_client_add_header_dom);
+PHP_FUNCTION(axis2_service_client_add_header_simple_xml);
+PHP_FUNCTION(axis2_service_client_set_option);
+PHP_FUNCTION(axis2_service_client_engage_module);
+PHP_FUNCTION(axis2_service_client_disengage_module);
+
 /** Axis2Param functions */
 PHP_METHOD(axis2_param, __construct);
 PHP_FUNCTION(axis2_param_get_name);
http://cvs.php.net/viewcvs.cgi/pecl/axis2/axis2.c?r1=1.4&r2=1.5&diff_format=u
Index: pecl/axis2/axis2.c
diff -u pecl/axis2/axis2.c:1.4 pecl/axis2/axis2.c:1.5
--- pecl/axis2/axis2.c:1.4	Fri Apr  7 13:53:15 2006
+++ pecl/axis2/axis2.c	Sun Apr 30 01:11:25 2006
@@ -57,6 +57,11 @@
 };
 /* }}} */
 
+zend_function_entry php_axis2_constants_functions[] =
+{
+	{NULL, NULL, NULL}
+};
+
 /* {{{ axis2_module_entry
  */
 zend_module_entry axis2_module_entry = {
@@ -168,8 +173,12 @@
 	REGISTER_AXIS2_CLASS(ce, "Axis2OMDocType", axis2_om_node_class_entry,
 		php_axis2_om_doctype_class_functions, axis2_om_doctype_class_entry);
 		
-	REGISTER_AXIS2_CLASS(ce, "Axis2ServiceClient", NULL,
+	/*REGISTER_AXIS2_CLASS(ce, "Axis2ServiceClient", NULL,
 		php_axis2_soap_client_class_functions, axis2_soap_client_class_entry);
+	*/
+	
+	REGISTER_AXIS2_CLASS(ce, "ServiceClient", NULL,
+		php_axis2_service_client_class_functions, axis2_service_client_class_entry);
 		
 	REGISTER_AXIS2_CLASS(ce, "Axis2Param", NULL,
 		php_axis2_param_class_functions, axis2_param_class_entry);
@@ -225,7 +234,24 @@
 		
 	REGISTER_AXIS2_CLASS(ce, "Axis2Fault", zend_exception_get_default(),
 		php_axis2_fault_class_functions, axis2_fault_class_entry);
+	
+	REGISTER_AXIS2_CLASS(ce, "Axis2Constants", NULL,
+		php_axis2_constants_functions, axis2_constants_class_entry);
 
+	zend_declare_class_constant_long(axis2_constants_class_entry,
+		"SOAP_11", sizeof("SOAP_11")-1, AXIS2_PHP_SOAP_11 TSRMLS_CC);
+	zend_declare_class_constant_long(axis2_constants_class_entry,
+		"SOAP_12", sizeof("SOAP_12")-1, AXIS2_PHP_SOAP_12 TSRMLS_CC);
+	zend_declare_class_constant_string(axis2_constants_class_entry,
+		"SOAP_VERSION", sizeof("SOAP_VERSION")-1, AXIS2_PHP_SOAP_VERSION TSRMLS_CC);
+	
+	zend_declare_class_constant_string(axis2_constants_class_entry, 
+		"ADDR_ACTION", sizeof("ADDR_ACTION")-1, AXIS2_PHP_ADDR_ACTION TSRMLS_CC);
+		
+	/* modules */
+	zend_declare_class_constant_string(axis2_constants_class_entry,
+		"MODULE_ADDRESSING", sizeof("MODULE_ADDRESSING")-1, 
+		AXIS2_PHP_MODULE_ADDRESSING TSRMLS_CC);
 	
 	/* input choices */
 	REGISTER_LONG_CONSTANT("AXIS2_PHP_ENCODED", AXIS2_PHP_ENCODED, 
@@ -603,8 +629,28 @@
 }
 /* }}} serialize_om */
 
+/* {{{ serialize_om_to_doc
+	convert an om node into xmlDoc
+	*/
+xmlDocPtr serialize_om_to_doc(axis2_env_t **env, axis2_om_node_t *ret_node)
+{
+	axis2_xml_writer_t *writer = NULL;
+	axis2_om_output_t *om_output = NULL;
+	xmlDocPtr doc = NULL;
+	
+	TSRMLS_FETCH();
+	
+	writer = axis2_xml_writer_create_for_xml_doc(env, NULL, AXIS2_TRUE, 0);
+	om_output = axis2_om_output_create (env, writer);
 
-/* }}} */
+	AXIS2_OM_NODE_SERIALIZE (ret_node, env, om_output);
+	doc = AXIS2_XML_WRITER_GET_XML(writer, env);
+    
+	return doc;
+}
+/* }}} serialize_om_to_doc */
+
+/*}}}*/
 /* The previous line is meant for vim and emacs, so it can correctly fold and 
    unfold functions in source code. See the corresponding marks just before 
    function definition, where the functions purpose is also documented. Please 
http://cvs.php.net/viewcvs.cgi/pecl/axis2/php_axis2.h?r1=1.4&r2=1.5&diff_format=u
Index: pecl/axis2/php_axis2.h
diff -u pecl/axis2/php_axis2.h:1.4 pecl/axis2/php_axis2.h:1.5
--- pecl/axis2/php_axis2.h:1.4	Fri Apr  7 13:53:15 2006
+++ pecl/axis2/php_axis2.h	Sun Apr 30 01:11:25 2006
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_axis2.h,v 1.4 2006/04/07 13:53:15 nabeel Exp $ */
+/* $Id: php_axis2.h,v 1.5 2006/04/30 01:11:25 nabeel Exp $ */
 
 #ifndef PHP_AXIS2_H
 #define PHP_AXIS2_H
@@ -42,6 +42,17 @@
 
 #include <axis2_callback.h> /* TODO:temp*/
 
+#if HAVE_LIBXML
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlsave.h>
+#endif
+#include "ext/libxml/php_libxml.h"
+#include "ext/dom/xml_common.h"
+
 PHP_MINIT_FUNCTION(axis2);
 PHP_MSHUTDOWN_FUNCTION(axis2);
 PHP_RINIT_FUNCTION(axis2);
@@ -69,12 +80,13 @@
     PHP_AXIS2_OM_NAMESPACE = AXIS2_OM_NAMESPACE,
     PHP_AXIS2_OM_ATTRIBUTE = AXIS2_OM_ATTRIBUTE,
     PHP_AXIS2_OM_ELEMENT   = AXIS2_OM_ELEMENT,
-    PHP_AXIS2_OM_TEXT      = AXIS2_OM_TEXT,
     PHP_AXIS2_OM_COMMENT   = AXIS2_OM_COMMENT,
     PHP_AXIS2_OM_PI = AXIS2_OM_PROCESSING_INSTRUCTION,
 	PHP_AXIS2_OM_DOCUMENT = AXIS2_OM_DOCUMENT,
 	PHP_AXIS2_OM_DOCTYPE = AXIS2_OM_DOCTYPE,
-
+	PHP_AXIS2_OM_TEXT      = AXIS2_OM_TEXT, /* this should be equal to the last
+	element in axis2_om_node.h enum entry */
+	
     PHP_AXIS2_OM_NODE,
     PHP_AXIS2_QNAME ,
     PHP_AXIS2_XML_READER,
@@ -123,7 +135,7 @@
 
 
 /* addressing specific properties */
-#define AXIS2_PHP_ACTION	"action"
+#define AXIS2_PHP_ADDR_ACTION	"ADDR_ACTION"
 #define AXIS2_PHP_FAULT_TO	"fault_to"
 #define AXIS2_PHP_FROM	"from"
 #define AXIS2_PHP_TRANSPORT_IN_PROTOCOL	"transport_in_protocol"
@@ -134,6 +146,8 @@
 #define AXIS2_PHP_SENDER_TRANSPORT_PROTOCOL	"sender_transport_protocol"
 #define AXIS2_PHP_TO	"to"
 
+#define AXIS2_PHP_MODULE_ADDRESSING "MODULE_ADDRESSING"
+
 /*TODO: implement following objects if necessary*/
 /*TRANSPORT_LISTNER
 TRANSPORT_IN_DESCRIPTION
@@ -166,6 +180,7 @@
 static void init_encoding_arr(TSRMLS_D);
 static void init_decoding_arr(TSRMLS_D);
 char* serialize_om(axis2_env_t **env, axis2_om_node_t *ret_node);
+xmlDocPtr serialize_om_to_doc(axis2_env_t **env, axis2_om_node_t *ret_node);
 
 ZEND_BEGIN_MODULE_GLOBALS(axis2)
     char *global_string;

-- 
PECL CVS Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic