00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_HTTP_SENDER_H
00019 #define AXIS2_HTTP_SENDER_H
00020
00031 #include <axis2_const.h>
00032 #include <axis2_defines.h>
00033 #include <axutil_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 #include <axis2_http_simple_request.h>
00039
00040 #ifdef AXIS2_LIBCURL_ENABLED
00041 #include <curl/curl.h>
00042 #endif
00043
00044
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049
00051 typedef struct axis2_http_sender axis2_http_sender_t;
00052
00053
00063 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00064 axis2_http_sender_send(axis2_http_sender_t *sender,
00065 const axutil_env_t *env,
00066 axis2_msg_ctx_t *msg_ctx,
00067 axiom_soap_envelope_t *out,
00068 const axis2_char_t *str_url,
00069 const axis2_char_t *soap_action);
00070
00071
00072 void AXIS2_CALL
00073 axis2_http_sender_util_add_header (
00074 const axutil_env_t *env,
00075 axis2_http_simple_request_t *request,
00076 axis2_char_t *header_name,
00077 const axis2_char_t *header_value);
00078
00079 #ifdef AXIS2_LIBCURL_ENABLED
00080 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00081 axis2_libcurl_http_send(axis2_http_sender_t *sender,
00082 const axutil_env_t *env,
00083 axis2_msg_ctx_t *msg_ctx,
00084 axiom_soap_envelope_t *out,
00085 const axis2_char_t *str_url,
00086 const axis2_char_t *soap_action);
00087 #endif
00088
00089
00096 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00097 axis2_http_sender_set_chunked(axis2_http_sender_t *sender,
00098 const axutil_env_t *env,
00099 axis2_bool_t chunked);
00100
00107 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00108 axis2_http_sender_set_om_output(axis2_http_sender_t *sender,
00109 const axutil_env_t *env,
00110 axiom_output_t *om_output);
00111
00118 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00119 axis2_http_sender_set_http_version(axis2_http_sender_t *sender,
00120 const axutil_env_t *env,
00121 axis2_char_t *version);
00122
00128 AXIS2_EXTERN void AXIS2_CALL
00129 axis2_http_sender_free(axis2_http_sender_t *sender,
00130 const axutil_env_t *env);
00131
00138 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00139 axis2_http_sender_get_header_info(axis2_http_sender_t *sender,
00140 const axutil_env_t *env,
00141 axis2_msg_ctx_t *msg_ctx,
00142 axis2_http_simple_response_t *response);
00143
00150 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00151 axis2_http_sender_process_response(axis2_http_sender_t *sender,
00152 const axutil_env_t *env,
00153 axis2_msg_ctx_t *msg_ctx,
00154 axis2_http_simple_response_t *response);
00155
00156
00162 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00163 axis2_http_sender_get_timeout_values(axis2_http_sender_t *sender,
00164 const axutil_env_t *env,
00165 axis2_msg_ctx_t *msg_ctx);
00166
00167 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00168 axis2_http_sender_get_param_string(axis2_http_sender_t *sender,
00169 const axutil_env_t *env,
00170 axis2_msg_ctx_t *msg_ctx);
00171
00175 AXIS2_EXTERN axis2_http_sender_t *AXIS2_CALL
00176 axis2_http_sender_create(const axutil_env_t *env);
00177
00179 #define AXIS2_HTTP_SENDER_SEND(sender, env, msg_ctx, output, url,soap_action)\
00180 axis2_http_sender_send(sender, env, msg_ctx,output, url, soap_action)
00181
00183 #define AXIS2_HTTP_SENDER_SET_CHUNKED(sender, env, chunked) \
00184 axis2_http_sender_set_chunked(sender, env, chunked)
00185
00187 #define AXIS2_HTTP_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
00188 axis2_http_sender_set_om_output (sender, env, om_output)
00189
00191 #define AXIOM_SENDER_SET_HTTP_VERSION(sender, env, version)\
00192 axis2_http_sender_set_http_version (sender, env, version)
00193
00195 #define AXIS2_HTTP_SENDER_FREE(sender, env) \
00196 axis2_http_sender_free(sender, env)
00197
00199 #ifdef __cplusplus
00200 }
00201 #endif
00202 #endif