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/23 12:44:52 UTC
svn commit: r371530 - in /webservices/axis2/trunk/c: include/
modules/xml/om/ modules/xml/soap/
Author: nandika
Date: Mon Jan 23 03:44:32 2006
New Revision: 371530
URL: http://svn.apache.org/viewcvs?rev=371530&view=rev
Log: (empty)
Modified:
webservices/axis2/trunk/c/include/axis2_soap_fault_reason.h
webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c
webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c
webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c
webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c
webservices/axis2/trunk/c/modules/xml/soap/soap_fault_node.c
webservices/axis2/trunk/c/modules/xml/soap/soap_fault_reason.c
webservices/axis2/trunk/c/modules/xml/soap/soap_fault_role.c
webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c
Modified: webservices/axis2/trunk/c/include/axis2_soap_fault_reason.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_fault_reason.h?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_fault_reason.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_fault_reason.h Mon Jan 23 03:44:32 2006
@@ -32,6 +32,7 @@
typedef struct axis2_soap_fault_reason_ops axis2_soap_fault_reason_ops_t;
typedef struct axis2_soap_fault_reason axis2_soap_fault_reason_t;
struct axis2_soap_fault_text;
+struct axis2_soap_builder;
/**
* @defgroup axis2_soap_fault_reason
* @ingroup axis2_soap
@@ -82,7 +83,11 @@
(axis2_soap_fault_reason_t *fault_reason,
axis2_env_t **env,
int soap_version);
-
+
+ axis2_status_t (AXIS2_CALL *set_builder)
+ (axis2_soap_fault_reason_t *fault_reason,
+ axis2_env_t **env,
+ struct axis2_soap_builder *builder);
};
/**
@@ -132,6 +137,9 @@
#define AXIS2_SOAP_FAULT_REASON_SET_SOAP_VERSION(fault_reason, env) \
((fault_reason)->ops->set_soap_version(fault_reason, env))
+
+#define AXIS2_SOAP_FAULT_REASON_SET_BUILDER(fault_reason, env, builder) \
+ ((fault_reason)->ops->set_builder(fault_reason, env, builder))
/** @} */
#ifdef __cplusplus
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=371530&r1=371529&r2=371530&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 Mon Jan 23 03:44:32 2006
@@ -897,7 +897,6 @@
}
token = AXIS2_XML_READER_NEXT (builder_impl->parser, env);
-
if(token == -1)
{
/* builder_impl->done = 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=371530&r1=371529&r2=371530&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 Mon Jan 23 03:44:32 2006
@@ -221,6 +221,9 @@
AXIS2_SOAP_FAULT_REASON_SET_BASE_NODE(fault_reason, env, om_ele_node);
AXIS2_SOAP_FAULT_SET_SOAP_VERSION(fault_reason, env, AXIS2_SOAP12);
AXIS2_SOAP_FAULT_SET_REASON(soap_fault, env, fault_reason);
+ AXIS2_SOAP_FAULT_REASON_SET_BUILDER(soap_fault, env,
+ builder_helper_impl->soap_builder);
+
builder_helper_impl->reason_present = AXIS2_TRUE;
builder_helper_impl->reason_processing = AXIS2_TRUE;
}
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=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c Mon Jan 23 03:44:32 2006
@@ -214,6 +214,7 @@
builder_impl->soap_builder.ops->get_soap_version =
axis2_soap_builder_get_soap_version;
status = identify_soap_version(&(builder_impl->soap_builder), env, soap_version);
+ printf(" \nbuilder soap version %d \n", builder_impl->soap_version);
if(status == AXIS2_FAILURE)
{
axis2_soap_builder_free(&(builder_impl->soap_builder), env);
@@ -421,8 +422,6 @@
status = AXIS2_SOAP_ENVELOPE_SET_BASE_NODE(builder_impl->soap_envelope,
env, om_element_node);
- AXIS2_SOAP_ENVELOPE_SET_SOAP_VERSION(builder_impl->soap_envelope, env, builder_impl->soap_version);
-
AXIS2_SOAP_ENVELOPE_SET_BUILDER(builder_impl->soap_envelope, env, builder);
status = axis2_soap_builder_process_namespace_data(builder, env, om_element_node, AXIS2_TRUE);
@@ -622,6 +621,9 @@
builder_impl->soap_version = AXIS2_SOAP11;
else if(AXIS2_STRCMP(AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI, ns_uri) == 0)
builder_impl->soap_version = AXIS2_SOAP12;
+
+
+ AXIS2_SOAP_ENVELOPE_SET_SOAP_VERSION(builder_impl->soap_envelope, env, builder_impl->soap_version);
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c Mon Jan 23 03:44:32 2006
@@ -21,7 +21,7 @@
#include <axis2_hash.h>
#include <axis2_soap.h>
#include <axis2_soap_builder.h>
-
+ #include <axis2_soap_fault_code.h>
/******************* impl struct *********************************************/
typedef struct axis2_soap_envelope_impl_t
@@ -525,11 +525,48 @@
OMConstants.DEFAULT_CHAR_SET_ENCODING : charSetEncoding,
xmlVersion == null ? OMConstants.DEFAULT_XML_VERSION : xmlVersion);
}*/
+ /*
+ if(envelope_impl->soap_version == AXIS2_SOAP11)
+ {
+ axis2_om_node_t *fault_node = NULL;
+ axis2_om_element_t *fault_ele = NULL;
+ axis2_soap_fault_t *soap_fault = NULL;
+ axis2_soap_body_t *soap_body = NULL;
+ axis2_soap_fault_code_t *fault_code = NULL;
+ axis2_om_node_t *om_node = NULL;
+ axis2_om_element_t *om_ele = NULL;
+
+ axis2_om_node_t *om_node1 = NULL;
+ axis2_om_element_t *om_ele1 = NULL;
+ soap_body = AXIS2_SOAP_ENVELOPE_GET_BODY(envelope, env);
+ if(soap_body)
+ {
+ if(AXIS2_SOAP_BODY_HAS_FAULT(soap_body, env))
+ {
+ soap_fault = AXIS2_SOAP_BODY_GET_FAULT(soap_body, env);
+ fault_code = AXIS2_SOAP_FAULT_GET_CODE(soap_fault, env);
+ if(fault_code)
+ {
+ om_node = AXIS2_SOAP_FAULT_CODE_GET_BASE_NODE(fault_code, env);
+ om_ele = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(om_node, env);
+ AXIS2_OM_ELEMENT_SET_LOCALNAME(om_ele, env, AXIS2_SOAP11_SOAP_FAULT_CODE_LOCAL_NAME);
+
+
+
+
+
+ }
+ }
+ }
+ }
+ */
return AXIS2_OM_NODE_SERIALIZE(envelope_impl->om_ele_node, env, om_output);
}
-axis2_status_t AXIS2_CALL axis2_soap_envelope_set_body(axis2_soap_envelope_t *envelope,
- axis2_env_t **env, axis2_soap_body_t *body)
+axis2_status_t AXIS2_CALL
+axis2_soap_envelope_set_body(axis2_soap_envelope_t *envelope,
+ axis2_env_t **env,
+ axis2_soap_body_t *body)
{
axis2_soap_envelope_impl_t *envelope_impl = NULL;
AXIS2_FUNC_PARAM_CHECK(envelope, env, AXIS2_FAILURE);
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c Mon Jan 23 03:44:32 2006
@@ -755,6 +755,7 @@
{
axis2_soap_fault_impl_t *fault_impl = NULL;
AXIS2_PARAM_CHECK((*env)->error, builder, AXIS2_FAILURE);
+ fault_impl = AXIS2_INTF_TO_IMPL(fault);
fault_impl->soap_builder = builder;
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c Mon Jan 23 03:44:32 2006
@@ -33,8 +33,6 @@
axis2_soap_fault_t *parent;
-
-
}axis2_soap_fault_detail_impl_t;
/***************** Macro *****************************************************/
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_node.c?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_node.c Mon Jan 23 03:44:32 2006
@@ -28,8 +28,6 @@
axis2_om_node_t *om_ele_node;
- axis2_soap_fault_t *parent;
-
int soap_version;
}axis2_soap_fault_node_impl_t;
@@ -94,7 +92,6 @@
fault_node_impl->fault_node.ops = NULL;
fault_node_impl->om_ele = NULL;
fault_node_impl->om_ele_node = NULL;
- fault_node_impl->parent = NULL;
fault_node_impl->fault_node.ops = (axis2_soap_fault_node_ops_t*)AXIS2_MALLOC(
(*env)->allocator, sizeof(axis2_soap_fault_node_ops_t));
@@ -150,8 +147,6 @@
return NULL;
fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node);
-
- fault_node_impl->parent = fault;
parent_node = AXIS2_SOAP_FAULT_GET_BASE_NODE(fault, env);
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_reason.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_reason.c?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_reason.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_reason.c Mon Jan 23 03:44:32 2006
@@ -20,6 +20,7 @@
#include <axis2_soap_fault_text.h>
#include <axis2_soap_utils.h>
#include <axis2_soap_builder.h>
+#include <axis2_soap_builder.h>
/*************************** impl struct **************************************/
@@ -83,6 +84,12 @@
(axis2_soap_fault_reason_t *fault_reason,
axis2_env_t **env,
int soap_version);
+
+axis2_status_t AXIS2_CALL
+axis2_soap_fault_reason_set_builder(axis2_soap_fault_reason_t *fault_reason,
+ axis2_env_t **env,
+ axis2_soap_builder_t *builder);
+
/************************* function implementations ***************************/
@@ -138,8 +145,12 @@
axis2_soap_fault_reason_get_soap_version;
fault_reason_impl->fault_reason.ops->set_soap_version =
- axis2_soap_fault_reason_set_soap_version;
-
+ axis2_soap_fault_reason_set_soap_version;
+
+ fault_reason_impl->fault_reason.ops->set_builder =
+ axis2_soap_fault_reason_set_builder;
+
+
return &(fault_reason_impl->fault_reason);
}
@@ -257,12 +268,26 @@
axis2_om_node_t *text_node = NULL;
axis2_om_node_t *this_node = NULL;
axis2_soap_fault_text_t* text = NULL;
+ int status = AXIS2_SUCCESS;
AXIS2_FUNC_PARAM_CHECK(fault_reason, env, NULL);
AXIS2_PARAM_CHECK((*env)->error, fault_reason, NULL);
fault_reason_impl = AXIS2_INTF_TO_IMPL(fault_reason);
this_node = fault_reason_impl->om_ele_node ;
-
+
+ if(fault_reason_impl->text)
+ {
+ return fault_reason_impl->text;
+ }
+ if(fault_reason_impl->soap_builder && !(fault_reason_impl->text))
+ {
+ while( !(fault_reason_impl->text) && !(AXIS2_OM_NODE_GET_BUILD_STATUS(fault_reason_impl->om_ele_node, env)))
+ {
+ status = AXIS2_SOAP_BUILDER_NEXT(fault_reason_impl->soap_builder, env);
+ if(status == AXIS2_FAILURE)
+ return NULL;
+ }
+ }
if(!(fault_reason_impl->text))
{
@@ -332,7 +357,19 @@
AXIS2_PARAM_CHECK((*env)->error, soap_version, AXIS2_FAILURE);
AXIS2_INTF_TO_IMPL(fault_reason)->soap_version = soap_version;
return AXIS2_SUCCESS;
-}
+}
+
+axis2_status_t AXIS2_CALL
+axis2_soap_fault_reason_set_builder(axis2_soap_fault_reason_t *fault_reason,
+ axis2_env_t **env,
+ axis2_soap_builder_t *builder)
+{
+ axis2_soap_fault_reason_impl_t *fault_reason_impl = NULL;
+ AXIS2_PARAM_CHECK((*env)->error, builder, AXIS2_FAILURE);
+ fault_reason_impl = AXIS2_INTF_TO_IMPL(fault_reason);
+ fault_reason_impl->soap_builder = builder;
+ return AXIS2_SUCCESS;
+}
/************************** soap11 ********************************************/
AXIS2_DECLARE(axis2_soap_fault_reason_t *)
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_role.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_role.c?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_role.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_role.c Mon Jan 23 03:44:32 2006
@@ -26,14 +26,10 @@
int soap_version;
- axis2_soap_fault_t *parent;
-
axis2_om_node_t *om_ele_node;
axis2_om_element_t *om_ele;
- axis2_soap_builder_t *soap_builder;
-
}axis2_soap_fault_role_impl_t;
/**************************** Macro *******************************************/
@@ -101,8 +97,6 @@
fault_role_impl->om_ele_node = NULL;
fault_role_impl->soap_version = AXIS2_SOAP_VERSION_NOT_SET;
- fault_role_impl->parent = NULL;
-
fault_role_impl->fault_role.ops =
(axis2_soap_fault_role_ops_t*)AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_soap_fault_role_ops_t));
@@ -159,8 +153,6 @@
return NULL;
fault_role_impl = AXIS2_INTF_TO_IMPL(fault_role);
-
- fault_role_impl->parent = fault;
parent_node = AXIS2_SOAP_FAULT_GET_BASE_NODE(fault, env);
Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c?rev=371530&r1=371529&r2=371530&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c Mon Jan 23 03:44:32 2006
@@ -31,10 +31,6 @@
axis2_om_element_t *om_ele;
/** pointer to parent */
- void* parent;
- /** parent type */
- int parent_type;
-
int soap_version;
}axis2_soap_fault_value_impl_t;
@@ -86,8 +82,6 @@
fault_val_impl->om_ele_node = NULL;
fault_val_impl->om_ele = NULL;
- fault_val_impl->parent = NULL;
- fault_val_impl->parent_type = -1;
fault_val_impl->soap_version = AXIS2_SOAP_VERSION_NOT_SET;
fault_val_impl->fault_value.ops = NULL;
@@ -139,8 +133,6 @@
fault_val_impl = AXIS2_INTF_TO_IMPL(fault_value);
- fault_val_impl->parent = parent;
- fault_val_impl->parent_type = AXIS2_SOAP_FAULT_SUB_CODE;
parent_node = AXIS2_SOAP_FAULT_SUB_CODE_GET_BASE_NODE(parent, env);
parent_ele = (axis2_om_element_t*)
@@ -177,9 +169,6 @@
}
fault_val_impl = AXIS2_INTF_TO_IMPL(fault_value);
-
- fault_val_impl->parent = parent;
- fault_val_impl->parent_type = AXIS2_SOAP_FAULT_CODE;
parent_node = AXIS2_SOAP_FAULT_CODE_GET_BASE_NODE(parent, env);
parent_ele = (axis2_om_element_t*)