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 pi...@apache.org on 2008/01/21 10:44:28 UTC
svn commit: r613816 - in /webservices/axis2/trunk/c: axiom/test/om/test_om.c
guththila/include/guththila_buffer.h guththila/src/guththila_xml_parser.c
Author: pini
Date: Mon Jan 21 01:44:26 2008
New Revision: 613816
URL: http://svn.apache.org/viewvc?rev=613816&view=rev
Log:
Fixing jira issue 914
Modified:
webservices/axis2/trunk/c/axiom/test/om/test_om.c
webservices/axis2/trunk/c/guththila/include/guththila_buffer.h
webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
Modified: webservices/axis2/trunk/c/axiom/test/om/test_om.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/test/om/test_om.c?rev=613816&r1=613815&r2=613816&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/test/om/test_om.c (original)
+++ webservices/axis2/trunk/c/axiom/test/om/test_om.c Mon Jan 21 01:44:26 2008
@@ -79,7 +79,9 @@
axiom_namespace_t *ns = NULL;
axiom_xml_reader_t *reader = NULL;
axiom_xml_writer_t *writer = NULL;
+
char *buffer = NULL;
+ axutil_hash_t* hash = NULL;
printf("\nstart test_om_build\n");
@@ -98,7 +100,7 @@
return -1;
}
- /** create axiom_stax_builder by parsing pull_parser struct */
+ /** create axiom_stax_builder by parsing pull_parser struct */
builder = axiom_stax_builder_create(environment, reader);
@@ -135,9 +137,26 @@
ele1 = axiom_node_get_data_element(node1, environment);
if (ele1)
-
+ {
printf("root localname %s\n",
axiom_element_get_localname(ele1, environment));
+
+ hash = axiom_element_get_all_attributes(ele1,environment);
+ if(hash)
+ {
+ axutil_hash_index_t *hi;
+ axis2_char_t *key= NULL;
+ axiom_attribute_t *val = NULL;
+ for (hi = axutil_hash_first(hash,environment); hi; hi = axutil_hash_next(environment, hi)) {
+ axutil_hash_this(hi, (const void**)&key, NULL,(void**) &val);
+ if(val)
+ printf(" Attribute name: %s",
+ axiom_attribute_get_localname(val,environment));
+ printf(" value: %s\n",
+ axiom_attribute_get_value(val,environment));
+ }
+ }
+ }
ns = axiom_element_get_namespace(ele1, environment, node1);
@@ -147,8 +166,12 @@
axiom_namespace_get_prefix(ns, environment));
printf("root ns uri %s\n",
axiom_namespace_get_uri(ns, environment));
+ printf("=============================================");
}
+ else
+ printf("=============================================");
+
}
/** build the document continuously untill all the xml file is built in to a om model */
@@ -166,11 +189,30 @@
ele2 =
(axiom_element_t *) axiom_node_get_data_element(node2,
environment);
+ printf("=============================================");
if (ele2 && axiom_element_get_localname(ele2, environment))
{
printf("\n localname %s\n",
- axiom_element_get_localname(ele2, environment));
+ axiom_element_get_localname(ele2, environment));
+ hash = axiom_element_get_all_attributes(ele2,environment);
+ if(hash)
+ {
+ axutil_hash_index_t *hi;
+ axis2_char_t *key= NULL;
+ axiom_attribute_t *val = NULL;
+ for (hi = axutil_hash_first(hash,environment); hi; hi = axutil_hash_next(environment, hi)) {
+ axutil_hash_this(hi, (const void**)&key, NULL,(void**) &val);
+ if(val)
+ printf(" Attribute name: %s",
+ axiom_attribute_get_localname(val,environment));
+ printf(" value: %s\n",
+ axiom_attribute_get_value(val,environment));
+ }
+ }
}
+
+
+
if (!node3)
node3 = node2;
Modified: webservices/axis2/trunk/c/guththila/include/guththila_buffer.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_buffer.h?rev=613816&r1=613815&r2=613816&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila_buffer.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila_buffer.h Mon Jan 21 01:44:26 2008
@@ -44,7 +44,7 @@
}
guththila_buffer_t;
-#define GUTHTHILA_BUFFER_DEF_SIZE 4096
+#define GUTHTHILA_BUFFER_DEF_SIZE 16984
#define GUTHTHILA_BUFFER_NUMBER_OF_BUFFERS 4
#ifndef GUTHTHILA_BUFFER_SIZE
Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c?rev=613816&r1=613815&r2=613816&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c Mon Jan 21 01:44:26 2008
@@ -556,6 +556,8 @@
{
e_namesp =
(guththila_elem_namesp_t *) guththila_stack_pop(&m->namesp, env);
+ if(e_namesp)
+ {
for (i = 0; i < e_namesp->no; i++)
{
if(e_namesp->namesp[i].name)
@@ -569,6 +571,7 @@
}
AXIS2_FREE(env->allocator, e_namesp->namesp);
AXIS2_FREE(env->allocator,e_namesp);
+ }
}
#endif
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org