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 na...@apache.org on 2006/01/18 04:02:18 UTC
svn commit: r370023 - in /webservices/axis2/trunk/c: include/
modules/xml/om/ modules/xml/soap/ test/xml/soap/
Author: nandika
Date: Tue Jan 17 19:02:02 2006
New Revision: 370023
URL: http://svn.apache.org/viewcvs?rev=370023&view=rev
Log:
bugs fixed
Modified:
webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c
webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c
webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
webservices/axis2/trunk/c/modules/xml/soap/soap_fault_code.c
webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c
webservices/axis2/trunk/c/test/xml/soap/test_soap.c
Modified: webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_stax_builder.h?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_stax_builder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_stax_builder.h Tue Jan 17 19:02:02 2006
@@ -126,7 +126,14 @@
(struct axis2_om_stax_builder* builder,
axis2_env_t **env,
axis2_om_node_t *om_node);
-
+
+ int (AXIS2_CALL *get_element_level)(struct axis2_om_stax_builder* builder,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *set_element_level)
+ (struct axis2_om_stax_builder* builder,
+ axis2_env_t **env,
+ int element_level);
} axis2_om_stax_builder_ops_t;
@@ -178,6 +185,12 @@
#define AXIS2_OM_STAX_BUILDER_SET_LAST_NODE(builder, env, node) \
((builder)->ops->set_last_node(builder, env, node))
+
+#define AXIS2_OM_STAX_BUILDER_GET_ELEMENT_LEVEL(builder, env) \
+ ((builder)->ops->get_element_level(builder, env))
+
+#define AXIS2_OM_STAX_BUILDER_SET_ELEMENT_LEVEL(builder, env, element_level) \
+ ((builder)->ops->set_element_level(builder, env, element_level))
/** @} */
Modified: webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c Tue Jan 17 19:02:02 2006
@@ -63,7 +63,16 @@
axis2_status_t AXIS2_CALL
axis2_om_stax_builder_set_last_node(axis2_om_stax_builder_t *builder,
axis2_env_t **env,
- axis2_om_node_t *om_node);
+ axis2_om_node_t *om_node);
+
+int AXIS2_CALL
+axis2_om_stax_builder_get_element_level(axis2_om_stax_builder_t* builder,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_om_stax_builder_set_element_level(axis2_om_stax_builder_t* builder,
+ axis2_env_t **env,
+ int element_level);
/********************************* axis2_om_stax_builder_impl_t struct ********/
typedef struct axis2_om_stax_builder_impl_t
@@ -85,6 +94,8 @@
axis2_bool_t cache;
/** current event */
int current_event;
+
+ int element_level;
}axis2_om_stax_builder_impl_t;
@@ -120,6 +131,7 @@
builder->parser = parser;
builder->current_event = -1;
builder->root_node = NULL;
+ builder->element_level = 0;
/* ops */
builder->om_stax_builder.ops = NULL;
@@ -149,7 +161,11 @@
builder->om_stax_builder.ops->get_last_node =
axis2_om_stax_builder_get_lastnode;
builder->om_stax_builder.ops->is_complete =
- axis2_om_stax_builder_is_complete;
+ axis2_om_stax_builder_is_complete;
+ builder->om_stax_builder.ops->set_element_level =
+ axis2_om_stax_builder_set_element_level;
+ builder->om_stax_builder.ops->get_element_level =
+ axis2_om_stax_builder_get_element_level;
return &(builder->om_stax_builder);
}
@@ -431,6 +447,8 @@
return NULL;
}
+ builder_impl->element_level++;
+
if (!(builder_impl->lastnode))
{
axis2_om_element_create (env , NULL, temp_localname, NULL, &element_node);
@@ -628,7 +646,7 @@
AXIS2_FUNC_PARAM_CHECK(om_stax_builder, env, AXIS2_FAILURE );
builder = AXIS2_INTF_TO_IMPL(om_stax_builder);
-
+ builder->element_level--;
if (builder->lastnode)
{
if (AXIS2_OM_NODE_GET_BUILD_STATUS((builder->lastnode), env))
@@ -831,4 +849,24 @@
builder_impl->lastnode = om_node;
return AXIS2_SUCCESS;
}
-
\ No newline at end of file
+
+int AXIS2_CALL
+axis2_om_stax_builder_get_element_level(axis2_om_stax_builder_t* builder,
+ axis2_env_t **env)
+{
+ axis2_om_stax_builder_impl_t *builder_impl = NULL;
+ builder_impl = AXIS2_INTF_TO_IMPL(builder);
+ return builder_impl->element_level;
+
+}
+
+axis2_status_t AXIS2_CALL
+axis2_om_stax_builder_set_element_level(axis2_om_stax_builder_t* builder,
+ axis2_env_t **env,
+ int element_level)
+{
+ axis2_om_stax_builder_impl_t *builder_impl = NULL;
+ builder_impl = AXIS2_INTF_TO_IMPL(builder);
+ builder_impl->element_level = element_level;
+ return AXIS2_SUCCESS;
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c Tue Jan 17 19:02:02 2006
@@ -194,7 +194,7 @@
AXIS2_OM_NODE_SET_BUILD_STATUS(om_element_node, env, AXIS2_TRUE);
- AXIS2_SOAP_BUILDER_SET_ELEMENT_LEVEL(builder_helper_impl->soap_builder,
+ AXIS2_OM_STAX_BUILDER_SET_ELEMENT_LEVEL(builder_helper_impl->om_builder,
env, (element_level-1));
builder_helper_impl->fault_code_present = AXIS2_TRUE;
}
@@ -227,7 +227,7 @@
AXIS2_OM_NODE_SET_BUILD_STATUS(om_element_node, env, AXIS2_TRUE);
- AXIS2_SOAP_BUILDER_SET_ELEMENT_LEVEL(builder_helper_impl->soap_builder,
+ AXIS2_OM_STAX_BUILDER_SET_ELEMENT_LEVEL(builder_helper_impl->om_builder,
env , (element_level -1));
builder_helper_impl->fault_string_present = AXIS2_TRUE;
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c Tue Jan 17 19:02:02 2006
@@ -99,7 +99,7 @@
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
-
+ printf("builder helper 12");
builder_helper_impl->code_present = AXIS2_FALSE;
builder_helper_impl->detail_present = AXIS2_FALSE;
builder_helper_impl->reason_present = AXIS2_FALSE;
@@ -112,13 +112,14 @@
builder_helper_impl->builder_helper.ops = NULL;
builder_helper_impl->node_present = AXIS2_FALSE;
builder_helper_impl->soap_builder = soap_builder;
- builder_helper_impl->sub_sub_code_present = AXIS2_FALSE;
+ builder_helper_impl->sub_sub_code_present = AXIS2_FALSE;
+ builder_helper_impl->builder_helper.ops = NULL;
builder_helper_impl->builder_helper.ops = (axis2_soap12_builder_helper_ops_t*) AXIS2_MALLOC(
(*env)->allocator, sizeof(axis2_soap12_builder_helper_ops_t));
if(!(builder_helper_impl->builder_helper.ops))
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- AXIS2_FREE((*env)->allocator, builder_helper_impl->builder_helper.ops);
+ AXIS2_FREE((*env)->allocator, builder_helper_impl);
return NULL;
}
@@ -181,6 +182,7 @@
{
if(AXIS2_STRCMP(AXIS2_SOAP12_SOAP_FAULT_CODE_LOCAL_NAME, ele_localname) == 0)
{
+
if(builder_helper_impl->code_present)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MULTIPLE_CODE_ELEMENTS_ENCOUNTERED, AXIS2_FAILURE);
@@ -194,6 +196,7 @@
AXIS2_SOAP_FAULT_SET_CODE(soap_fault, env, soap_fault_code);
builder_helper_impl->code_present = AXIS2_TRUE;
builder_helper_impl->code_processing = AXIS2_TRUE;
+
}
}
else if(AXIS2_STRCMP(AXIS2_SOAP12_SOAP_FAULT_REASON_LOCAL_NAME, ele_localname) == 0)
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_body.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_body.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_body.c Tue Jan 17 19:02:02 2006
@@ -294,26 +294,32 @@
*
* @throws OMException
*/
-axis2_status_t AXIS2_CALL axis2_soap_body_add_fault(axis2_soap_body_t *body,
- axis2_env_t **env,
- axis2_soap_fault_t *soap_fault)
+axis2_status_t AXIS2_CALL
+axis2_soap_body_add_fault(axis2_soap_body_t *body,
+ axis2_env_t **env,
+ axis2_soap_fault_t *soap_fault)
{
axis2_soap_body_impl_t *body_impl = NULL;
+ axis2_om_node_t *fault_node = NULL;
AXIS2_FUNC_PARAM_CHECK(body, env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, soap_fault, AXIS2_FAILURE);
body_impl = AXIS2_INTF_TO_IMPL(body);
if (body_impl->has_fault)
{
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_ONLY_ONE_SOAP_FAULT_ALLOWED_IN_BODY, AXIS2_FAILURE);
+ AXIS2_ERROR_SET((*env)->error,
+ AXIS2_ERROR_ONLY_ONE_SOAP_FAULT_ALLOWED_IN_BODY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- if (soap_fault)
+ fault_node = AXIS2_SOAP_FAULT_GET_BASE_NODE(soap_fault, env);
+ if(fault_node)
{
body_impl->soap_fault = soap_fault;
- AXIS2_OM_NODE_ADD_CHILD(body_impl->om_ele_node, env, AXIS2_SOAP_FAULT_GET_BASE_NODE(soap_fault, env));
+ /*AXIS2_OM_NODE_ADD_CHILD(fault_node , env, (body_impl->om_ele_node));*/
body_impl->has_fault = AXIS2_TRUE;
+ return AXIS2_SUCCESS;
}
- return AXIS2_SUCCESS;
+ return AXIS2_FAILURE;
}
axis2_om_node_t* AXIS2_CALL
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c Tue Jan 17 19:02:02 2006
@@ -112,9 +112,6 @@
axis2_om_node_t *om_node,
int is_soap_element);
-static axis2_status_t
-axis2_soap_builder_end_element(axis2_soap_builder_t *builder,
- axis2_env_t **env);
static axis2_status_t
@@ -268,8 +265,8 @@
if(!(builder_impl->om_builder))
return NULL;
- while(!(builder_impl->soap_envelope) ||
- AXIS2_OM_STAX_BUILDER_IS_COMPLETE(builder_impl->om_builder, env))
+ while(!(builder_impl->soap_envelope) &&
+ !AXIS2_OM_STAX_BUILDER_IS_COMPLETE(builder_impl->om_builder, env))
{
value = axis2_soap_builder_next(builder, env);
}
@@ -308,7 +305,7 @@
builder_impl->last_node_status = AXIS2_BUILDER_LAST_NODE_DONE_TRUE;
}else
{
- builder_impl->last_node_status = AXIS2_BUILDER_LAST_NODE_NULL;
+ builder_impl->last_node_status = AXIS2_BUILDER_LAST_NODE_DONE_FALSE;
}
current_node = AXIS2_OM_STAX_BUILDER_NEXT(builder_impl->om_builder, env);
@@ -317,9 +314,9 @@
current_event == AXIS2_XML_READER_START_ELEMENT)
{
axis2_soap_builder_create_om_element(builder, env, current_node);
- axis2_soap_builder_end_element(builder, env);
-
- }
+ }
+
+ printf("\n element level %d ", AXIS2_OM_STAX_BUILDER_GET_ELEMENT_LEVEL( builder_impl->om_builder, env));
return current_node;
}
@@ -334,16 +331,7 @@
return AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(builder_impl->soap_envelope, env);
}
-static axis2_status_t
-axis2_soap_builder_end_element(axis2_soap_builder_t *builder,
- axis2_env_t **env)
-{
- axis2_soap_builder_impl_t *builder_impl = NULL;
- AXIS2_FUNC_PARAM_CHECK(builder, env, AXIS2_FAILURE);
- builder_impl = AXIS2_INTF_TO_IMPL(builder);
- builder_impl->element_level--;
- return AXIS2_SUCCESS;
-}
+
axis2_status_t
axis2_soap_builder_create_om_element
@@ -356,9 +344,9 @@
AXIS2_FUNC_PARAM_CHECK( builder, env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, current_node, AXIS2_FAILURE);
builder_impl = AXIS2_INTF_TO_IMPL(builder);
- builder_impl->element_level++;
if(builder_impl->last_node_status == AXIS2_BUILDER_LAST_NODE_NULL)
{
+
ret_val = axis2_soap_builder_construct_node(builder, env, NULL, current_node, AXIS2_TRUE);
}else if(builder_impl->last_node_status == AXIS2_BUILDER_LAST_NODE_DONE_TRUE)
@@ -386,29 +374,36 @@
axis2_om_element_t *parent_ele = NULL;
axis2_char_t *parent_localname = NULL;
axis2_char_t *element_name = NULL;
+ int element_level = 0;
axis2_om_element_t *om_element = NULL;
AXIS2_FUNC_PARAM_CHECK(builder, env, NULL);
AXIS2_PARAM_CHECK((*env)->error, om_element_node, NULL);
builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+ element_level = AXIS2_OM_STAX_BUILDER_GET_ELEMENT_LEVEL(builder_impl->om_builder, env);
+
om_element = (axis2_om_element_t *)
AXIS2_OM_NODE_GET_DATA_ELEMENT(om_element_node, env);
element_name = AXIS2_OM_ELEMENT_GET_LOCALNAME(om_element, env);
+
if(parent)
{
parent_ele = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(parent, env);
parent_localname = AXIS2_OM_ELEMENT_GET_LOCALNAME(parent_ele, env);
}
if(!parent && is_soap_envelope)
- {
+ {
int status = AXIS2_SUCCESS;
+
if(AXIS2_STRCASECMP(element_name, AXIS2_SOAP_ENVELOPE_LOCAL_NAME) != 0)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_SOAP_MESSAGE_FIRST_ELEMENT_MUST_CONTAIN_LOCAL_NAME, AXIS2_FAILURE);
return NULL;
}
+ printf("\n soap envelope \n");
builder_impl->soap_envelope = axis2_soap_envelope_create_null(env);
status = AXIS2_SOAP_ENVELOPE_SET_BASE_NODE(builder_impl->soap_envelope, env, om_element_node);
@@ -416,11 +411,12 @@
axis2_soap_builder_process_namespace_data(builder, env, om_element_node, AXIS2_TRUE);
}
- else if(builder_impl->element_level == 2)
+ else if(element_level == 2)
{
axis2_soap_header_t *soap_header = NULL;
if(AXIS2_STRCMP(element_name, AXIS2_SOAP_HEADER_LOCAL_NAME) == 0)
{
+ printf("\n soap header \n");
if(builder_impl->header_present)
{
AXIS2_ERROR_SET((*env)->error,
@@ -443,6 +439,7 @@
else if(AXIS2_STRCMP(element_name, AXIS2_SOAP_BODY_LOCAL_NAME))
{
axis2_soap_body_t *soap_body = NULL;
+ printf("\n soap body \n");
if(builder_impl->body_present)
{
AXIS2_ERROR_SET((*env)->error,
@@ -464,11 +461,13 @@
return NULL;
}
}
- else if((builder_impl->element_level == 3) && AXIS2_STRCASECMP(parent_localname,
+ else if((element_level == 3) && AXIS2_STRCASECMP(parent_localname,
AXIS2_SOAP_HEADER_LOCAL_NAME) == 0)
{
axis2_soap_header_block_t *header_block = NULL;
axis2_soap_header_t *soap_header = NULL;
+
+ printf("\n soap header block \n");
header_block = axis2_soap_header_block_create(env);
AXIS2_SOAP_HEADER_BLOCK_SET_BASE_NODE(header_block, env, om_element_node);
AXIS2_SOAP_HEADER_BLOCK_SET_SOAP_VERSION(header_block, env, builder_impl->soap_version);
@@ -476,44 +475,64 @@
AXIS2_SOAP_HEADER_SET_HEADER_BLOCK(soap_header, env, header_block);
}
- else if((builder_impl->element_level == 3) &&
+ else if((element_level == 3) &&
AXIS2_STRCASECMP(parent_localname, AXIS2_SOAP_BODY_LOCAL_NAME) == 0 &&
AXIS2_STRCASECMP(element_name, AXIS2_SOAP_BODY_FAULT_LOCAL_NAME) == 0)
{
axis2_soap_body_t *soap_body = NULL;
axis2_soap_fault_t *soap_fault = NULL;
+ axis2_om_node_t *envelope_node = NULL;
+ axis2_om_element_t *envelope_ele = NULL;
+ axis2_om_namespace_t *env_ns = NULL;
+ printf("\n soap body \n");
+ printf("%s", element_name);
+ envelope_node = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(
+ builder_impl->soap_envelope, env);
+ envelope_ele = (axis2_om_element_t *)
+ AXIS2_OM_NODE_GET_DATA_ELEMENT(envelope_node, env);
+ env_ns = AXIS2_OM_ELEMENT_GET_NAMESPACE(envelope_ele, env);
+
soap_body = AXIS2_SOAP_ENVELOPE_GET_BODY(builder_impl->soap_envelope, env);
+ /*
+ printf("________________%s", AXIS2_OM_ELEMENT_GET_LOCALNAME(
+ (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(AXIS2_SOAP_BODY_GET_BASE_NODE(soap_body,env), env), env));
+ */
soap_fault = axis2_soap_fault_create(env);
+
AXIS2_SOAP_FAULT_SET_BASE_NODE(soap_fault, env, om_element_node);
+
AXIS2_SOAP_FAULT_SET_SOAP_VERSION(soap_fault, env, builder_impl->soap_version);
+
AXIS2_SOAP_BODY_ADD_FAULT(soap_body, env, soap_fault);
builder_impl->processing_fault = AXIS2_TRUE;
builder_impl->processing_mandatory_fault_elements = AXIS2_TRUE;
-
if(AXIS2_STRCMP(AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI,
- AXIS2_OM_NAMESPACE_GET_URI(builder_impl->envelope_ns, env)) == 0)
+ AXIS2_OM_NAMESPACE_GET_URI(env_ns , env)) == 0)
{
builder_impl->builder_helper = axis2_soap12_builder_helper_create(env, builder);
}
else if(AXIS2_STRCMP(AXIS2_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI,
- AXIS2_OM_NAMESPACE_GET_URI(builder_impl->envelope_ns, env)) == 0)
+ AXIS2_OM_NAMESPACE_GET_URI(env_ns , env)) == 0)
{
builder_impl->builder_helper = axis2_soap11_builder_helper_create(env, builder, builder_impl->om_builder);
- }
- }else if(builder_impl->element_level > 3 && builder_impl->processing_fault)
+ }
+
+ }
+ else if(element_level > 3 && builder_impl->processing_fault)
{
if(builder_impl->soap_version == AXIS2_SOAP11)
{
AXIS2_SOAP11_BUILDER_HELPER_HANDLE_EVENT(((axis2_soap11_builder_helper_t*)(builder_impl->builder_helper)),
- env, om_element_node , builder_impl->element_level);
+ env, om_element_node , element_level);
}
if(builder_impl->soap_version == AXIS2_SOAP12)
{
+ printf(" handel event 12");
AXIS2_SOAP12_BUILDER_HELPER_HANDLE_EVENT(((axis2_soap12_builder_helper_t *)(builder_impl->builder_helper)),
- env, om_element_node , builder_impl->element_level);
+ env, om_element_node , element_level);
}
}
return om_element_node;
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_code.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_code.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_code.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_code.c Tue Jan 17 19:02:02 2006
@@ -104,7 +104,8 @@
fault_code_impl->fault_code.ops = NULL;
fault_code_impl->om_ele = NULL;
fault_code_impl->om_ele_node = NULL;
-
+ fault_code_impl->subcode = NULL;
+ fault_code_impl->value = NULL;
fault_code_impl->soap_version = AXIS2_SOAP_VERSION_NOT_SET;
fault_code_impl->parent = NULL;
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_header.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_header.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_header.c Tue Jan 17 19:02:02 2006
@@ -112,6 +112,8 @@
header_impl->om_ele = NULL;
header_impl->om_ele_node = NULL;
header_impl->hbnumber = 0;
+ header_impl->header_blocks = NULL;
+
header_impl->soap_header.ops = NULL;
header_impl->soap_header.ops = (axis2_soap_header_ops_t*)AXIS2_MALLOC((*env)->allocator,
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c Tue Jan 17 19:02:02 2006
@@ -68,7 +68,8 @@
{
AXIS2_OM_NODE_FREE_TREE(*my_node, env);
}
- AXIS2_OM_NODE_ADD_CHILD(new_node, env, parent);
+ if(parent && new_node)
+ AXIS2_OM_NODE_ADD_CHILD(new_node, env, parent);
*my_node = new_node;
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/test/xml/soap/test_soap.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/xml/soap/test_soap.c?rev=370023&r1=370022&r2=370023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/xml/soap/test_soap.c (original)
+++ webservices/axis2/trunk/c/test/xml/soap/test_soap.c Tue Jan 17 19:02:02 2006
@@ -96,18 +96,22 @@
return AXIS2_FAILURE;
}
*/
- while(AXIS2_OM_NODE_GET_BUILD_STATUS(om_node, env) != AXIS2_TRUE)
+ while(!(AXIS2_OM_STAX_BUILDER_IS_COMPLETE(om_builder, env)) && !(AXIS2_OM_NODE_GET_BUILD_STATUS(om_node, env)))
{
AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
}
- /*
+ /*
AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
- */
-
+ AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
+ AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
+ AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
+ AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
+ AXIS2_SOAP_BUILDER_NEXT(soap_builder, env);
+ */
xml_writer = axis2_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE);
om_output = axis2_om_output_create( env, xml_writer);
AXIS2_SOAP_ENVELOPE_SERIALIZE(soap_envelope, env, om_output, AXIS2_FALSE);
@@ -157,16 +161,18 @@
filename = argv[1];
allocator = axis2_allocator_init (NULL);
log = axis2_log_create(allocator, NULL);
+ axis2_error_init();
error = axis2_error_create(allocator);
env = axis2_env_create_with_error_log(allocator, error, log);
- /*
- build_soap_programatically(&env);
+ /*build_soap_programatically(&env);*/
+ /*
printf("\nbuild soap\n");
*/
build_soap(&env, filename);
+ getchar();
return 0;
}