00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIOM_SOAP_FAULT_H
00018 #define AXIOM_SOAP_FAULT_H
00019
00020
00025 #include <axiom_soap_const.h>
00026 #include <axis2_env.h>
00027 #include <axiom_node.h>
00028 #include <axiom_element.h>
00029
00030
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035
00036 typedef struct axiom_soap_fault axiom_soap_fault_t;
00037 typedef struct axiom_soap_fault_ops axiom_soap_fault_ops_t;
00038
00039 struct axiom_soap_fault_reason;
00040 struct axiom_soap_fault_detail;
00041 struct axiom_soap_fault_sub_code;
00042 struct axiom_soap_fault_code;
00043 struct axiom_soap_fault_node;
00044 struct axiom_soap_fault_role;
00045 struct axiom_soap_fault_text;
00046 struct axiom_soap_fault_value;
00047 struct axiom_soap_body;
00048 struct axiom_soap_builder;
00049
00060 struct axiom_soap_fault_ops
00061 {
00070 axis2_status_t (AXIS2_CALL *
00071 free_fn)(axiom_soap_fault_t *fault,
00072 const axis2_env_t *env);
00082 struct axiom_soap_fault_code * (AXIS2_CALL *
00083 get_code)(axiom_soap_fault_t *fault,
00084 const axis2_env_t *env);
00092 struct axiom_soap_fault_reason *(AXIS2_CALL *
00093 get_reason)(axiom_soap_fault_t *fault,
00094 const axis2_env_t *env);
00095
00102 struct axiom_soap_fault_node* (AXIS2_CALL *
00103 get_node)(axiom_soap_fault_t *fault,
00104 const axis2_env_t *env);
00105
00112 struct axiom_soap_fault_role* (AXIS2_CALL *
00113 get_role)(axiom_soap_fault_t *fault,
00114 const axis2_env_t *env);
00122 struct axiom_soap_fault_detail* (AXIS2_CALL *
00123 get_detail)(axiom_soap_fault_t *fault,
00124 const axis2_env_t *env);
00131 axis2_char_t * (AXIS2_CALL *
00132 get_exception)(axiom_soap_fault_t *fault,
00133 const axis2_env_t *env);
00140 axis2_status_t (AXIS2_CALL *
00141 set_exception) (axiom_soap_fault_t *fault,
00142 const axis2_env_t *env,
00143 axis2_char_t *exception);
00152 axiom_node_t* (AXIS2_CALL *
00153 get_base_node)(axiom_soap_fault_t *fault,
00154 const axis2_env_t *env);
00155
00156
00157 };
00158
00163 struct axiom_soap_fault
00164 {
00166 axiom_soap_fault_ops_t *ops;
00167
00168 };
00169
00181 AXIS2_EXTERN axiom_soap_fault_t * AXIS2_CALL
00182 axiom_soap_fault_create_with_parent(const axis2_env_t *env,
00183 struct axiom_soap_body *parent);
00184
00195 AXIS2_EXTERN axiom_soap_fault_t * AXIS2_CALL
00196 axiom_soap_fault_create_with_exception(const axis2_env_t *env,
00197 struct axiom_soap_body *parent,
00198 axis2_char_t* exception);
00199
00200 AXIS2_EXTERN axiom_soap_fault_t * AXIS2_CALL
00201 axiom_soap_fault_create_default_fault(const axis2_env_t *env,
00202 struct axiom_soap_body *parent,
00203 const axis2_char_t *code_value,
00204 const axis2_char_t *reason_text,
00205 const int soap_version);
00206
00207
00208
00209
00211 #define AXIOM_SOAP_FAULT_FREE(fault , env) \
00212 ((fault)->ops->free_fn(fault, env))
00213
00214 #define AXIOM_SOAP_FAULT_GET_CODE(fault , env) \
00215 ((fault)->ops->get_code(fault, env))
00216
00217 #define AXIOM_SOAP_FAULT_GET_REASON(fault , env) \
00218 ((fault)->ops->get_reason(fault, env))
00219
00220 #define AXIOM_SOAP_FAULT_GET_DETAIL(fault , env) \
00221 ((fault)->ops->get_detail(fault, env))
00222
00223 #define AXIOM_SOAP_FAULT_GET_ROLE(fault , env) \
00224 ((fault)->ops->get_role(fault, env))
00225
00226 #define AXIOM_SOAP_FAULT_GET_NODE(fault , env) \
00227 ((fault)->ops->get_node(fault, env))
00228
00229 #define AXIOM_SOAP_FAULT_GET_BASE_NODE(fault, env) \
00230 ((fault)->ops->get_base_node(fault, env))
00231
00232
00233 #define AXIOM_SOAP_FAULT_GET_EXCEPTION(fault, env) \
00234 ((fault)->ops->get_exception(fault, env))
00235
00236 #define AXIOM_SOAP_FAULT_SET_EXCEPTION(fault, env, exception) \
00237 ((fault)->ops->set_exception(fault, env, exception))
00238
00240 #ifdef __cplusplus
00241 }
00242 #endif
00243
00244
00245 #endif