00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_REST_SENDER_H
00018 #define AXIS2_REST_SENDER_H
00019
00025 #include <axis2_const.h>
00026 #include <axis2_utils_defines.h>
00027 #include <axis2_env.h>
00028 #include <axis2_msg_ctx.h>
00029 #include <axiom_output.h>
00030 #include <axis2_http_simple_response.h>
00031 #include <axiom_soap_envelope.h>
00032
00033
00034 #ifdef __cplusplus
00035 extern "C"
00036 {
00037 #endif
00038
00043 typedef struct axis2_rest_sender_ops axis2_rest_sender_ops_t;
00044 typedef struct axis2_rest_sender axis2_rest_sender_t;
00045
00046
00051 AXIS2_DECLARE_DATA struct axis2_rest_sender_ops
00052 {
00053 axis2_status_t (AXIS2_CALL *send)
00054 (axis2_rest_sender_t *sender,
00055 const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
00056 axiom_node_t *out,
00057 axis2_char_t *str_url);
00058
00059 axis2_status_t (AXIS2_CALL *set_chunked)
00060 (axis2_rest_sender_t *sender,
00061 const axis2_env_t *env, axis2_bool_t chunked);
00062
00063 axis2_status_t (AXIS2_CALL *set_om_output)
00064 (axis2_rest_sender_t *sender,
00065 const axis2_env_t *env, axiom_output_t *om_output);
00066
00067 axis2_status_t (AXIS2_CALL *set_http_version)
00068 (axis2_rest_sender_t *sender,
00069 const axis2_env_t *env, axis2_char_t *version);
00070
00071 axis2_status_t (AXIS2_CALL *free)
00072 (axis2_rest_sender_t *sender,
00073 const axis2_env_t *env);
00074 };
00075
00076
00077 axis2_status_t AXIS2_CALL
00078 axis2_rest_sender_get_header_info
00079 (axis2_rest_sender_t *sender,
00080 const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
00081 axis2_http_simple_response_t *response);
00082
00083 axis2_status_t AXIS2_CALL
00084 axis2_rest_sender_process_response
00085 (axis2_rest_sender_t *sender,
00086 const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
00087 axis2_http_simple_response_t *response);
00088
00089 axis2_status_t AXIS2_CALL
00090 axis2_rest_sender_get_timeout_values
00091 (axis2_rest_sender_t *sender,
00092 const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
00093
00098 AXIS2_DECLARE_DATA struct axis2_rest_sender
00099 {
00100 axis2_rest_sender_ops_t *ops;
00101 };
00102
00103
00104 AXIS2_EXTERN axis2_rest_sender_t * AXIS2_CALL
00105 axis2_rest_sender_create(const axis2_env_t *env);
00106
00107
00108
00109 #define AXIS2_REST_SENDER_SEND(sender, env, msg_ctx, output, url)\
00110 ((sender)->ops->send (sender, env, msg_ctx,output, url))
00111 #define AXIS2_REST_SENDER_SET_CHUNKED(sender, env, chunked) \
00112 ((sender)->ops->set_chunked(sender, env, chunked))
00113 #define AXIS2_REST_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
00114 ((sender)->ops->set_om_output (sender, env, om_output))
00115 #define AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env, version)\
00116 ((sender)->ops->set_http_version (sender, env, version))
00117 #define AXIS2_REST_SENDER_FREE(sender, env) \
00118 ((sender)->ops->free(sender, env))
00119
00120
00121
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 #endif