00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_ENGINE_H
00019 #define AXIS2_ENGINE_H
00020
00037 #include <axis2_defines.h>
00038 #include <axis2_array_list.h>
00039 #include <axis2_env.h>
00040 #include <axis2_conf_ctx.h>
00041
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046
00048 typedef struct axis2_engine_ops axis2_engine_ops_t;
00050 typedef struct axis2_engine axis2_engine_t;
00051
00052 struct axiom_soap_fault;
00053
00054
00059 struct axis2_engine_ops
00060 {
00073 axis2_status_t (AXIS2_CALL *
00074 send)(
00075 axis2_engine_t *engine,
00076 const axis2_env_t *env,
00077 axis2_msg_ctx_t *msg_ctx);
00078
00091 axis2_status_t (AXIS2_CALL *
00092 receive)(
00093 axis2_engine_t *engine,
00094 const axis2_env_t *env,
00095 axis2_msg_ctx_t *msg_ctx);
00096
00105 axis2_status_t (AXIS2_CALL *
00106 send_fault)(
00107 axis2_engine_t *engine,
00108 const axis2_env_t *env,
00109 axis2_msg_ctx_t *msg_ctx);
00110
00119 axis2_status_t (AXIS2_CALL *
00120 receive_fault)(
00121 axis2_engine_t *engine,
00122 const axis2_env_t *env,
00123 axis2_msg_ctx_t *msg_ctx);
00124
00134 axis2_msg_ctx_t *(AXIS2_CALL *
00135 create_fault_msg_ctx)(
00136 axis2_engine_t *engine,
00137 const axis2_env_t *env,
00138 axis2_msg_ctx_t *processing_context);
00139
00148 axis2_status_t (AXIS2_CALL *
00149 extract_fault_info_from_msg_ctx)(
00150 axis2_engine_t *engine,
00151 const axis2_env_t *env,
00152 axis2_msg_ctx_t *msg_ctx,
00153 struct axiom_soap_fault *fault);
00154
00164 axis2_status_t (AXIS2_CALL *
00165 verify_ctx_built)(
00166 axis2_engine_t *engine,
00167 const axis2_env_t *env,
00168 axis2_msg_ctx_t *msg_ctx);
00169
00183 axis2_status_t (AXIS2_CALL *
00184 invoke_phases)(
00185 axis2_engine_t *engine,
00186 const axis2_env_t *env,
00187 axis2_array_list_t *phases,
00188 axis2_msg_ctx_t *msg_ctx);
00189
00206 axis2_status_t (AXIS2_CALL *
00207 resume_invocation_phases)(
00208 axis2_engine_t *engine,
00209 const axis2_env_t *env,
00210 axis2_array_list_t *phases,
00211 axis2_msg_ctx_t *msg_ctx);
00212
00220 const axis2_char_t *(AXIS2_CALL *
00221 get_sender_fault_code)(
00222 const axis2_engine_t *engine,
00223 const axis2_env_t *env,
00224 const axis2_char_t *soap_namespace);
00225
00226
00233 const axis2_char_t *(AXIS2_CALL *
00234 get_receiver_fault_code)(
00235 const axis2_engine_t *engine,
00236 const axis2_env_t *env,
00237 const axis2_char_t *soap_namespace);
00238
00245 axis2_status_t (AXIS2_CALL *
00246 free)(
00247 axis2_engine_t *engine,
00248 const axis2_env_t *env);
00249
00259 axis2_status_t (AXIS2_CALL *
00260 resume_receive)(
00261 axis2_engine_t *engine,
00262 const axis2_env_t *env,
00263 axis2_msg_ctx_t *msg_ctx);
00264
00274 axis2_status_t (AXIS2_CALL *
00275 resume_send)(
00276 axis2_engine_t *engine,
00277 const axis2_env_t *env,
00278 axis2_msg_ctx_t *msg_ctx);
00279
00280 };
00281
00285 struct axis2_engine
00286 {
00287
00289 axis2_engine_ops_t *ops;
00290 };
00291
00298 AXIS2_EXTERN axis2_engine_t *AXIS2_CALL
00299 axis2_engine_create(
00300 const axis2_env_t *env,
00301 axis2_conf_ctx_t *conf_ctx);
00302
00305 #define AXIS2_ENGINE_SEND(engine, env, msg_ctx)\
00306 ((engine)->ops->send(engine, env, msg_ctx))
00307
00310 #define AXIS2_ENGINE_RECEIVE(engine, env, msg_ctx) \
00311 ((engine)->ops->receive(engine, env, msg_ctx))
00312
00315 #define AXIS2_ENGINE_SEND_FAULT(engine, env, msg_ctx) \
00316 ((engine)->ops->send_fault(engine, env, msg_ctx))
00317
00320 #define AXIS2_ENGINE_RECEIVE_FAULT(engine, env, msg_ctx) \
00321 ((engine)->ops->receive_fault(engine, env, msg_ctx))
00322
00325 #define AXIS2_ENGINE_CREATE_FAULT_MSG_CTX(engine, env, msg_ctx) \
00326 ((engine)->ops->create_fault_msg_ctx(engine, env, msg_ctx))
00327
00330 #define AXIS2_ENGINE_EXTRACT_FAULT_INFO_FROM_MSG_CTX(engine, env, msg_ctx, fault) \
00331 ((engine)->ops->extract_fault_info_from_msg_ctx(engine, env, msg_ctx, fault))
00332
00335 #define AXIS2_ENGINE_VERIFY_CTX_BUILT(engine, env, msg_ctx) \
00336 ((engine)->ops->verify_ctx_built(engine, env, msg_ctx))
00337
00340 #define AXIS2_ENGINE_INVOKE_PHASES(engine, env, phases, msg_ctx) \
00341 ((engine)->ops->invoke_phases(engine, env, phases, msg_ctx))
00342
00345 #define AXIS2_ENGINE_RESUME_INVOCATION_PHASES(engine, env, phases, msg_ctx) \
00346 ((engine)->ops->resume_invocation_phases(engine, env, phases, msg_ctx))
00347
00350 #define AXIS2_ENGINE_GET_SENDER_FAULT_CODE(engine, env, soap_namespace) \
00351 ((engine)->ops->get_sender_fault_code(engine, env, soap_namespace))
00352
00355 #define AXIS2_ENGINE_GET_RECEIVER_FAULT_CODE(engine, env, soap_namespace) \
00356 ((engine)->ops->get_receiver_fault_code(engine, env, soap_namespace))
00357
00360 #define AXIS2_ENGINE_FREE(engine, env) \
00361 ((engine)->ops->free(engine, env))
00362
00365 #define AXIS2_ENGINE_RESUME_SEND(engine, env, msg_ctx)\
00366 ((engine)->ops->resume_send(engine, env, msg_ctx))
00367
00370 #define AXIS2_ENGINE_RESUME_RECEIVE(engine, env, msg_ctx) \
00371 ((engine)->ops->resume_receive(engine, env, msg_ctx))
00372
00374 #ifdef __cplusplus
00375 }
00376 #endif
00377
00378 #endif