00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_REST_SENDER_H
00019 #define AXIS2_REST_SENDER_H
00020
00031 #include <axis2_const.h>
00032 #include <axis2_utils_defines.h>
00033 #include <axis2_env.h>
00034 #include <axis2_msg_ctx.h>
00035 #include <axiom_output.h>
00036 #include <axis2_http_simple_response.h>
00037 #include <axiom_soap_envelope.h>
00038
00039
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044
00046 typedef struct axis2_rest_sender_ops axis2_rest_sender_ops_t;
00048 typedef struct axis2_rest_sender axis2_rest_sender_t;
00049
00050
00055 struct axis2_rest_sender_ops
00056 {
00064 axis2_status_t (AXIS2_CALL *
00065 send)(
00066 axis2_rest_sender_t *sender,
00067 const axis2_env_t *env,
00068 axis2_msg_ctx_t *msg_ctx,
00069 axiom_node_t *out,
00070 const axis2_char_t *str_url);
00071
00077 axis2_status_t (AXIS2_CALL *
00078 set_chunked)(
00079 axis2_rest_sender_t *sender,
00080 const axis2_env_t *env,
00081 axis2_bool_t chunked);
00082
00088 axis2_status_t (AXIS2_CALL *
00089 set_om_output)(
00090 axis2_rest_sender_t *sender,
00091 const axis2_env_t *env,
00092 axiom_output_t *om_output);
00093
00099 axis2_status_t (AXIS2_CALL *
00100 set_http_version)(
00101 axis2_rest_sender_t *sender,
00102 const axis2_env_t *env,
00103 axis2_char_t *version);
00104
00109 axis2_status_t (AXIS2_CALL *
00110 free)(
00111 axis2_rest_sender_t *sender,
00112 const axis2_env_t *env);
00113 };
00114
00115
00122 axis2_status_t AXIS2_CALL
00123 axis2_rest_sender_get_header_info(
00124 axis2_rest_sender_t *sender,
00125 const axis2_env_t *env,
00126 axis2_msg_ctx_t *msg_ctx,
00127 axis2_http_simple_response_t *response);
00128
00135 axis2_status_t AXIS2_CALL
00136 axis2_rest_sender_process_response(
00137 axis2_rest_sender_t *sender,
00138 const axis2_env_t *env,
00139 axis2_msg_ctx_t *msg_ctx,
00140 axis2_http_simple_response_t *response);
00141
00147 axis2_status_t AXIS2_CALL
00148 axis2_rest_sender_get_timeout_values(
00149 axis2_rest_sender_t *sender,
00150 const axis2_env_t *env,
00151 axis2_msg_ctx_t *msg_ctx);
00152
00156 struct axis2_rest_sender
00157 {
00159 axis2_rest_sender_ops_t *ops;
00160 };
00161
00162
00166 AXIS2_EXTERN axis2_rest_sender_t *AXIS2_CALL
00167 axis2_rest_sender_create(
00168 const axis2_env_t *env);
00169
00170
00171
00174 #define AXIS2_REST_SENDER_SEND(sender, env, msg_ctx, output, url)\
00175 ((sender)->ops->send (sender, env, msg_ctx,output, url))
00176
00179 #define AXIS2_REST_SENDER_SET_CHUNKED(sender, env, chunked) \
00180 ((sender)->ops->set_chunked(sender, env, chunked))
00181
00184 #define AXIS2_REST_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
00185 ((sender)->ops->set_om_output (sender, env, om_output))
00186
00189 #define AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env, version)\
00190 ((sender)->ops->set_http_version (sender, env, version))
00191
00194 #define AXIS2_REST_SENDER_FREE(sender, env) \
00195 ((sender)->ops->free(sender, env))
00196
00197
00198
00200 #ifdef __cplusplus
00201 }
00202 #endif
00203 #endif