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 2007/01/16 03:09:51 UTC
svn commit: r496572 [3/5] - in /webservices/axis2/trunk/c: axiom/include/
axiom/src/soap/ util/include/
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=496572&r1=496571&r2=496572
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c Mon Jan 15 18:09:50 2007
@@ -26,12 +26,32 @@
#include "_axiom_soap_header_block.h"
#include <axiom_stax_builder_internal.h>
#include "_axiom_soap_fault.h"
-/*********************** impl struct *****************************************/
-typedef struct axiom_soap_builder_impl_t
-{
- axiom_soap_builder_t soap_builder;
+static axis2_status_t
+axiom_soap_builder_construct_node(axiom_soap_builder_t *soap_builder,
+ const axis2_env_t *env,
+ axiom_node_t *parent,
+ axiom_node_t *om_element_node,
+ axis2_bool_t is_soap_envelope);
+static axis2_status_t
+axiom_soap_builder_identify_soap_version(axiom_soap_builder_t *soap_builder,
+ const axis2_env_t *env,
+ const axis2_char_t* soap_version_uri_from_transport);
+
+static axis2_status_t
+axiom_soap_builder_parse_headers(axiom_soap_builder_t *soap_builder,
+ const axis2_env_t *env);
+
+static axis2_status_t
+axiom_soap_builder_construct_node_for_empty_element
+(axiom_soap_builder_t *soap_builder,
+ const axis2_env_t *env,
+ axiom_node_t *parent,
+ axiom_node_t *om_element_node);
+
+struct axiom_soap_builder
+{
axiom_stax_builder_t *om_builder;
axiom_soap_message_t *soap_message;
@@ -66,8 +86,7 @@
axis2_hash_t *mime_body_parts;
-}
-axiom_soap_builder_impl_t;
+};
typedef enum axis2_builder_last_node_states
{
@@ -77,221 +96,92 @@
#define AXIS2_MAX_EVENT 100
-
-/***************** Macro ******************************************************/
-
-#define AXIS2_INTF_TO_IMPL(builder) ((axiom_soap_builder_impl_t*)builder)
-
-/**************** function prototypes ****************************************/
-
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_free(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-
-axiom_soap_envelope_t* AXIS2_CALL
-axiom_soap_builder_get_soap_envelope
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-
-axiom_document_t* AXIS2_CALL
-axiom_soap_builder_get_document
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_next(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-
-axiom_node_t* AXIS2_CALL
-axiom_soap_builder_get_document_element
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-
-axis2_status_t
-axiom_soap_builder_create_om_element
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- axiom_node_t *current_node,
- int current_event);
-
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_process_namespace_data
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- axiom_node_t *om_node,
- int is_soap_element);
-
-static axis2_status_t
-axiom_soap_builder_identify_soap_version(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- const axis2_char_t* soap_version_uri_from_transport);
-
-static axis2_status_t
-axiom_soap_builder_construct_node(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- axiom_node_t *parent,
- axiom_node_t *element_node,
- axis2_bool_t is_soap_envelope);
-
-static axis2_status_t
-axiom_soap_builder_construct_node_for_empty_element
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- axiom_node_t *parent,
- axiom_node_t *element_node);
-
-static axis2_status_t
-axiom_soap_builder_parse_headers(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-
-
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_set_bool_processing_mandatory_fault_elements
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- axis2_bool_t value);
-
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_set_processing_detail_elements
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- axis2_bool_t value);
-
-axis2_bool_t AXIS2_CALL
-axiom_soap_builder_is_processing_detail_elements
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-
-int AXIS2_CALL
-axiom_soap_builder_get_soap_version(axiom_soap_builder_t *builder,
- const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_set_mime_body_parts
-(axiom_soap_builder_t *builder,
- const axis2_env_t *env,
- axis2_hash_t *map);
-/***************** function implementations ***********************************/
-
AXIS2_EXTERN axiom_soap_builder_t * AXIS2_CALL
axiom_soap_builder_create(const axis2_env_t *env,
- axiom_stax_builder_t *builder,
+ axiom_stax_builder_t *stax_builder,
const axis2_char_t *soap_version)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
+ axiom_soap_builder_t *soap_builder = NULL;
axis2_status_t status = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env, NULL);
- AXIS2_PARAM_CHECK(env->error, builder, NULL);
+ AXIS2_PARAM_CHECK(env->error, stax_builder, NULL);
- builder_impl = (axiom_soap_builder_impl_t*)AXIS2_MALLOC(env->allocator,
- sizeof(axiom_soap_builder_impl_t));
- if (builder_impl == NULL)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
+ soap_builder = (axiom_soap_builder_t*)AXIS2_MALLOC(env->allocator,
+ sizeof(axiom_soap_builder_t));
- builder_impl->done = AXIS2_FALSE;
- builder_impl->body_present = AXIS2_FALSE;
- builder_impl->builder_helper = NULL;
- builder_impl->element_level = 0;
- builder_impl->header_present = AXIS2_FALSE;
- builder_impl->om_builder = NULL;
- builder_impl->processing_detail_elements = AXIS2_FALSE;
- builder_impl->processing_fault = AXIS2_FALSE;
- builder_impl->processing_mandatory_fault_elements = AXIS2_FALSE;
- builder_impl->receiver_fault_code = NULL;
- builder_impl->sender_fault_code = NULL;
- builder_impl->soap_version = AXIOM_SOAP12;
- builder_impl->soap_builder.ops = NULL;
- builder_impl->last_node_status = -1;
- builder_impl->envelope_ns = NULL;
- builder_impl->soap_envelope = NULL;
- builder_impl->soap_message = NULL;
- builder_impl->mime_body_parts = NULL;
-
- builder_impl->soap_builder.ops = (axiom_soap_builder_ops_t*)
- AXIS2_MALLOC(env->allocator, sizeof(axiom_soap_builder_ops_t));
-
- if (!(builder_impl->soap_builder.ops))
+ if (soap_builder == NULL)
{
- AXIS2_FREE(env->allocator, builder_impl);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- builder_impl->om_builder = builder;
- builder_impl->soap_builder.ops->free =
- axiom_soap_builder_free;
- builder_impl->soap_builder.ops->next =
- axiom_soap_builder_next;
- builder_impl->soap_builder.ops->get_soap_envelope =
- axiom_soap_builder_get_soap_envelope;
- builder_impl->soap_builder.ops->get_document =
- axiom_soap_builder_get_document;
- builder_impl->soap_builder.ops->set_bool_processing_mandatory_fault_elements =
- axiom_soap_builder_set_bool_processing_mandatory_fault_elements;
- builder_impl->soap_builder.ops->set_processing_detail_elements =
- axiom_soap_builder_set_processing_detail_elements;
- builder_impl->soap_builder.ops->is_processing_detail_elements =
- axiom_soap_builder_is_processing_detail_elements;
- builder_impl->soap_builder.ops->get_soap_version =
- axiom_soap_builder_get_soap_version;
- builder_impl->soap_builder.ops->process_namespace_data =
- axiom_soap_builder_process_namespace_data;
- builder_impl->soap_builder.ops->set_mime_body_parts =
- axiom_soap_builder_set_mime_body_parts;
+ soap_builder->done = AXIS2_FALSE;
+ soap_builder->body_present = AXIS2_FALSE;
+ soap_builder->builder_helper = NULL;
+ soap_builder->element_level = 0;
+ soap_builder->header_present = AXIS2_FALSE;
+ soap_builder->processing_detail_elements = AXIS2_FALSE;
+ soap_builder->processing_fault = AXIS2_FALSE;
+ soap_builder->processing_mandatory_fault_elements = AXIS2_FALSE;
+ soap_builder->receiver_fault_code = NULL;
+ soap_builder->sender_fault_code = NULL;
+ soap_builder->soap_version = AXIOM_SOAP12;
+ soap_builder->last_node_status = -1;
+ soap_builder->envelope_ns = NULL;
+ soap_builder->soap_envelope = NULL;
+ soap_builder->soap_message = NULL;
+ soap_builder->mime_body_parts = NULL;
+ soap_builder->om_builder = stax_builder;
- status = axiom_soap_builder_identify_soap_version(&(builder_impl->soap_builder), env, soap_version);
+ status = axiom_soap_builder_identify_soap_version(soap_builder, env, soap_version);
if (status == AXIS2_FAILURE)
{
- axiom_soap_builder_free(&(builder_impl->soap_builder), env);
+ axiom_soap_builder_free(soap_builder, env);
return NULL;
}
- status = axiom_soap_builder_parse_headers(&(builder_impl->soap_builder), env);
+ status = axiom_soap_builder_parse_headers(soap_builder, env);
if (status == AXIS2_FAILURE)
{
- axiom_soap_builder_free(&(builder_impl->soap_builder), env);
+ axiom_soap_builder_free(soap_builder, env);
return NULL;
}
- return &(builder_impl->soap_builder);
+ return soap_builder;
}
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_free(axiom_soap_builder_t *builder,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_builder_free(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if (!builder)
+ if (!soap_builder)
return AXIS2_FAILURE;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (builder_impl->builder_helper)
+ if (soap_builder->builder_helper)
{
- if (builder_impl->soap_version == AXIOM_SOAP11 && builder_impl->builder_helper)
+ if (soap_builder->soap_version == AXIOM_SOAP11 && soap_builder->builder_helper)
{
- AXIOM_SOAP11_BUILDER_HELPER_FREE((axiom_soap11_builder_helper_t *)(builder_impl->builder_helper), env);
- builder_impl->builder_helper = NULL;
+ AXIOM_SOAP11_BUILDER_HELPER_FREE((axiom_soap11_builder_helper_t *)(soap_builder->builder_helper), env);
+ soap_builder->builder_helper = NULL;
}
- else if (builder_impl->soap_version == AXIOM_SOAP12 && builder_impl->builder_helper)
+ else if (soap_builder->soap_version == AXIOM_SOAP12 && soap_builder->builder_helper)
{
- AXIOM_SOAP12_BUILDER_HELPER_FREE((axiom_soap12_builder_helper_t *)(builder_impl->builder_helper), env);
- builder_impl->builder_helper = NULL;
+ AXIOM_SOAP12_BUILDER_HELPER_FREE((axiom_soap12_builder_helper_t *)(soap_builder->builder_helper), env);
+ soap_builder->builder_helper = NULL;
}
}
- if ( builder_impl->om_builder)
+ if ( soap_builder->om_builder)
{
- AXIOM_STAX_BUILDER_FREE(builder_impl->om_builder, env);
- builder_impl->om_builder = NULL;
+ AXIOM_STAX_BUILDER_FREE(soap_builder->om_builder, env);
+ soap_builder->om_builder = NULL;
}
- if (builder_impl->mime_body_parts)
+ if (soap_builder->mime_body_parts)
{
axis2_hash_index_t *hi = NULL;
void *val = NULL;
const void *key = NULL;
- for (hi = axis2_hash_first(builder_impl->mime_body_parts, env);
+ for (hi = axis2_hash_first(soap_builder->mime_body_parts, env);
hi; hi = axis2_hash_next(env, hi))
{
axis2_hash_this(hi, &key, NULL, &val);
@@ -305,114 +195,101 @@
key = NULL;
}
- axis2_hash_free(builder_impl->mime_body_parts, env);
- builder_impl->mime_body_parts = NULL;
- }
-
-
- if (builder->ops)
- {
- AXIS2_FREE(env->allocator, builder->ops);
- builder->ops = NULL;
+ axis2_hash_free(soap_builder->mime_body_parts, env);
+ soap_builder->mime_body_parts = NULL;
}
- if (builder_impl)
+ if (soap_builder)
{
- AXIS2_FREE(env->allocator, builder_impl);
- builder_impl = NULL;
+ AXIS2_FREE(env->allocator, soap_builder);
+ soap_builder = NULL;
}
return AXIS2_SUCCESS;
}
-axiom_soap_envelope_t* AXIS2_CALL
+AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
axiom_soap_builder_get_soap_envelope
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
int status = AXIS2_SUCCESS ;
AXIS2_ENV_CHECK(env, NULL);
- if (!builder)
+ if (!soap_builder)
return NULL;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (!(builder_impl->om_builder))
+ if (!(soap_builder->om_builder))
return NULL;
- while (!(builder_impl->soap_envelope) &&
- !AXIOM_STAX_BUILDER_IS_COMPLETE(builder_impl->om_builder, env))
+ while (!(soap_builder->soap_envelope) &&
+ !AXIOM_STAX_BUILDER_IS_COMPLETE(soap_builder->om_builder, env))
{
- status = axiom_soap_builder_next(builder, env);
+ status = axiom_soap_builder_next(soap_builder, env);
if (status == AXIS2_FAILURE)
break;
}
- return builder_impl->soap_envelope;
+ return soap_builder->soap_envelope;
}
-axiom_document_t* AXIS2_CALL
+AXIS2_EXTERN axiom_document_t* AXIS2_CALL
axiom_soap_builder_get_document
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- if (!builder)
+ if (!soap_builder)
return NULL;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (builder_impl->om_builder)
+ if (soap_builder->om_builder)
{
- return AXIOM_STAX_BUILDER_GET_DOCUMENT(builder_impl->om_builder, env);
+ return AXIOM_STAX_BUILDER_GET_DOCUMENT(soap_builder->om_builder, env);
}
else
return NULL;
}
-axis2_status_t AXIS2_CALL
-axiom_soap_builder_next(axiom_soap_builder_t *builder,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_builder_next(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
axiom_node_t *lastnode = NULL;
int current_event = AXIS2_MAX_EVENT;
axiom_node_t *current_node = NULL;
int status = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if (!builder)
+ if (!soap_builder)
return AXIS2_FAILURE;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (builder_impl->done)
+ if (soap_builder->done)
{
return AXIS2_FAILURE;
}
- if (!(builder_impl->om_builder))
+ if (!(soap_builder->om_builder))
return AXIS2_FAILURE;
- lastnode = axiom_stax_builder_get_lastnode(builder_impl->om_builder, env);
+ lastnode = axiom_stax_builder_get_lastnode(soap_builder->om_builder, env);
if (!lastnode)
{
- builder_impl->last_node_status = AXIS2_BUILDER_LAST_NODE_NULL;
+ soap_builder->last_node_status = AXIS2_BUILDER_LAST_NODE_NULL;
}
else
{
- builder_impl->last_node_status = AXIS2_BUILDER_LAST_NODE_NOT_NULL;
+ soap_builder->last_node_status = AXIS2_BUILDER_LAST_NODE_NOT_NULL;
}
- current_event = AXIOM_STAX_BUILDER_NEXT_WITH_TOKEN(builder_impl->om_builder, env);
+ current_event = AXIOM_STAX_BUILDER_NEXT_WITH_TOKEN(soap_builder->om_builder, env);
if (current_event == -1)
{
- builder_impl->done = AXIS2_TRUE;
+ soap_builder->done = AXIS2_TRUE;
return AXIS2_FAILURE;
}
if (current_event == AXIOM_XML_READER_EMPTY_ELEMENT ||
current_event == AXIOM_XML_READER_START_ELEMENT)
{
- current_node = axiom_stax_builder_get_lastnode(builder_impl->om_builder, env);
+ current_node = axiom_stax_builder_get_lastnode(soap_builder->om_builder, env);
if (current_node)
- status = axiom_soap_builder_create_om_element(builder, env, current_node, current_event);
+ status = axiom_soap_builder_create_om_element(soap_builder, env, current_node, current_event);
else
return AXIS2_FAILURE;
}
@@ -420,17 +297,15 @@
return status;
}
-axiom_node_t* AXIS2_CALL
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
axiom_soap_builder_get_document_element
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (builder_impl->soap_envelope)
+ if (soap_builder->soap_envelope)
{
- return AXIOM_SOAP_ENVELOPE_GET_BASE_NODE(builder_impl->soap_envelope, env);
+ return AXIOM_SOAP_ENVELOPE_GET_BASE_NODE(soap_builder->soap_envelope, env);
}
else
return NULL;
@@ -440,40 +315,38 @@
axis2_status_t
axiom_soap_builder_create_om_element
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
axiom_node_t *current_node,
int current_event)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
int ret_val = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, current_node, AXIS2_FAILURE);
- if (!builder)
+ if (!soap_builder)
return AXIS2_FAILURE;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (builder_impl->last_node_status == AXIS2_BUILDER_LAST_NODE_NULL)
+ if (soap_builder->last_node_status == AXIS2_BUILDER_LAST_NODE_NULL)
{
- ret_val = axiom_soap_builder_construct_node(builder, env, NULL, current_node, AXIS2_TRUE);
+ ret_val = axiom_soap_builder_construct_node(soap_builder, env, NULL, current_node, AXIS2_TRUE);
}
else
{
int element_level = 0;
axiom_node_t *parent_node = NULL;
parent_node = AXIOM_NODE_GET_PARENT(current_node, env);
- if (!builder_impl->om_builder)
+ if (!soap_builder->om_builder)
return AXIS2_FAILURE;
element_level = axiom_stax_builder_get_element_level(
- builder_impl->om_builder, env);
+ soap_builder->om_builder, env);
if (parent_node && element_level == 1 && current_event == AXIOM_XML_READER_EMPTY_ELEMENT)
{
- ret_val = axiom_soap_builder_construct_node_for_empty_element(builder, env, parent_node , current_node);
+ ret_val = axiom_soap_builder_construct_node_for_empty_element(soap_builder, env, parent_node , current_node);
}
else if (parent_node)
{
- ret_val = axiom_soap_builder_construct_node(builder, env, parent_node , current_node, AXIS2_FALSE);
+ ret_val = axiom_soap_builder_construct_node(soap_builder, env, parent_node , current_node, AXIS2_FALSE);
}
else
return AXIS2_FAILURE;
@@ -482,14 +355,12 @@
}
static axis2_status_t
-axiom_soap_builder_construct_node(axiom_soap_builder_t *builder,
+axiom_soap_builder_construct_node(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
axiom_node_t *parent,
axiom_node_t *om_element_node,
axis2_bool_t is_soap_envelope)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
-
axiom_element_t *parent_ele = NULL;
axis2_char_t *parent_localname = NULL;
@@ -501,15 +372,14 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, om_element_node, AXIS2_FAILURE);
- if (!builder)
+ if (!soap_builder)
return AXIS2_FAILURE;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (!builder_impl->om_builder)
+ if (!soap_builder->om_builder)
return AXIS2_FAILURE;
/** get element level of this om element */
element_level = axiom_stax_builder_get_element_level(
- builder_impl->om_builder, env);
+ soap_builder->om_builder, env);
/* get om element struct from node */
om_element = (axiom_element_t *)
AXIOM_NODE_GET_DATA_ELEMENT(om_element_node, env);
@@ -546,10 +416,10 @@
{
axiom_data_handler_t *data_handler = NULL;
id += 4;
- if (builder_impl->mime_body_parts)
+ if (soap_builder->mime_body_parts)
{
data_handler = (axiom_data_handler_t *)axis2_hash_get(
- builder_impl->mime_body_parts,
+ soap_builder->mime_body_parts,
(void*)id, AXIS2_HASH_KEY_STRING);
if (data_handler)
{
@@ -588,15 +458,15 @@
}
/** create a null soap envelope struct */
- builder_impl->soap_envelope = axiom_soap_envelope_create_null(env);
- if (!builder_impl->soap_envelope)
+ soap_builder->soap_envelope = axiom_soap_envelope_create_null(env);
+ if (!soap_builder->soap_envelope)
return AXIS2_FAILURE;
/** wrap this om node in it */
- status = axiom_soap_envelope_set_base_node(builder_impl->soap_envelope,
+ status = axiom_soap_envelope_set_base_node(soap_builder->soap_envelope,
env, om_element_node);
- axiom_soap_envelope_set_builder(builder_impl->soap_envelope, env, builder);
- status = axiom_soap_builder_process_namespace_data(builder, env, om_element_node, AXIS2_TRUE);
+ axiom_soap_envelope_set_builder(soap_builder->soap_envelope, env, soap_builder);
+ status = axiom_soap_builder_process_namespace_data(soap_builder, env, om_element_node, AXIS2_TRUE);
if (status == AXIS2_FAILURE)
return AXIS2_FAILURE;
}
@@ -606,20 +476,20 @@
{
/** this is the soap header element */
axiom_soap_header_t *soap_header = NULL;
- if (builder_impl->header_present)
+ if (soap_builder->header_present)
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_HEADERS_ENCOUNTERED, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- if (builder_impl->body_present)
+ if (soap_builder->body_present)
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_BUILDER_HEADER_BODY_WRONG_ORDER, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- builder_impl->header_present = AXIS2_TRUE;
+ soap_builder->header_present = AXIS2_TRUE;
soap_header = axiom_soap_header_create(env);
if (!soap_header)
@@ -627,13 +497,13 @@
axiom_soap_header_set_base_node(soap_header, env, om_element_node);
- axiom_soap_envelope_set_header(builder_impl->soap_envelope, env, soap_header);
+ axiom_soap_envelope_set_header(soap_builder->soap_envelope, env, soap_header);
- axiom_soap_header_set_builder(soap_header, env, builder);
+ axiom_soap_header_set_builder(soap_header, env, soap_builder);
- axiom_soap_header_set_soap_version(soap_header, env, builder_impl->soap_version);
+ axiom_soap_header_set_soap_version(soap_header, env, soap_builder->soap_version);
- status = axiom_soap_builder_process_namespace_data(builder, env,
+ status = axiom_soap_builder_process_namespace_data(soap_builder, env,
om_element_node, AXIS2_TRUE);
if (status == AXIS2_FAILURE)
return AXIS2_FAILURE;
@@ -643,14 +513,14 @@
{
axiom_soap_body_t *soap_body = NULL;
- if (builder_impl->body_present)
+ if (soap_builder->body_present)
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_BODY_ELEMENTS_ENCOUNTERED, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- builder_impl->body_present = AXIS2_TRUE;
+ soap_builder->body_present = AXIS2_TRUE;
soap_body = axiom_soap_body_create(env);
if (!soap_body)
@@ -658,11 +528,11 @@
axiom_soap_body_set_base_node(soap_body, env, om_element_node);
- axiom_soap_body_set_builder(soap_body, env, builder);
+ axiom_soap_body_set_builder(soap_body, env, soap_builder);
- axiom_soap_envelope_set_body(builder_impl->soap_envelope, env, soap_body);
+ axiom_soap_envelope_set_body(soap_builder->soap_envelope, env, soap_body);
- status = axiom_soap_builder_process_namespace_data(builder, env,
+ status = axiom_soap_builder_process_namespace_data(soap_builder, env,
om_element_node, AXIS2_TRUE);
if (status == AXIS2_FAILURE)
@@ -681,7 +551,7 @@
axiom_soap_header_block_t *header_block = NULL;
axiom_soap_header_t *soap_header = NULL;
- soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(builder_impl->soap_envelope, env);
+ soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(soap_builder->soap_envelope, env);
if (!soap_header)
return AXIS2_FAILURE;
@@ -693,7 +563,7 @@
axiom_soap_header_set_header_block(soap_header, env, header_block);
- axiom_soap_header_block_set_soap_version(header_block, env, builder_impl->soap_version);
+ axiom_soap_header_block_set_soap_version(header_block, env, soap_builder->soap_version);
}
@@ -705,11 +575,11 @@
axiom_soap_fault_t *soap_fault = NULL;
axiom_namespace_t *env_ns = NULL;
- env_ns = AXIOM_SOAP_ENVELOPE_GET_NAMESPACE(builder_impl->soap_envelope, env);
+ env_ns = AXIOM_SOAP_ENVELOPE_GET_NAMESPACE(soap_builder->soap_envelope, env);
if (!env_ns)
return AXIS2_FAILURE;
- soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(builder_impl->soap_envelope, env);
+ soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_builder->soap_envelope, env);
if (!soap_body)
return AXIS2_FAILURE;
@@ -722,41 +592,41 @@
axiom_soap_body_set_fault(soap_body, env, soap_fault);
- axiom_soap_fault_set_builder(soap_fault, env, builder);
+ axiom_soap_fault_set_builder(soap_fault, env, soap_builder);
- builder_impl->processing_fault = AXIS2_TRUE;
+ soap_builder->processing_fault = AXIS2_TRUE;
- builder_impl->processing_mandatory_fault_elements = AXIS2_TRUE;
+ soap_builder->processing_mandatory_fault_elements = AXIS2_TRUE;
if (AXIS2_STRCMP(AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI,
AXIOM_NAMESPACE_GET_URI(env_ns , env)) == 0)
{
- builder_impl->builder_helper = axiom_soap12_builder_helper_create(env, builder);
- if (!(builder_impl->builder_helper))
+ soap_builder->builder_helper = axiom_soap12_builder_helper_create(env, soap_builder);
+ if (!(soap_builder->builder_helper))
return AXIS2_FAILURE;
}
else if (AXIS2_STRCMP(AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI,
AXIOM_NAMESPACE_GET_URI(env_ns , env)) == 0)
{
- builder_impl->builder_helper = axiom_soap11_builder_helper_create(env, builder, builder_impl->om_builder);
- if (!(builder_impl->builder_helper))
+ soap_builder->builder_helper = axiom_soap11_builder_helper_create(env, soap_builder, soap_builder->om_builder);
+ if (!(soap_builder->builder_helper))
return AXIS2_FAILURE;
}
}
- else if (element_level > 3 && builder_impl->processing_fault)
+ else if (element_level > 3 && soap_builder->processing_fault)
{
- if (builder_impl->soap_version == AXIOM_SOAP11)
+ if (soap_builder->soap_version == AXIOM_SOAP11)
{
status = AXIOM_SOAP11_BUILDER_HELPER_HANDLE_EVENT(
- ((axiom_soap11_builder_helper_t*)(builder_impl->builder_helper)),
+ ((axiom_soap11_builder_helper_t*)(soap_builder->builder_helper)),
env, om_element_node , element_level);
}
- else if (builder_impl->soap_version == AXIOM_SOAP12)
+ else if (soap_builder->soap_version == AXIOM_SOAP12)
{
status = AXIOM_SOAP12_BUILDER_HELPER_HANDLE_EVENT(
- ((axiom_soap12_builder_helper_t *)(builder_impl->builder_helper)),
+ ((axiom_soap12_builder_helper_t *)(soap_builder->builder_helper)),
env, om_element_node , element_level);
}
@@ -764,9 +634,9 @@
return status;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_soap_builder_process_namespace_data
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
axiom_node_t *om_node,
int is_soap_element)
@@ -808,25 +678,22 @@
}
static axis2_status_t
-axiom_soap_builder_identify_soap_version(axiom_soap_builder_t *builder,
+axiom_soap_builder_identify_soap_version(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
const axis2_char_t* soap_version_uri_from_transport)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
axiom_namespace_t *om_ns = NULL;
axiom_node_t *envelope_node = NULL;
axiom_element_t *om_ele = NULL;
axis2_char_t *ns_uri = NULL;
AXIS2_PARAM_CHECK(env->error, soap_version_uri_from_transport, AXIS2_FAILURE);
- if (!builder)
+ if (!soap_builder)
return AXIS2_FAILURE;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
-
- builder_impl->soap_envelope = axiom_soap_builder_get_soap_envelope(builder, env);
+ soap_builder->soap_envelope = axiom_soap_builder_get_soap_envelope(soap_builder, env);
- if (builder_impl->soap_envelope == NULL)
+ if (soap_builder->soap_envelope == NULL)
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_MESSAGE_DOES_NOT_CONTAIN_AN_ENVELOPE, AXIS2_FAILURE);
@@ -835,7 +702,7 @@
return AXIS2_FAILURE;
}
- envelope_node = AXIOM_SOAP_ENVELOPE_GET_BASE_NODE(builder_impl->soap_envelope, env);
+ envelope_node = AXIOM_SOAP_ENVELOPE_GET_BASE_NODE(soap_builder->soap_envelope, env);
if (!envelope_node)
return AXIS2_FAILURE;
@@ -863,23 +730,23 @@
}
if (AXIS2_STRCMP(AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI, ns_uri) == 0)
{
- builder_impl->soap_version = AXIOM_SOAP11;
+ soap_builder->soap_version = AXIOM_SOAP11;
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Identified soap version is soap11");
- axiom_soap_envelope_set_soap_version_internal(builder_impl->soap_envelope,
- env, builder_impl->soap_version);
+ axiom_soap_envelope_set_soap_version_internal(soap_builder->soap_envelope,
+ env, soap_builder->soap_version);
return AXIS2_SUCCESS;
}
else if (AXIS2_STRCMP(AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI, ns_uri) == 0)
{
- builder_impl->soap_version = AXIOM_SOAP12;
+ soap_builder->soap_version = AXIOM_SOAP12;
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "identified soap version is soap12");
- axiom_soap_envelope_set_soap_version_internal(builder_impl->soap_envelope,
- env, builder_impl->soap_version);
+ axiom_soap_envelope_set_soap_version_internal(soap_builder->soap_envelope,
+ env, soap_builder->soap_version);
return AXIS2_SUCCESS;
}
@@ -888,24 +755,21 @@
}
static axis2_status_t
-axiom_soap_builder_parse_headers(axiom_soap_builder_t *builder,
+axiom_soap_builder_parse_headers(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
axiom_node_t *om_node = NULL;
axiom_soap_header_t *soap_header = NULL;
int status = AXIS2_SUCCESS;
- if (!builder)
+ if (!soap_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
-
- if (!builder_impl->soap_envelope)
+ if (!soap_builder->soap_envelope)
return AXIS2_FAILURE;
- soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(builder_impl->soap_envelope, env);
+ soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(soap_builder->soap_envelope, env);
if (soap_header)
{
@@ -914,88 +778,77 @@
{
while (!AXIOM_NODE_IS_COMPLETE(om_node, env))
{
- status = axiom_soap_builder_next(builder, env);
+ status = axiom_soap_builder_next(soap_builder, env);
if (status == AXIS2_FAILURE)
return AXIS2_FAILURE;
}
/*HACK: to fix AXIS2C-129 - Samisa*/
/*
axiom_stax_builder_set_element_level(
- builder_impl->om_builder, env, 1);
+ soap_builder->om_builder, env, 1);
*/
}
}
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_soap_builder_set_bool_processing_mandatory_fault_elements
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
axis2_bool_t value)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FALSE);
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- builder_impl->processing_mandatory_fault_elements = value;
+ soap_builder->processing_mandatory_fault_elements = value;
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_soap_builder_set_processing_detail_elements
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
axis2_bool_t value)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FALSE);
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- builder_impl->processing_detail_elements = value;
+ soap_builder->processing_detail_elements = value;
return AXIS2_SUCCESS;
}
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
axiom_soap_builder_is_processing_detail_elements
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FALSE);
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- return builder_impl->processing_detail_elements ;
+ return soap_builder->processing_detail_elements ;
}
-int AXIS2_CALL
-axiom_soap_builder_get_soap_version(axiom_soap_builder_t *builder,
+AXIS2_EXTERN int AXIS2_CALL
+axiom_soap_builder_get_soap_version(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env)
{
- axiom_soap_builder_impl_t *builder_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FALSE);
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- return builder_impl->soap_version ;
+ return soap_builder->soap_version ;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_soap_builder_set_mime_body_parts
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
axis2_hash_t *map)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_INTF_TO_IMPL(builder)->mime_body_parts = map;
+ soap_builder->mime_body_parts = map;
return AXIS2_SUCCESS;
}
static axis2_status_t
axiom_soap_builder_construct_node_for_empty_element
-(axiom_soap_builder_t *builder,
+(axiom_soap_builder_t *soap_builder,
const axis2_env_t *env,
axiom_node_t *parent,
axiom_node_t *om_element_node)
{
-
- axiom_soap_builder_impl_t *builder_impl = NULL;
-
axiom_element_t *parent_ele = NULL;
axis2_char_t *parent_localname = NULL;
@@ -1007,15 +860,14 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, om_element_node, AXIS2_FAILURE);
- if (!builder)
+ if (!soap_builder)
return AXIS2_FAILURE;
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- if (!builder_impl->om_builder)
+ if (!soap_builder->om_builder)
return AXIS2_FAILURE;
element_level = axiom_stax_builder_get_element_level(
- builder_impl->om_builder, env);
+ soap_builder->om_builder, env);
om_element = (axiom_element_t *)
AXIOM_NODE_GET_DATA_ELEMENT(om_element_node, env);
@@ -1044,20 +896,20 @@
{
/** this is the soap header element */
axiom_soap_header_t *soap_header = NULL;
- if (builder_impl->header_present)
+ if (soap_builder->header_present)
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_HEADERS_ENCOUNTERED, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- if (builder_impl->body_present)
+ if (soap_builder->body_present)
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_BUILDER_HEADER_BODY_WRONG_ORDER, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- builder_impl->header_present = AXIS2_TRUE;
+ soap_builder->header_present = AXIS2_TRUE;
soap_header = axiom_soap_header_create(env);
if (!soap_header)
@@ -1065,13 +917,13 @@
axiom_soap_header_set_base_node(soap_header, env, om_element_node);
- axiom_soap_envelope_set_header(builder_impl->soap_envelope, env, soap_header);
+ axiom_soap_envelope_set_header(soap_builder->soap_envelope, env, soap_header);
- axiom_soap_header_set_builder(soap_header, env, builder);
+ axiom_soap_header_set_builder(soap_header, env, soap_builder);
- axiom_soap_header_set_soap_version(soap_header, env, builder_impl->soap_version);
+ axiom_soap_header_set_soap_version(soap_header, env, soap_builder->soap_version);
- status = axiom_soap_builder_process_namespace_data(builder, env,
+ status = axiom_soap_builder_process_namespace_data(soap_builder, env,
om_element_node, AXIS2_TRUE);
if (status == AXIS2_FAILURE)
return AXIS2_FAILURE;
@@ -1081,14 +933,14 @@
{
axiom_soap_body_t *soap_body = NULL;
- if (builder_impl->body_present)
+ if (soap_builder->body_present)
{
AXIS2_ERROR_SET(env->error,
AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_BODY_ELEMENTS_ENCOUNTERED, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- builder_impl->body_present = AXIS2_TRUE;
+ soap_builder->body_present = AXIS2_TRUE;
soap_body = axiom_soap_body_create(env);
if (!soap_body)
@@ -1096,11 +948,11 @@
axiom_soap_body_set_base_node(soap_body, env, om_element_node);
- axiom_soap_body_set_builder(soap_body, env, builder);
+ axiom_soap_body_set_builder(soap_body, env, soap_builder);
- axiom_soap_envelope_set_body(builder_impl->soap_envelope, env, soap_body);
+ axiom_soap_envelope_set_body(soap_builder->soap_envelope, env, soap_body);
- status = axiom_soap_builder_process_namespace_data(builder, env,
+ status = axiom_soap_builder_process_namespace_data(soap_builder, env,
om_element_node, AXIS2_TRUE);
if (status == AXIS2_FAILURE)
Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c?view=diff&rev=496572&r1=496571&r2=496572
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c Mon Jan 15 18:09:50 2007
@@ -29,11 +29,9 @@
#include <axiom_soap_fault_value.h>
#include <axiom_soap_fault_text.h>
#include <axiom_namespace_internal.h>
-/******************* impl struct *********************************************/
-typedef struct axiom_soap_envelope_impl_t
+struct axiom_soap_envelope
{
- axiom_soap_envelope_t soap_envelope;
/* corresponding om element node */
axiom_node_t *om_ele_node;
/* soap version */
@@ -44,119 +42,32 @@
axiom_soap_body_t *body;
/* pointer to soap builder */
axiom_soap_builder_t *soap_builder;
-
-}
-axiom_soap_envelope_impl_t;
-
-/****************** Macro ****************************************************/
-
-#define AXIS2_INTF_TO_IMPL(envelope) ((axiom_soap_envelope_impl_t*)envelope)
-
-/****************** Function prototypes **************************************/
-
-axiom_soap_header_t* AXIS2_CALL
-axiom_soap_envelope_get_header(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env);
-
-
-axiom_soap_header_block_t* AXIS2_CALL
-axiom_soap_envelope_add_header(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env,
- axis2_char_t *namespace_uri,
- axis2_char_t *name);
-
-axiom_soap_body_t* AXIS2_CALL
-axiom_soap_envelope_get_body(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env);
-
-
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_serialize(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env,
- axiom_output_t *om_output,
- axis2_bool_t cache);
-
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_free(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env);
-axiom_node_t* AXIS2_CALL
-axiom_soap_envelope_get_base_node(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env);
-
-
-int AXIS2_CALL
-axiom_soap_envelope_get_soap_version(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env);
-
-axiom_namespace_t* AXIS2_CALL
-axiom_soap_envelope_get_namespace(axiom_soap_envelope_t *envelope,
- const axis2_env_t *env);
-
+};
static axis2_status_t
-check_and_set_soap_version(axiom_soap_envelope_t *env_impl,
+check_and_set_soap_version(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
axiom_namespace_t *ns);
-
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_set_soap_version(axiom_soap_envelope_t *soap_envelope,
- const axis2_env_t *env,
- int soap_version);
-/*************** function implementations *************************************/
-
AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
axiom_soap_envelope_create_null(const axis2_env_t *env)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
+ axiom_soap_envelope_t *soap_envelope = NULL;
AXIS2_ENV_CHECK(env, NULL);
- envelope_impl = (axiom_soap_envelope_impl_t*)AXIS2_MALLOC(
+ soap_envelope = (axiom_soap_envelope_t*)AXIS2_MALLOC(
env->allocator,
- sizeof(axiom_soap_envelope_impl_t));
- if (!envelope_impl)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
- envelope_impl->soap_envelope.ops = NULL;
- envelope_impl->om_ele_node = NULL;
- envelope_impl->soap_version = AXIOM_SOAP12;
- envelope_impl->header = NULL;
- envelope_impl->body = NULL;
- envelope_impl->soap_builder = NULL;
-
- envelope_impl->soap_envelope.ops = AXIS2_MALLOC(env->allocator,
- sizeof(axiom_soap_envelope_ops_t));
- if (!envelope_impl->soap_envelope.ops)
+ sizeof(axiom_soap_envelope_t));
+ if (!soap_envelope)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- axiom_soap_envelope_free(&(envelope_impl->soap_envelope), env);
return NULL;
}
+ soap_envelope->om_ele_node = NULL;
+ soap_envelope->soap_version = AXIOM_SOAP12;
+ soap_envelope->header = NULL;
+ soap_envelope->body = NULL;
+ soap_envelope->soap_builder = NULL;
- envelope_impl->soap_envelope.ops->free_fn =
- axiom_soap_envelope_free;
-
- envelope_impl->soap_envelope.ops->get_base_node =
- axiom_soap_envelope_get_base_node;
-
- envelope_impl->soap_envelope.ops->get_soap_version =
- axiom_soap_envelope_get_soap_version;
-
- envelope_impl->soap_envelope.ops->get_body =
- axiom_soap_envelope_get_body;
-
- envelope_impl->soap_envelope.ops->get_header =
- axiom_soap_envelope_get_header;
-
- envelope_impl->soap_envelope.ops->get_namespace =
- axiom_soap_envelope_get_namespace;
-
- envelope_impl->soap_envelope.ops->serialize =
- axiom_soap_envelope_serialize;
-
- envelope_impl->soap_envelope.ops->set_soap_version =
- axiom_soap_envelope_set_soap_version;
- return &(envelope_impl->soap_envelope);
+ return soap_envelope;
}
@@ -164,35 +75,33 @@
axiom_soap_envelope_create(const axis2_env_t *env,
axiom_namespace_t *ns)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
- axiom_soap_envelope_t *envelope = NULL;
+ axiom_soap_envelope_t *soap_envelope = NULL;
axiom_element_t *ele = NULL;
int status = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, ns, NULL);
- envelope = axiom_soap_envelope_create_null(env);
- if (!envelope)
+ soap_envelope = axiom_soap_envelope_create_null(env);
+ if (!soap_envelope)
return NULL;
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- status = check_and_set_soap_version(&(envelope_impl->soap_envelope), env, ns);
+ status = check_and_set_soap_version(soap_envelope, env, ns);
if (status == AXIS2_FAILURE)
{
- AXIS2_FREE(env->allocator, envelope_impl);
+ AXIS2_FREE(env->allocator, soap_envelope);
return NULL;
}
ele = axiom_element_create(env, NULL,
AXIOM_SOAP_ENVELOPE_LOCAL_NAME, ns,
- &(envelope_impl->om_ele_node));
+ &(soap_envelope->om_ele_node));
if (!ele)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- axiom_soap_envelope_free(&(envelope_impl->soap_envelope), env);
+ axiom_soap_envelope_free(soap_envelope, env);
return NULL;
}
- return &(envelope_impl->soap_envelope);
+ return soap_envelope;
}
AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
@@ -232,136 +141,123 @@
return axiom_soap_envelope_create(env, ns);
}
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_free(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_envelope_free(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- if (envelope_impl->header)
- {
- AXIOM_SOAP_HEADER_FREE(envelope_impl->header, env);
- envelope_impl->header = NULL;
- }
- if (envelope_impl->body)
+
+ if (soap_envelope->header)
{
- AXIOM_SOAP_BODY_FREE(envelope_impl->body, env);
- envelope_impl->body = NULL;
+ AXIOM_SOAP_HEADER_FREE(soap_envelope->header, env);
+ soap_envelope->header = NULL;
}
- if (envelope->ops)
+ if (soap_envelope->body)
{
- AXIS2_FREE(env->allocator, envelope->ops);
- envelope->ops = NULL;
+ AXIOM_SOAP_BODY_FREE(soap_envelope->body, env);
+ soap_envelope->body = NULL;
}
- if (envelope_impl->om_ele_node)
+ if (soap_envelope->om_ele_node)
{
- if (envelope_impl->soap_builder)
+ if (soap_envelope->soap_builder)
{
- AXIOM_SOAP_BUILDER_FREE(envelope_impl->soap_builder, env);
- envelope_impl->soap_builder = NULL;
- envelope_impl->om_ele_node = NULL;
+ AXIOM_SOAP_BUILDER_FREE(soap_envelope->soap_builder, env);
+ soap_envelope->soap_builder = NULL;
+ soap_envelope->om_ele_node = NULL;
}
else
{
- AXIOM_NODE_FREE_TREE(envelope_impl->om_ele_node, env);
- envelope_impl->om_ele_node = NULL;
+ AXIOM_NODE_FREE_TREE(soap_envelope->om_ele_node, env);
+ soap_envelope->om_ele_node = NULL;
}
}
- AXIS2_FREE(env->allocator, envelope_impl);
- envelope_impl = NULL;
+ AXIS2_FREE(env->allocator, soap_envelope);
+ soap_envelope = NULL;
return AXIS2_SUCCESS;
}
-axiom_node_t* AXIS2_CALL
-axiom_soap_envelope_get_base_node(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+axiom_soap_envelope_get_base_node(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, NULL);
- return AXIS2_INTF_TO_IMPL(envelope)->om_ele_node;
+ return soap_envelope->om_ele_node;
}
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_set_base_node(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_envelope_set_base_node(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
axiom_node_t *node)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
+
if (AXIOM_NODE_GET_NODE_TYPE(node, env) != AXIOM_ELEMENT)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- envelope_impl->om_ele_node = node;
+ soap_envelope->om_ele_node = node;
return AXIS2_SUCCESS;
}
-int AXIS2_CALL
-axiom_soap_envelope_get_soap_version(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN int AXIS2_CALL
+axiom_soap_envelope_get_soap_version(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- return AXIS2_INTF_TO_IMPL(envelope)->soap_version;
+ return soap_envelope->soap_version;
}
/** this is an internal function */
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_set_soap_version_internal(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_envelope_set_soap_version_internal(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
int soap_version)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- envelope_impl->soap_version = soap_version;
+ soap_envelope->soap_version = soap_version;
return AXIS2_SUCCESS;
}
-axiom_soap_header_t* AXIS2_CALL
-axiom_soap_envelope_get_header(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axiom_soap_header_t* AXIS2_CALL
+axiom_soap_envelope_get_header(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
int status = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env, NULL);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- if (envelope_impl->header)
+ if (soap_envelope->header)
{
- return envelope_impl->header;
+ return soap_envelope->header;
}
- else if (envelope_impl->soap_builder)
+ else if (soap_envelope->soap_builder)
{
- while (!(envelope_impl->header) && !AXIOM_NODE_IS_COMPLETE(
- envelope_impl->om_ele_node, env))
+ while (!(soap_envelope->header) && !AXIOM_NODE_IS_COMPLETE(
+ soap_envelope->om_ele_node, env))
{
- status = AXIOM_SOAP_BUILDER_NEXT(envelope_impl->soap_builder, env);
+ status = AXIOM_SOAP_BUILDER_NEXT(soap_envelope->soap_builder, env);
if (status == AXIS2_FAILURE)
break;
}
}
- return envelope_impl->header;
+ return soap_envelope->header;
}
-axiom_soap_header_block_t* AXIS2_CALL
-axiom_soap_envelope_add_header(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axiom_soap_header_block_t* AXIS2_CALL
+axiom_soap_envelope_add_header(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
axis2_char_t *namespace_uri,
axis2_char_t *name)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
axiom_namespace_t *ns = NULL;
AXIS2_ENV_CHECK(env, NULL);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- /* TODO : cache SOAP header and envelope instead of looking them up?*/
- if (!envelope_impl->header)
+ /* TODO : cache SOAP header and soap_envelope instead of looking them up?*/
+ if (!soap_envelope->header)
return NULL;
if (namespace_uri)
@@ -369,58 +265,54 @@
ns = axiom_namespace_create(env, namespace_uri, NULL);
}
- return axiom_soap_header_block_create_with_parent(env, name, ns, envelope_impl->header);
+ return axiom_soap_header_block_create_with_parent(env, name, ns, soap_envelope->header);
}
-axiom_soap_body_t* AXIS2_CALL
-axiom_soap_envelope_get_body(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axiom_soap_body_t* AXIS2_CALL
+axiom_soap_envelope_get_body(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
int status = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env, NULL);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- if (envelope_impl->body)
+ if (soap_envelope->body)
{
- return envelope_impl->body;
+ return soap_envelope->body;
}
- else if (envelope_impl->soap_builder)
+ else if (soap_envelope->soap_builder)
{
- while (!(envelope_impl->body) && !AXIOM_NODE_IS_COMPLETE(envelope_impl->om_ele_node, env))
+ while (!(soap_envelope->body) && !AXIOM_NODE_IS_COMPLETE(soap_envelope->om_ele_node, env))
{
- status = AXIOM_SOAP_BUILDER_NEXT(envelope_impl->soap_builder, env);
+ status = AXIOM_SOAP_BUILDER_NEXT(soap_envelope->soap_builder, env);
if (status == AXIS2_FAILURE)
{
return NULL;
}
}
}
- return envelope_impl->body;
+ return soap_envelope->body;
}
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_serialize(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_envelope_serialize(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
axiom_output_t *om_output,
axis2_bool_t cache)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK(env->error, envelope, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, soap_envelope, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
/*
if soap version is soap11 we modify the soap fault part.
This is done because the builder construct a soap12 fault all
the time. So when serializing if the soap version is soap11
we should convert it back to soap11 fault
*/
- if (envelope_impl->soap_version == AXIOM_SOAP11)
+ if (soap_envelope->soap_version == AXIOM_SOAP11)
{
axiom_soap_body_t *soap_body = NULL;
- soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(envelope, env);
+ soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_envelope, env);
if (soap_body)
{
axiom_soap_fault_t *soap_fault = NULL;
@@ -571,84 +463,76 @@
Otherwise default values will be written
*/
AXIOM_OUTPUT_WRITE_XML_VERSION_ENCODING(om_output, env);
- return AXIOM_NODE_SERIALIZE(envelope_impl->om_ele_node, env, om_output);
+ return AXIOM_NODE_SERIALIZE(soap_envelope->om_ele_node, env, om_output);
}
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_set_body(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_envelope_set_body(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
axiom_soap_body_t *body)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- if (!(envelope_impl->body))
+ if (!(soap_envelope->body))
{
- envelope_impl->body = body;
+ soap_envelope->body = body;
}
else
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "trying to set a soap bedy to envelope when a soap body alrady exists");
+ "trying to set a soap bedy to soap_envelope when a soap body alrady exists");
return AXIS2_FAILURE;
}
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL axiom_soap_envelope_set_header(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_envelope_set_header(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env, axiom_soap_header_t *header)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- if (!(envelope_impl->header))
+ if (!(soap_envelope->header))
{
- envelope_impl->header = header;
+ soap_envelope->header = header;
}
else
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- " trying to set a soap header to envelope when a soap header alrady exists");
+ " trying to set a soap header to soap_envelope when a soap header alrady exists");
return AXIS2_FAILURE;
}
return AXIS2_SUCCESS;
}
-axiom_namespace_t* AXIS2_CALL
-axiom_soap_envelope_get_namespace(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axiom_namespace_t* AXIS2_CALL
+axiom_soap_envelope_get_namespace(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- if (envelope_impl->om_ele_node)
+ if (soap_envelope->om_ele_node)
{
axiom_element_t *ele = NULL;
- if (AXIOM_NODE_GET_NODE_TYPE(envelope_impl->om_ele_node, env) == AXIOM_ELEMENT)
+ if (AXIOM_NODE_GET_NODE_TYPE(soap_envelope->om_ele_node, env) == AXIOM_ELEMENT)
{
- ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT(envelope_impl->om_ele_node, env);
+ ele = (axiom_element_t*)AXIOM_NODE_GET_DATA_ELEMENT(soap_envelope->om_ele_node, env);
if (ele)
{
- return AXIOM_ELEMENT_GET_NAMESPACE(ele, env, envelope_impl->om_ele_node);
+ return AXIOM_ELEMENT_GET_NAMESPACE(ele, env, soap_envelope->om_ele_node);
}
}
}
return NULL;
}
-axis2_status_t AXIS2_CALL
-axiom_soap_envelope_set_builder(axiom_soap_envelope_t *envelope,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_envelope_set_builder(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
axiom_soap_builder_t *soap_builder)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, soap_builder, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
- envelope_impl->soap_builder = soap_builder;
+ soap_envelope->soap_builder = soap_builder;
return AXIS2_SUCCESS;
}
@@ -656,11 +540,10 @@
axiom_soap_envelope_create_default_soap_envelope(const axis2_env_t *env,
int soap_version)
{
- axiom_soap_envelope_t *soap_env = NULL;
+ axiom_soap_envelope_t *soap_envelope = NULL;
axiom_soap_header_t *soap_header = NULL;
axiom_soap_body_t *soap_body = NULL;
axiom_namespace_t *om_ns = NULL;
- axiom_soap_envelope_impl_t *env_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
if (soap_version == AXIOM_SOAP11)
{
@@ -669,14 +552,13 @@
AXIOM_SOAP_DEFAULT_NAMESPACE_PREFIX);
if (!om_ns)
return NULL;
- soap_env = axiom_soap_envelope_create(env, om_ns);
- env_impl = AXIS2_INTF_TO_IMPL(soap_env);
+ soap_envelope = axiom_soap_envelope_create(env, om_ns);
- soap_header = axiom_soap_header_create_with_parent(env, soap_env);
- soap_body = axiom_soap_body_create_with_parent(env, soap_env);
- env_impl->body = soap_body;
- env_impl->header = soap_header;
- return soap_env;
+ soap_header = axiom_soap_header_create_with_parent(env, soap_envelope);
+ soap_body = axiom_soap_body_create_with_parent(env, soap_envelope);
+ soap_envelope->body = soap_body;
+ soap_envelope->header = soap_header;
+ return soap_envelope;
}
else if (soap_version == AXIOM_SOAP12)
{
@@ -685,14 +567,13 @@
AXIOM_SOAP_DEFAULT_NAMESPACE_PREFIX);
if (!om_ns)
return NULL;
- soap_env = axiom_soap_envelope_create(env, om_ns);
- env_impl = AXIS2_INTF_TO_IMPL(soap_env);
+ soap_envelope = axiom_soap_envelope_create(env, om_ns);
- soap_header = axiom_soap_header_create_with_parent(env, soap_env);
- soap_body = axiom_soap_body_create_with_parent(env, soap_env);
- env_impl->body = soap_body;
- env_impl->header = soap_header;
- return soap_env;
+ soap_header = axiom_soap_header_create_with_parent(env, soap_envelope);
+ soap_body = axiom_soap_body_create_with_parent(env, soap_envelope);
+ soap_envelope->body = soap_body;
+ soap_envelope->header = soap_header;
+ return soap_envelope;
}
AXIS2_ERROR_SET(env->error,
@@ -708,9 +589,8 @@
axis2_array_list_t *sub_codes,
axiom_node_t *detail_node)
{
- axiom_soap_envelope_t *soap_env = NULL;
+ axiom_soap_envelope_t *soap_envelope = NULL;
axiom_soap_body_t *soap_body = NULL;
- axiom_soap_envelope_impl_t *env_impl = NULL;
axiom_soap_fault_t *fault = NULL;
AXIS2_ENV_CHECK(env, NULL);
@@ -721,24 +601,23 @@
return NULL;
}
- soap_env = axiom_soap_envelope_create_default_soap_envelope(env, soap_version);
- if (!soap_env)
+ soap_envelope = axiom_soap_envelope_create_default_soap_envelope(env, soap_version);
+ if (!soap_envelope)
{
return NULL;
}
- env_impl = AXIS2_INTF_TO_IMPL(soap_env);
- soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_env, env);
+ soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_envelope, env);
if (!soap_body)
{
- AXIOM_SOAP_ENVELOPE_FREE(soap_env, env);
+ AXIOM_SOAP_ENVELOPE_FREE(soap_envelope, env);
return NULL;
}
fault = axiom_soap_fault_create_default_fault(env, soap_body,
code_value, reason_text, soap_version);
if (!fault)
{
- AXIOM_SOAP_ENVELOPE_FREE(soap_env, env);
+ AXIOM_SOAP_ENVELOPE_FREE(soap_envelope, env);
return NULL;
}
@@ -770,36 +649,33 @@
}
}
- return soap_env;
+ return soap_envelope;
}
static axis2_status_t
-check_and_set_soap_version(axiom_soap_envelope_t *envelope,
+check_and_set_soap_version(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
axiom_namespace_t *ns)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
axis2_char_t *uri = NULL;
- if (!envelope)
+ if (!soap_envelope)
return AXIS2_FAILURE;
if (!ns)
return AXIS2_FAILURE;
- envelope_impl = AXIS2_INTF_TO_IMPL(envelope);
-
uri = AXIOM_NAMESPACE_GET_URI(ns, env);
if (!uri)
return AXIS2_FAILURE;
if (AXIS2_STRCMP(uri, AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI) == 0)
{
- envelope_impl->soap_version = AXIOM_SOAP11;
+ soap_envelope->soap_version = AXIOM_SOAP11;
return AXIS2_SUCCESS;
}
else if (AXIS2_STRCMP(uri, AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI) == 0)
{
- envelope_impl->soap_version = AXIOM_SOAP12;
+ soap_envelope->soap_version = AXIOM_SOAP12;
return AXIS2_SUCCESS;
}
else
@@ -810,20 +686,17 @@
return AXIS2_FAILURE;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_soap_envelope_set_soap_version(axiom_soap_envelope_t *soap_envelope,
const axis2_env_t *env,
int soap_version)
{
- axiom_soap_envelope_impl_t *envelope_impl = NULL;
axiom_element_t *env_ele = NULL;
axiom_namespace_t *env_ns = NULL;
const axis2_char_t *ns_uri = NULL;
int status = AXIS2_SUCCESS;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- envelope_impl = AXIS2_INTF_TO_IMPL(soap_envelope);
-
if (soap_version == AXIOM_SOAP11)
{
ns_uri = AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI;
@@ -838,14 +711,14 @@
}
env_ele = (axiom_element_t*)
- AXIOM_NODE_GET_DATA_ELEMENT(envelope_impl->om_ele_node,
+ AXIOM_NODE_GET_DATA_ELEMENT(soap_envelope->om_ele_node,
env);
if (!env_ele)
{
return AXIS2_FAILURE;
}
- env_ns = AXIOM_ELEMENT_GET_NAMESPACE(env_ele, env, envelope_impl->om_ele_node);
+ env_ns = AXIOM_ELEMENT_GET_NAMESPACE(env_ele, env, soap_envelope->om_ele_node);
if (!env_ns)
return AXIS2_FAILURE;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org