You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2007/03/29 18:40:16 UTC
svn commit: r523763 - in /webservices/axis2/trunk/c: axiom/include/
axiom/src/om/ axiom/src/parser/libxml2/
modules/core/transport/http/receiver/ modules/core/transport/http/sender/
modules/core/transport/http/sender/ssl/ modules/core/transport/http/se...
Author: samisa
Date: Thu Mar 29 09:40:14 2007
New Revision: 523763
URL: http://svn.apache.org/viewvc?view=rev&rev=523763
Log:
Removed ops and also removed some printfs
Modified:
webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h
webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c
webservices/axis2/trunk/c/axiom/src/om/om_element.c
webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_receiver.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/ssl/ssl_utils.c
webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c
webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c
webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c
webservices/axis2/trunk/c/util/src/platforms/windows/date_time_util_windows.c
webservices/axis2/trunk/c/util/src/platforms/windows/uuid_gen_windows.c
Modified: webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_child_element_iterator.h Thu Mar 29 09:40:14 2007
@@ -32,7 +32,6 @@
{
#endif
- typedef struct axiom_child_element_iterator_ops axiom_child_element_iterator_ops_t;
typedef struct axiom_child_element_iterator axiom_child_element_iterator_t;
/**
@@ -41,52 +40,38 @@
* @{
*/
+ AXIS2_EXTERN void AXIS2_CALL
+ axiom_child_element_iterator_free(void *iterator,
+ const axis2_env_t *env);
+
+ /**
+ * Removes from the underlying collection the last element returned by the
+ * iterator (optional op). This method can be called only once per
+ * call to <tt>next</tt>. The behavior of an iterator is unspecified if
+ * the underlying collection is modified while the iteration is in
+ * progress in any way other than by calling this method.
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axiom_child_element_iterator_remove(axiom_child_element_iterator_t *iterator,
+ const axis2_env_t *env);
+
/**
- * \brief axiom_child_element_iterator ops
- * Encapsulator struct for ops of axiom_iterator
+ * returns true if the iteration has more elements
+ * in otherwords it returns true if the next() would return an element
+ * rather than null with an error code set to environments error
*/
- struct axiom_child_element_iterator_ops
- {
- void (AXIS2_CALL *free_fn)
- (void *iterator,
- const axis2_env_t *env);
-
- /**
- * Removes from the underlying collection the last element returned by the
- * iterator (optional op). This method can be called only once per
- * call to <tt>next</tt>. The behavior of an iterator is unspecified if
- * the underlying collection is modified while the iteration is in
- * progress in any way other than by calling this method.
- */
- axis2_status_t(AXIS2_CALL *
- remove)(axiom_child_element_iterator_t *iterator,
- const axis2_env_t *env);
-
- /**
- * returns true if the iteration has more elements
- * in otherwords it returns true if the next() would return an element
- * rather than null with an error code set to environments error
- */
- axis2_bool_t(AXIS2_CALL *
- has_next)(axiom_child_element_iterator_t *iterator,
- const axis2_env_t *env);
-
- /**
- * Returns the next element in the iteration. Returns null if there
- * is no more elements
- */
- axiom_node_t*(AXIS2_CALL *
- next)(axiom_child_element_iterator_t *iterator,
- const axis2_env_t *env);
- };
-
-
- struct axiom_child_element_iterator
- {
- axiom_child_element_iterator_ops_t *ops;
- };
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axiom_child_element_iterator_has_next(axiom_child_element_iterator_t *iterator,
+ const axis2_env_t *env);
/**
+ * Returns the next element in the iteration. Returns null if there
+ * is no more elements
+ */
+ AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+ axiom_child_element_iterator_next(axiom_child_element_iterator_t *iterator,
+ const axis2_env_t *env);
+ /**
* @param current child
* @param env environment
* return axiom_child_element_iterator_t
@@ -97,16 +82,16 @@
axiom_node_t *current_child);
#define AXIOM_CHILD_ELEMENT_ITERATOR_FREE(iterator, env) \
- (((axiom_child_element_iterator_t *) iterator)->ops->free_fn(iterator, env))
+ axiom_child_element_iterator_free(iterator, env)
#define AXIOM_CHILD_ELEMENT_ITERATOR_REMOVE(iterator, env) \
- ((iterator)->ops->remove(iterator, env))
+ axiom_child_element_iterator_remove(iterator, env)
#define AXIOM_CHILD_ELEMENT_ITERATOR_HAS_NEXT(iterator, env) \
- ((iterator)->ops->has_next(iterator, env))
+ axiom_child_element_iterator_has_next(iterator, env)
#define AXIOM_CHILD_ELEMENT_ITERATOR_NEXT(iterator, env) \
- ((iterator)->ops->next(iterator, env))
+ axiom_child_element_iterator_next(iterator, env)
/** @} */
Modified: webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c Thu Mar 29 09:40:14 2007
@@ -17,172 +17,107 @@
#include <axiom_child_element_iterator.h>
-void AXIS2_CALL
-axiom_child_element_iterator_free(void *iterator,
- const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axiom_child_element_iterator_remove
-(axiom_child_element_iterator_t *iterator,
- const axis2_env_t *env);
-
-axis2_bool_t AXIS2_CALL
-axiom_child_element_iterator_has_next
-(axiom_child_element_iterator_t *iterator,
- const axis2_env_t *env);
-
-axiom_node_t* AXIS2_CALL
-axiom_child_element_iterator_next
-(axiom_child_element_iterator_t *iterator,
- const axis2_env_t *env);
-
-/*************** end function prototypes **********************************/
-
-typedef struct axiom_child_element_iterator_impl_t
+struct axiom_child_element_iterator
{
- axiom_child_element_iterator_t iterator;
axiom_node_t *current_child;
axiom_node_t *last_child;
axis2_bool_t next_called;
axis2_bool_t remove_called;
-}
-axiom_child_element_iterator_impl_t;
-
-/***************** end impl struct ****************************************/
-
-#define AXIS2_INTF_TO_IMPL(iterator) \
- ((axiom_child_element_iterator_impl_t *)iterator)
-
-/**************** end macro ***********************************************/
-
-
+};
AXIS2_EXTERN axiom_child_element_iterator_t * AXIS2_CALL
axiom_child_element_iterator_create(const axis2_env_t *env,
axiom_node_t *current_child)
{
- axiom_child_element_iterator_impl_t *iterator_impl = NULL;
+ axiom_child_element_iterator_t *iterator = NULL;
AXIS2_ENV_CHECK(env, NULL);
- iterator_impl = (axiom_child_element_iterator_impl_t *)AXIS2_MALLOC(
+ iterator = (axiom_child_element_iterator_t *)AXIS2_MALLOC(
env->allocator,
- sizeof(axiom_child_element_iterator_impl_t));
+ sizeof(axiom_child_element_iterator_t));
- if (!iterator_impl)
+ if (!iterator)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- iterator_impl->current_child = NULL;
- iterator_impl->last_child = NULL;
-
- iterator_impl->next_called = AXIS2_FALSE;
- iterator_impl->remove_called = AXIS2_FALSE;
-
- iterator_impl->iterator.ops = NULL;
- iterator_impl->iterator.ops =
- (axiom_child_element_iterator_ops_t*)AXIS2_MALLOC(env->allocator,
- sizeof(axiom_child_element_iterator_ops_t));
+ iterator->current_child = current_child;
+ iterator->last_child = NULL;
- if (!(iterator_impl->iterator.ops))
- {
- AXIOM_CHILD_ELEMENT_ITERATOR_FREE(&(iterator_impl->iterator), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
+ iterator->next_called = AXIS2_FALSE;
+ iterator->remove_called = AXIS2_FALSE;
- iterator_impl->current_child = current_child;
- iterator_impl->iterator.ops->free_fn =
- axiom_child_element_iterator_free;
- iterator_impl->iterator.ops->remove =
- axiom_child_element_iterator_remove;
- iterator_impl->iterator.ops->has_next =
- axiom_child_element_iterator_has_next;
- iterator_impl->iterator.ops->next =
- axiom_child_element_iterator_next;
- return &(iterator_impl->iterator);
+ return iterator;
}
-void AXIS2_CALL
+AXIS2_EXTERN void AXIS2_CALL
axiom_child_element_iterator_free
(void *iterator,
const axis2_env_t *env)
{
- axiom_child_element_iterator_impl_t *iterator_impl = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- iterator_impl = AXIS2_INTF_TO_IMPL(iterator);
- if (iterator_impl->iterator.ops)
- AXIS2_FREE(env->allocator, iterator_impl->iterator.ops);
-
- AXIS2_FREE(env->allocator, iterator_impl);
+ AXIS2_FREE(env->allocator, iterator);
return;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_child_element_iterator_remove
(axiom_child_element_iterator_t *iterator,
const axis2_env_t *env)
{
axiom_node_t *last_child = NULL;
- axiom_child_element_iterator_impl_t *iterator_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- iterator_impl = AXIS2_INTF_TO_IMPL(iterator);
- if (!(iterator_impl->next_called))
+ if (!(iterator->next_called))
return AXIS2_FAILURE;
- if (iterator_impl->remove_called)
+ if (iterator->remove_called)
return AXIS2_FAILURE;
- iterator_impl->remove_called = AXIS2_TRUE;
+ iterator->remove_called = AXIS2_TRUE;
- if (!(iterator_impl->last_child))
+ if (!(iterator->last_child))
return AXIS2_FAILURE;
- last_child = AXIOM_NODE_DETACH(iterator_impl->last_child, env);
+ last_child = AXIOM_NODE_DETACH(iterator->last_child, env);
AXIOM_NODE_FREE_TREE(last_child, env);
return AXIS2_SUCCESS;
}
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
axiom_child_element_iterator_has_next
(axiom_child_element_iterator_t *iterator,
const axis2_env_t *env)
{
- axiom_child_element_iterator_impl_t *iterator_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- iterator_impl = AXIS2_INTF_TO_IMPL(iterator);
- return (iterator_impl->current_child) ? AXIS2_TRUE : AXIS2_FALSE;
+ return (iterator->current_child) ? AXIS2_TRUE : AXIS2_FALSE;
}
-axiom_node_t* AXIS2_CALL
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
axiom_child_element_iterator_next
(axiom_child_element_iterator_t *iterator,
const axis2_env_t *env)
{
- axiom_child_element_iterator_impl_t *iterator_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- iterator_impl = AXIS2_INTF_TO_IMPL(iterator);
- iterator_impl->next_called = AXIS2_TRUE;
- iterator_impl->remove_called = AXIS2_FALSE;
- if (iterator_impl->current_child)
+ iterator->next_called = AXIS2_TRUE;
+ iterator->remove_called = AXIS2_FALSE;
+ if (iterator->current_child)
{
- iterator_impl->last_child = iterator_impl->current_child;
+ iterator->last_child = iterator->current_child;
do
{
- iterator_impl->current_child = AXIOM_NODE_GET_NEXT_SIBLING(
- iterator_impl->current_child, env);
+ iterator->current_child = AXIOM_NODE_GET_NEXT_SIBLING(
+ iterator->current_child, env);
}
- while (iterator_impl->current_child &&
- (AXIOM_NODE_GET_NODE_TYPE(iterator_impl->current_child, env)
+ while (iterator->current_child &&
+ (AXIOM_NODE_GET_NODE_TYPE(iterator->current_child, env)
!= AXIOM_ELEMENT));
- return iterator_impl->last_child;
+ return iterator->last_child;
}
return NULL;
}
Modified: webservices/axis2/trunk/c/axiom/src/om/om_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_element.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_element.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_element.c Thu Mar 29 09:40:14 2007
@@ -296,13 +296,6 @@
found_uri = axiom_namespace_get_uri(found_ns, env);
- /* TODO fix this
- if( ( found_uri) && axis2_strcmp(found_uri, uri) == 0)
- {
- printf("\n furi %s real uri %s %s\n ", found_uri, uri, prefix);
- return found_ns;
- }
- */
return found_ns;
}
}
Modified: webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c Thu Mar 29 09:40:14 2007
@@ -1105,7 +1105,6 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, name, AXIS2_FAILURE);
- printf("axis2_libxml2_writer_wrapper_write_entity_ref not implemented\n");
return AXIS2_FAILURE;
}
@@ -1272,7 +1271,6 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, text, AXIS2_FAILURE);
writer_impl = AXIS2_INTF_TO_IMPL(writer);
- printf("axis2_libxml2_writer_wrapper_write_encoded not implemented\n");
return AXIS2_FAILURE;
}
@@ -1294,7 +1292,7 @@
}
else if (writer_impl->writer_type == AXIS2_XML_PARSER_TYPE_FILE)
{
- printf("axis2_libxml2_writer_wrapper_get_xml does not support file writer\n");
+ return NULL;
}
return NULL;
Modified: webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_receiver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_receiver.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_receiver.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_receiver.c Thu Mar 29 09:40:14 2007
@@ -320,7 +320,6 @@
*inst = axis2_http_server_create(env, NULL, -1);
if (!(*inst))
{
- printf("transport receiver load not success\n");
return AXIS2_FAILURE;
}
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Thu Mar 29 09:40:14 2007
@@ -644,7 +644,6 @@
*inst = axis2_http_transport_sender_create(env);
if (!(*inst))
{
- printf("transport sender load not success\n");
return AXIS2_FAILURE;
}
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/ssl/ssl_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/ssl/ssl_utils.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/ssl/ssl_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/ssl/ssl_utils.c Thu Mar 29 09:40:14 2007
@@ -26,7 +26,6 @@
{
strncpy(buf, (char *)passwd, size);
buf[size-1] = '\0';
- /*printf("ssl_passphrase:%s", buf);*/
return(strlen(buf));
}
@@ -44,18 +43,6 @@
/*axis2_char_t *key_file = NULL;*/
AXIS2_ENV_CHECK(env, NULL);
-
- /*TODO getenv */
- /*if (server_cert)
- ca_file = server_cert;
- else
- ca_file = AXIS2_GETENV("AXIS2_SSL_CA_FILE");
-
- key_file = AXIS2_GETENV("AXIS2_SSL_KEY_FILE");
- */
-
- /*printf("key_file: %s\n", key_file);
- printf("ca_file: %s\n", server_cert);*/
if (! ca_file)
{
Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c Thu Mar 29 09:40:14 2007
@@ -143,7 +143,6 @@
if (! allocator)
{
- printf("[Axis2]Startup FAILED due to memory allocation failure\n");
system_exit(NULL, -1);
}
Modified: webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c Thu Mar 29 09:40:14 2007
@@ -72,7 +72,6 @@
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_LOG_INFO(env->log, "Starting logging in handler .........");
- printf("\n\nStarting logging in handler .........\n\n");
soap_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
@@ -88,7 +87,6 @@
if(om_str)
{
AXIS2_LOG_INFO(env->log, "Input msg: %s", om_str);
- printf("Input msg: %s", om_str);
}
}
}
Modified: webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c Thu Mar 29 09:40:14 2007
@@ -72,7 +72,6 @@
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_LOG_INFO(env->log, "Starting logging out handler .........");
- printf("\n\nStarting logging out handler .........\n\n");
soap_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
@@ -87,7 +86,6 @@
if(om_str)
{
AXIS2_LOG_INFO(env->log, "Output msg: %s", om_str);
- printf("Output msg: %s", om_str);
}
}
}
Modified: webservices/axis2/trunk/c/util/src/platforms/windows/date_time_util_windows.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/platforms/windows/date_time_util_windows.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/util/src/platforms/windows/date_time_util_windows.c (original)
+++ webservices/axis2/trunk/c/util/src/platforms/windows/date_time_util_windows.c Thu Mar 29 09:40:14 2007
@@ -28,6 +28,4 @@
milliseconds = timebuffer.millitm;
return milliseconds;
-
-/* printf( "The time is %.19s.%hu %s", timeline, timebuffer.millitm, &timeline[20] );*/
}
Modified: webservices/axis2/trunk/c/util/src/platforms/windows/uuid_gen_windows.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/platforms/windows/uuid_gen_windows.c?view=diff&rev=523763&r1=523762&r2=523763
==============================================================================
--- webservices/axis2/trunk/c/util/src/platforms/windows/uuid_gen_windows.c (original)
+++ webservices/axis2/trunk/c/util/src/platforms/windows/uuid_gen_windows.c Thu Mar 29 09:40:14 2007
@@ -40,7 +40,6 @@
printf("warning - unique within computer \n");
else if (retval == RPC_S_UUID_NO_ADDRESS)
{
- printf("error\n");
return NULL;
}
@@ -52,7 +51,6 @@
}
else if (retval == RPC_S_OUT_OF_MEMORY)
{
- printf("system is out of memory \n");
return NULL;
}
return retstr;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org