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 2008/04/30 09:08:54 UTC
svn commit: r652311 - in /webservices/axis2/trunk/c/axiom:
include/axiom_text.h src/om/om_text.c
Author: samisa
Date: Wed Apr 30 00:08:54 2008
New Revision: 652311
URL: http://svn.apache.org/viewvc?rev=652311&view=rev
Log:
Added SwA support
Modified:
webservices/axis2/trunk/c/axiom/include/axiom_text.h
webservices/axis2/trunk/c/axiom/src/om/om_text.c
Modified: webservices/axis2/trunk/c/axiom/include/axiom_text.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_text.h?rev=652311&r1=652310&r2=652311&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_text.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_text.h Wed Apr 30 00:08:54 2008
@@ -242,6 +242,20 @@
const axutil_env_t * env,
const axis2_char_t * content_id);
+ /**
+ * Sets the boolean value indicating if the binary data associated with the text
+ * node should be sent in SOAP with Attachment (SwA) format or not.
+ * @param om_text text node
+ * @param env environment
+ * @param is_swa bool value, AXIS2_TRUE means use SwA format, else AXIS2_FALSE
+ * @returns AXIS2_SUCCESS
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axiom_text_set_is_swa(
+ struct axiom_text *om_text,
+ const axutil_env_t * env,
+ const axis2_bool_t is_swa);
+
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/axiom/src/om/om_text.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_text.c?rev=652311&r1=652310&r2=652311&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_text.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_text.c Wed Apr 30 00:08:54 2008
@@ -46,6 +46,7 @@
axis2_bool_t optimize;
const axis2_char_t *localname;
axis2_bool_t is_binary;
+ axis2_bool_t is_swa;
axis2_char_t *content_id;
axiom_attribute_t *om_attribute;
axiom_namespace_t *ns;
@@ -83,6 +84,7 @@
om_text->optimize = AXIS2_FALSE;
om_text->localname = "Include";
om_text->is_binary = AXIS2_FALSE;
+ om_text->is_swa = AXIS2_FALSE;
om_text->content_id = NULL;
om_text->om_attribute = NULL;
om_text->value = NULL;
@@ -223,7 +225,16 @@
AXIS2_FREE(env->allocator, attribute_value);
attribute_value = NULL;
- axiom_text_serialize_start_part(om_text, env, om_output);
+ if (!om_text->is_swa) // This is a hack to get SwA working
+ {
+ axiom_text_serialize_start_part(om_text, env, om_output);
+ }
+ else
+ {
+ status = axiom_output_write(om_output, env,
+ AXIOM_TEXT, 1,
+ om_text->content_id);
+ }
axiom_output_write_optimized(om_output, env, om_text);
@@ -637,3 +648,15 @@
{
return om_text->value;
}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_text_set_is_swa(
+ axiom_text_t * om_text,
+ const axutil_env_t * env,
+ const axis2_bool_t is_swa)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, om_text, AXIS2_FAILURE);
+ om_text->is_swa = is_swa;
+ return AXIS2_SUCCESS;
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org