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 di...@apache.org on 2007/02/01 10:12:42 UTC
svn commit: r502164 - in /webservices/axis2/trunk/c: axiom/include/
axiom/src/om/ axiom/src/parser/guththila/ modules/core/clientapi/
modules/core/engine/ modules/core/receivers/
modules/core/transport/http/sender/ samples/client/google/
Author: dinesh
Date: Thu Feb 1 01:12:40 2007
New Revision: 502164
URL: http://svn.apache.org/viewvc?view=rev&rev=502164
Log:
added a method to get first om element, fixed axiom proble with guththila space handling, replaced axiom_node_get_first_child with axiom_node_get_first_element
Modified:
webservices/axis2/trunk/c/axiom/include/axiom_node.h
webservices/axis2/trunk/c/axiom/src/om/om_node.c
webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c
webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
webservices/axis2/trunk/c/samples/client/google/google_client.c
Modified: webservices/axis2/trunk/c/axiom/include/axiom_node.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_node.h?view=diff&rev=502164&r1=502163&r2=502164
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_node.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_node.h Thu Feb 1 01:12:40 2007
@@ -181,6 +181,17 @@
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
axiom_node_get_first_child(axiom_node_t *om_node,
const axis2_env_t *env);
+
+ /**get the first AXIOM_ELEMENT in om_node
+ * @param om_node node
+ * @param env environment must not be null
+ * @returns pointer to first om element, NULL is returned on error
+ * with error code set in environments error.
+ */
+ AXIS2_EXTERN axiom_node_t * AXIS2_CALL
+ axiom_node_get_first_element(axiom_node_t *om_node,
+ const axis2_env_t *env);
+
/**
* get the last child
* @param om_node node
@@ -292,8 +303,10 @@
/** get previous sibling */
#define AXIOM_NODE_GET_PREVIOUS_SIBLING(om_node,env) \
axiom_node_get_previous_sibling(om_node,env)
+ /** get firet element of this om_node */
+#define AXIOM_NODE_GET_FIRST_ELEMENT(om_node,env) \
+ axiom_node_get_first_element(om_node,env)
/** get build status */
-
#define AXIOM_NODE_IS_COMPLETE(om_node,env) \
axiom_node_is_complete(om_node,env)
/** get data element of this node can be om_element om_text etc */
Modified: webservices/axis2/trunk/c/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_node.c?view=diff&rev=502164&r1=502163&r2=502164
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_node.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_node.c Thu Feb 1 01:12:40 2007
@@ -465,6 +465,33 @@
}
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+axiom_node_get_first_element(axiom_node_t *om_node,
+ const axis2_env_t *env)
+{
+ int token = 0;
+ axiom_node_t *first_element;
+ if (! om_node)
+ return NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ /**********************************************************/
+ while (!(om_node->first_child) && !(om_node->done)
+ && om_node->builder)
+ {
+ token = AXIOM_STAX_BUILDER_NEXT_WITH_TOKEN(om_node->builder, env);
+ if (token == -1)
+ return NULL;
+ }
+ /**********************************************************/
+ first_element = om_node->first_child;
+
+ while (AXIOM_NODE_GET_NODE_TYPE(first_element, env) != AXIOM_ELEMENT)
+ first_element = AXIOM_NODE_GET_NEXT_SIBLING (first_element, env);
+
+ return first_element;
+}
+
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
axiom_node_get_last_child(axiom_node_t *om_node,
const axis2_env_t *env)
{
Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c?view=diff&rev=502164&r1=502163&r2=502164
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c Thu Feb 1 01:12:40 2007
@@ -456,8 +456,8 @@
int i = -1;
AXIS2_ENV_CHECK(env, -1);
i = guththila_next((axis2_env_t*) env, AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
- while (i == GUTHTHILA_CHARACTER && AXIS2_INTF_TO_IMPL(parser)->guththila_parser->is_whitespace)
- i = guththila_next((axis2_env_t*) env, AXIS2_INTF_TO_IMPL(parser)->guththila_parser);
+/* while (i == GUTHTHILA_CHARACTER && AXIS2_INTF_TO_IMPL(parser)->guththila_parser->is_whitespace)
+ i = guththila_next((axis2_env_t*) env, AXIS2_INTF_TO_IMPL(parser)->guththila_parser);*/
return i == -1 ? -1 : AXIS2_INTF_TO_IMPL(parser)->event_map[i];
}
Modified: webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c?view=diff&rev=502164&r1=502163&r2=502164
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c Thu Feb 1 01:12:40 2007
@@ -860,7 +860,7 @@
soap_node = AXIOM_SOAP_BODY_GET_BASE_NODE(soap_body, env);
if (soap_node)
{
- return AXIOM_NODE_GET_FIRST_CHILD(soap_node, env);
+ return AXIOM_NODE_GET_FIRST_ELEMENT(soap_node, env);
}
}
}
@@ -948,7 +948,7 @@
{
return NULL;
}
- return AXIOM_NODE_GET_FIRST_CHILD(soap_node, env);
+ return AXIOM_NODE_GET_FIRST_ELEMENT(soap_node, env);
}
Modified: webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c?view=diff&rev=502164&r1=502163&r2=502164
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c Thu Feb 1 01:12:40 2007
@@ -101,7 +101,8 @@
if (body_node)
{
axiom_node_t *body_first_child_node =
- AXIOM_NODE_GET_FIRST_CHILD(body_node, env);
+ AXIOM_NODE_GET_FIRST_ELEMENT(body_node, env);
+
if (body_first_child_node)
{
if (AXIOM_NODE_GET_NODE_TYPE(body_first_child_node, env) == AXIOM_ELEMENT)
@@ -182,7 +183,11 @@
if (body_node)
{
axiom_node_t *body_first_child_node =
- AXIOM_NODE_GET_FIRST_CHILD(body_node, env);
+ AXIOM_NODE_GET_FIRST_ELEMENT(body_node, env);
+
+/* while (AXIOM_NODE_GET_NODE_TYPE(body_first_child_node, env) != AXIOM_ELEMENT)
+ body_first_child_node = AXIOM_NODE_GET_NEXT_SIBLING (body_first_child_node, env);*/
+
if (body_first_child_node)
{
if (AXIOM_NODE_GET_NODE_TYPE(body_first_child_node, env) == AXIOM_ELEMENT)
Modified: webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c?view=diff&rev=502164&r1=502163&r2=502164
==============================================================================
--- webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c (original)
+++ webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c Thu Feb 1 01:12:40 2007
@@ -136,8 +136,11 @@
body = AXIOM_SOAP_ENVELOPE_GET_BODY(envelope, env);
om_node = AXIOM_SOAP_BODY_GET_BASE_NODE(body, env);
om_element = AXIOM_NODE_GET_DATA_ELEMENT(om_node, env);
- om_node = AXIOM_NODE_GET_FIRST_CHILD(om_node, env);
- }
+ om_node = AXIOM_NODE_GET_FIRST_ELEMENT(om_node, env);
+/* om_node = AXIOM_NODE_GET_FIRST_CHILD(om_node, env); */
+/* while (AXIOM_NODE_GET_NODE_TYPE(om_node, env) != AXIOM_ELEMENT)
+ om_node = AXIOM_NODE_GET_NEXT_SIBLING (om_node, env);*/
+ }
else if (0 == AXIS2_STRCMP(AXIS2_STYLE_RPC, style))
{
axiom_soap_envelope_t *envelope = NULL;
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=502164&r1=502163&r2=502164
==============================================================================
--- 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 Feb 1 01:12:40 2007
@@ -365,7 +365,7 @@
xml_writer = NULL;
return AXIS2_FAILURE;
}
- data_out = AXIOM_NODE_GET_FIRST_CHILD(body_node, env);
+ data_out = AXIOM_NODE_GET_FIRST_ELEMENT(body_node, env);
if (NULL == data_out || AXIOM_NODE_GET_NODE_TYPE(data_out, env)
!= AXIOM_ELEMENT)
{
@@ -607,7 +607,7 @@
{
return AXIS2_FAILURE;
}
- data_out = AXIOM_NODE_GET_FIRST_CHILD(body_node, env);
+ data_out = AXIOM_NODE_GET_FIRST_ELEMENT(body_node, env);
if (NULL == data_out || AXIOM_NODE_GET_NODE_TYPE(data_out, env)
!= AXIOM_ELEMENT)
{
Modified: webservices/axis2/trunk/c/samples/client/google/google_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/google/google_client.c?view=diff&rev=502164&r1=502163&r2=502164
==============================================================================
--- webservices/axis2/trunk/c/samples/client/google/google_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/google/google_client.c Thu Feb 1 01:12:40 2007
@@ -120,7 +120,7 @@
return AXIS2_FAILURE;
}
- ret_node1 = AXIOM_NODE_GET_FIRST_CHILD(ret_node, env); /*return*/
+ ret_node1 = AXIOM_NODE_GET_FIRST_ELEMENT(ret_node, env); /*return*/
if (!ret_node1)
{
print_invalid_om(env, ret_node);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org