You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sh...@apache.org on 2009/09/09 13:33:32 UTC
svn commit: r812891 - in /webservices/axis2/trunk/c/axiom:
include/axiom_util.h src/util/om_util.c
Author: shankar
Date: Wed Sep 9 11:33:32 2009
New Revision: 812891
URL: http://svn.apache.org/viewvc?rev=812891&view=rev
Log:
removing duplicate method added recently
Modified:
webservices/axis2/trunk/c/axiom/include/axiom_util.h
webservices/axis2/trunk/c/axiom/src/util/om_util.c
Modified: webservices/axis2/trunk/c/axiom/include/axiom_util.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_util.h?rev=812891&r1=812890&r2=812891&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_util.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_util.h Wed Sep 9 11:33:32 2009
@@ -390,18 +390,6 @@
const axutil_env_t *env,
axiom_node_t *node);
- /**
- * Creates a node from given string
- * @param env environment, MUST not be NULL
- * @param buffer
- * @return node created from string
- */
- AXIS2_EXTERN axiom_node_t *AXIS2_CALL
- axiom_util_string_to_node(
- const axutil_env_t *env,
- axis2_char_t* buffer);
-
-
#ifdef __cplusplus
}
#endif
Modified: webservices/axis2/trunk/c/axiom/src/util/om_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/util/om_util.c?rev=812891&r1=812890&r2=812891&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/util/om_util.c (original)
+++ webservices/axis2/trunk/c/axiom/src/util/om_util.c Wed Sep 9 11:33:32 2009
@@ -1148,62 +1148,6 @@
return NULL;
}
-AXIS2_EXTERN axiom_node_t *AXIS2_CALL
-axiom_util_string_to_node(
- const axutil_env_t *env,
- axis2_char_t* buffer)
-{
- axiom_document_t *doc = NULL;
- axiom_stax_builder_t *builder = NULL;
- axiom_xml_reader_t *reader = NULL;
- axiom_node_t *node = NULL;
-
- if(!buffer)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Deserialize method called with invalid buffer.");
- return NULL;
- }
- reader = axiom_xml_reader_create_for_memory(env, (void*)buffer, axutil_strlen(buffer), NULL,
- AXIS2_XML_PARSER_TYPE_BUFFER);
-
- if(!reader)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Could not be able to create axiom_xml_reader.");
- return NULL;
- }
-
- builder = axiom_stax_builder_create(env, reader);
- if(!builder)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Could not be able to create axiom_stax_builder.");
- return NULL;
- }
-
- doc = axiom_document_create(env, NULL, builder);
- if(!doc)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Could not be able to create axiom_document.");
- return NULL;
- }
-
- node = axiom_document_build_all(doc, env);
- if(!node)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Could not be able to deserialize the node.");
- axiom_document_free(doc, env);
- return NULL;
- }
-
- /* Free stax builder. The stax builder will free the reader. */
- axiom_stax_builder_free_self(builder, env);
- builder = NULL;
-
- axiom_document_free_self(doc, env);
- doc = NULL;
-
- return node;
-}
-
/**
* Creates a clone of given node
* @param env environment, MUST not be NULL
@@ -1226,7 +1170,7 @@
}
node_string = axiom_node_sub_tree_to_string(node, env);
- clone = axiom_util_string_to_node(env, node_string);
+ clone = axiom_node_create_from_buffer(env, node_string);
if(node_string)
{