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