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 ma...@apache.org on 2007/08/15 10:28:28 UTC
svn commit: r566063 - in /webservices/axis2/trunk/c/axiom/src:
om/om_stax_builder.c soap/soap_builder.c
Author: manjula
Date: Wed Aug 15 01:28:27 2007
New Revision: 566063
URL: http://svn.apache.org/viewvc?view=rev&rev=566063
Log:
Fixing the bug when the soap message contains empty headers in the soap header.
Modified:
webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c
Modified: webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c?view=diff&rev=566063&r1=566062&r2=566063
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c Wed Aug 15 01:28:27 2007
@@ -1004,6 +1004,8 @@
}
token = axiom_xml_reader_next(om_builder->parser, env);
+
+ om_builder->current_event = token;
if (token == -1)
{
Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c?view=diff&rev=566063&r1=566062&r2=566063
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c Wed Aug 15 01:28:27 2007
@@ -382,6 +382,14 @@
/** get element level of this om element */
element_level = axiom_stax_builder_get_element_level(
soap_builder->om_builder, env);
+ if (axiom_stax_builder_get_current_event(soap_builder->om_builder, env) ==
+ AXIOM_XML_READER_EMPTY_ELEMENT)
+ {
+ /* if it is an empty element, increase the element level to ensurer processing
+ * header block logic, as the following logic assumes
+ * empty elements to be full elements. */
+ element_level++;
+ }
/* get om element struct from node */
om_element = (axiom_element_t *)
axiom_node_get_data_element(om_element_node, env);
@@ -554,7 +562,9 @@
if (status == AXIS2_FAILURE)
return AXIS2_FAILURE;
}
- else
+ else if ( parent_localname &&
+ axutil_strcasecmp(parent_localname, AXIOM_SOAP_HEADER_LOCAL_NAME) &&
+ axutil_strcasecmp(parent_localname, AXIOM_SOAP_BODY_LOCAL_NAME))
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_BUILDER_ENVELOPE_CAN_HAVE_ONLY_HEADER_AND_BODY, AXIS2_FAILURE);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org