Axis2/C: axis2_http_transport_utils.h Source File

- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# axis2_http_transport_utils.h

Go to the documentation of this file.

    00001 /*
    00002  * Licensedo to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 #ifndef AXIS2_HTTP_TRANSPORT_UTILS_H
    00019 #define AXIS2_HTTP_TRANSPORT_UTILS_H
    00020
    00021 #define AXIS2_MTOM_OUTPUT_BUFFER_SIZE 1024
    00022
    00035 #include <axis2_const.h>
    00036 #include <axis2_defines.h>
    00037 #include <axutil_env.h>
    00038 #include <axiom_stax_builder.h>
    00039 #include <axis2_msg_ctx.h>
    00040 #include <axis2_conf_ctx.h>
    00041 #include <axutil_hash.h>
    00042 #include <axiom_element.h>
    00043 #include <axutil_stream.h>
    00044 #include <axiom_soap_envelope.h>
    00045 #include <axutil_http_chunked_stream.h>
    00046 #include <axis2_http_out_transport_info.h>
    00047 #include <axutil_url.h>
    00048 #include <axiom_mtom_sending_callback.h>
    00049
    00050 #ifdef __cplusplus
    00051 extern "C"
    00052 {
    00053 #endif
    00054
    00055         typedef enum axis2_http_method_types
    00056         {
    00057                 AXIS2_HTTP_METHOD_GET = 0,
    00058                 AXIS2_HTTP_METHOD_POST,
    00059                 AXIS2_HTTP_METHOD_HEAD,
    00060                 AXIS2_HTTP_METHOD_PUT,
    00061                 AXIS2_HTTP_METHOD_DELETE
    00062         }axis2_http_method_types_t;
    00063
    00064
    00065         typedef struct axis2_http_transport_in
    00066         {
    00068                 axis2_char_t *content_type;
    00070                 int content_length;
    00072                 axis2_msg_ctx_t *msg_ctx;
    00073
    00075                 axis2_char_t *soap_action;
    00076
    00078                 axis2_char_t *request_uri;
    00079
    00081                 axutil_stream_t *in_stream;
    00082
    00084                 axis2_char_t *remote_ip;
    00085
    00087                 axis2_char_t *svr_port;
    00088
    00090                 axis2_char_t *transfer_encoding;
    00091
    00093                 axis2_char_t *accept_header;
    00094
    00096                 axis2_char_t *accept_language_header;
    00097
    00099                 axis2_char_t *accept_charset_header;
    00102                 int request_method;
    00104                 axis2_http_out_transport_info_t *out_transport_info;
    00106                 axis2_char_t *request_url_prefix;
    00107
    00108         }axis2_http_transport_in_t;
    00109
    00110         typedef struct axis2_http_transport_out
    00111         {
    00113                 axis2_char_t *http_status_code_name;
    00115                 int http_status_code;
    00117                 axis2_msg_ctx_t *msg_ctx;
    00119                 void *response_data;
    00121                 axis2_char_t *content_type;
    00123                 int response_data_length;
    00125                 axis2_char_t *content_language;
    00127                 axutil_array_list_t *output_headers;
    00128
    00129         }axis2_http_transport_out_t;
    00130
    00131
    00138         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00139         axis2_http_transport_utils_transport_in_init(axis2_http_transport_in_t *in,
    00140                                                                                                 const axutil_env_t *env);
    00141
    00148         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00149         axis2_http_transport_utils_transport_in_uninit(axis2_http_transport_in_t *request,
    00150                                                                                                    const axutil_env_t *env);
    00151
    00158         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00159         axis2_http_transport_utils_transport_out_init(axis2_http_transport_out_t *out,
    00160                                                                                                 const axutil_env_t *env);
    00161
    00162
    00163         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00164         axis2_http_transport_utils_transport_out_uninit(axis2_http_transport_out_t *response,
    00165                                                                                                 const axutil_env_t *env);
    00175         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00176         axis2_http_transport_utils_process_request(
    00177                 const axutil_env_t *env,
    00178                 axis2_conf_ctx_t *conf_ctx,
    00179                 axis2_http_transport_in_t *request,
    00180                 axis2_http_transport_out_t *response);
    00181
    00182
    00183
    00201     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00202     axis2_http_transport_utils_process_http_post_request(
    00203         const axutil_env_t * env,
    00204         axis2_msg_ctx_t * msg_ctx,
    00205         axutil_stream_t * in_stream,
    00206         axutil_stream_t * out_stream,
    00207         const axis2_char_t * content_type,
    00208         const int content_length,
    00209         axutil_string_t * soap_action_header,
    00210         const axis2_char_t * request_uri);
    00211
    00212
    00226     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00227     axis2_http_transport_utils_process_http_put_request(
    00228         const axutil_env_t * env,
    00229         axis2_msg_ctx_t * msg_ctx,
    00230         axutil_stream_t * in_stream,
    00231         axutil_stream_t * out_stream,
    00232         const axis2_char_t * content_type,
    00233         const int content_length,
    00234         axutil_string_t * soap_action_header,
    00235         const axis2_char_t * request_uri);
    00236
    00237     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00238     axis2_http_transport_utils_process_http_get_request(
    00239         const axutil_env_t * env,
    00240         axis2_msg_ctx_t * msg_ctx,
    00241         axutil_stream_t * in_stream,
    00242         axutil_stream_t * out_stream,
    00243         const axis2_char_t * content_type,
    00244         axutil_string_t * soap_action_header,
    00245         const axis2_char_t * request_uri,
    00246         axis2_conf_ctx_t * conf_ctx,
    00247         axutil_hash_t * request_params);
    00248
    00249     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00250
    00251     axis2_http_transport_utils_process_http_head_request(
    00252         const axutil_env_t * env,
    00253         axis2_msg_ctx_t * msg_ctx,
    00254         axutil_stream_t * in_stream,
    00255         axutil_stream_t * out_stream,
    00256         const axis2_char_t * content_type,
    00257         axutil_string_t * soap_action_header,
    00258         const axis2_char_t * request_uri,
    00259         axis2_conf_ctx_t * conf_ctx,
    00260         axutil_hash_t * request_params);
    00261
    00262     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00263
    00264     axis2_http_transport_utils_process_http_delete_request(
    00265         const axutil_env_t * env,
    00266         axis2_msg_ctx_t * msg_ctx,
    00267         axutil_stream_t * in_stream,
    00268         axutil_stream_t * out_stream,
    00269         const axis2_char_t * content_type,
    00270         axutil_string_t * soap_action_header,
    00271         const axis2_char_t * request_uri,
    00272         axis2_conf_ctx_t * conf_ctx,
    00273         axutil_hash_t * request_params);
    00274
    00275     AXIS2_EXTERN axiom_stax_builder_t *AXIS2_CALL
    00276
    00277     axis2_http_transport_utils_select_builder_for_mime(
    00278         const axutil_env_t * env,
    00279         axis2_char_t * request_uri,
    00280         axis2_msg_ctx_t * msg_ctx,
    00281         axutil_stream_t * in_stream,
    00282         axis2_char_t * content_type);
    00283
    00284     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00285
    00286     axis2_http_transport_utils_do_write_mtom(
    00287         const axutil_env_t * env,
    00288         axis2_msg_ctx_t * msg_ctx);
    00289
    00290     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00291
    00292     axis2_http_transport_utils_get_request_params(
    00293         const axutil_env_t * env,
    00294         axis2_char_t * request_uri);
    00295
    00296     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00297     axis2_http_transport_utils_get_not_found(
    00298         const axutil_env_t * env,
    00299         axis2_conf_ctx_t * conf_ctx);
    00300
    00301     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00302     axis2_http_transport_utils_get_not_implemented(
    00303         const axutil_env_t * env,
    00304         axis2_conf_ctx_t * conf_ctx);
    00305
    00306     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00307     axis2_http_transport_utils_get_method_not_allowed(
    00308         const axutil_env_t * env,
    00309         axis2_conf_ctx_t * conf_ctx);
    00310
    00311     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00312     axis2_http_transport_utils_get_not_acceptable(
    00313         const axutil_env_t * env,
    00314         axis2_conf_ctx_t * conf_ctx);
    00315
    00316     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00317     axis2_http_transport_utils_get_bad_request(
    00318         const axutil_env_t * env,
    00319         axis2_conf_ctx_t * conf_ctx);
    00320
    00321     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00322     axis2_http_transport_utils_get_request_timeout(
    00323         const axutil_env_t * env,
    00324         axis2_conf_ctx_t * conf_ctx);
    00325
    00326     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00327     axis2_http_transport_utils_get_conflict(
    00328         const axutil_env_t * env,
    00329         axis2_conf_ctx_t * conf_ctx);
    00330
    00331     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00332     axis2_http_transport_utils_get_gone(
    00333         const axutil_env_t * env,
    00334         axis2_conf_ctx_t * conf_ctx);
    00335
    00336     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00337     axis2_http_transport_utils_get_precondition_failed(
    00338         const axutil_env_t * env,
    00339         axis2_conf_ctx_t * conf_ctx);
    00340
    00341     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00342     axis2_http_transport_utils_get_request_entity_too_large(
    00343         const axutil_env_t * env,
    00344         axis2_conf_ctx_t * conf_ctx);
    00345
    00346     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00347     axis2_http_transport_utils_get_service_unavailable(
    00348         const axutil_env_t * env,
    00349         axis2_conf_ctx_t * conf_ctx);
    00350
    00351     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00352     axis2_http_transport_utils_get_internal_server_error(
    00353         const axutil_env_t * env,
    00354         axis2_conf_ctx_t * conf_ctx);
    00355
    00356     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00357
    00358     axis2_http_transport_utils_get_services_html(
    00359         const axutil_env_t * env,
    00360         axis2_conf_ctx_t * conf_ctx);
    00361
    00362     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00363
    00364     axis2_http_transport_utils_get_services_static_wsdl(
    00365         const axutil_env_t * env,
    00366         axis2_conf_ctx_t * conf_ctx,
    00367         axis2_char_t * request_url);
    00368
    00369     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00370
    00371     axis2_http_transport_utils_get_request_params(
    00372         const axutil_env_t * env,
    00373         axis2_char_t * request_uri);
    00374
    00375     AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
    00376
    00377     axis2_http_transport_utils_create_soap_msg(
    00378         const axutil_env_t * env,
    00379         axis2_msg_ctx_t * msg_ctx,
    00380         const axis2_char_t * soap_ns_uri);
    00381
    00382         AXIS2_EXTERN axutil_array_list_t* AXIS2_CALL
    00383         axis2_http_transport_utils_process_accept_headers(
    00384                 const axutil_env_t *env,
    00385                 axis2_char_t *accept_value);
    00386
    00387     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00388     axis2_http_transport_utils_send_mtom_message(
    00389         axutil_http_chunked_stream_t * chunked_stream,
    00390         const axutil_env_t * env,
    00391         axutil_array_list_t *mime_parts,
    00392         axis2_char_t *sending_callback_name);
    00393
    00394     AXIS2_EXTERN void AXIS2_CALL
    00395     axis2_http_transport_utils_destroy_mime_parts(
    00396         axutil_array_list_t *mime_parts,
    00397         const axutil_env_t *env);
    00398
    00399     AXIS2_EXTERN void *AXIS2_CALL
    00400         axis2_http_transport_utils_initiate_callback(
    00401         const axutil_env_t *env,
    00402         axis2_char_t *callback_name,
    00403         void *user_param,
    00404         axiom_mtom_sending_callback_t **callback);
    00405
    00406     AXIS2_EXTERN axis2_bool_t AXIS2_CALL axis2_http_transport_utils_is_callback_required(
    00407         const axutil_env_t *env,
    00408         axutil_array_list_t *mime_parts);
    00409
    00410
    00411
    00413 #ifdef __cplusplus
    00414 }
    00415 #endif
    00416
    00417 #endif       /* AXIS2_HTTP_TRANSPORT_UTILS_H */