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

- Search for |

# axis2_http_transport_utils.h File Reference

axis2 HTTP Transport Utility functions This file includes functions that handles soap and rest request that comes to the engine via HTTP protocol. More...

`#include <axis2_const.h>`
`#include <axis2_defines.h>`
`#include <axutil_env.h>`
`#include <axiom_stax_builder.h>`
`#include <axis2_msg_ctx.h>`
`#include <axis2_conf_ctx.h>`
`#include <axutil_hash.h>`
`#include <axiom_element.h>`
`#include <axutil_stream.h>`
`#include <axiom_soap_envelope.h>`
`#include <axutil_http_chunked_stream.h>`
`#include <axis2_http_out_transport_info.h>`
`#include <axutil_url.h>`
`#include <axiom_mtom_sending_callback.h>`

Go to the source code of this file.

## Classes
struct | axis2_http_transport_in
struct | axis2_http_transport_out
enum | axis2_http_method_types { AXIS2_HTTP_METHOD_GET = 0, AXIS2_HTTP_METHOD_POST, AXIS2_HTTP_METHOD_HEAD, AXIS2_HTTP_METHOD_PUT, AXIS2_HTTP_METHOD_DELETE }
typedef enum axis2_http_method_types | axis2_http_method_types_t
typedef struct axis2_http_transport_in | axis2_http_transport_in_t
typedef struct axis2_http_transport_out | axis2_http_transport_out_t
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_transport_in_init (axis2_http_transport_in_t *in, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_transport_in_uninit (axis2_http_transport_in_t *request, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_transport_out_init (axis2_http_transport_out_t *out, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_transport_out_uninit (axis2_http_transport_out_t *response, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_process_request (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx, axis2_http_transport_in_t *request, axis2_http_transport_out_t *response)
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_process_http_post_request (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, axutil_stream_t *in_stream, axutil_stream_t *out_stream, const axis2_char_t *content_type, const int content_length, axutil_string_t *soap_action_header, const axis2_char_t *request_uri)
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_process_http_put_request (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, axutil_stream_t *in_stream, axutil_stream_t *out_stream, const axis2_char_t *content_type, const int content_length, axutil_string_t *soap_action_header, const axis2_char_t *request_uri)
AXIS2_EXTERN axis2_bool_t | axis2_http_transport_utils_process_http_get_request (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, axutil_stream_t *in_stream, axutil_stream_t *out_stream, const axis2_char_t *content_type, axutil_string_t *soap_action_header, const axis2_char_t *request_uri, axis2_conf_ctx_t *conf_ctx, axutil_hash_t *request_params)
AXIS2_EXTERN axis2_bool_t | axis2_http_transport_utils_process_http_head_request (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, axutil_stream_t *in_stream, axutil_stream_t *out_stream, const axis2_char_t *content_type, axutil_string_t *soap_action_header, const axis2_char_t *request_uri, axis2_conf_ctx_t *conf_ctx, axutil_hash_t *request_params)
AXIS2_EXTERN axis2_bool_t | axis2_http_transport_utils_process_http_delete_request (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, axutil_stream_t *in_stream, axutil_stream_t *out_stream, const axis2_char_t *content_type, axutil_string_t *soap_action_header, const axis2_char_t *request_uri, axis2_conf_ctx_t *conf_ctx, axutil_hash_t *request_params)
AXIS2_EXTERN axiom_stax_builder_t * | axis2_http_transport_utils_select_builder_for_mime (const axutil_env_t *env, axis2_char_t *request_uri, axis2_msg_ctx_t *msg_ctx, axutil_stream_t *in_stream, axis2_char_t *content_type)
AXIS2_EXTERN axis2_bool_t | axis2_http_transport_utils_do_write_mtom (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx)
AXIS2_EXTERN axutil_hash_t * | axis2_http_transport_utils_get_request_params (const axutil_env_t *env, axis2_char_t *request_uri)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_not_found (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_not_implemented (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_method_not_allowed (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_not_acceptable (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_bad_request (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_request_timeout (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_conflict (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_gone (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_precondition_failed (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_request_entity_too_large (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_service_unavailable (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_internal_server_error (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_services_html (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_char_t * | axis2_http_transport_utils_get_services_static_wsdl (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx, axis2_char_t *request_url)
AXIS2_EXTERN axiom_soap_envelope_t * | axis2_http_transport_utils_create_soap_msg (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, const axis2_char_t *soap_ns_uri)
AXIS2_EXTERN axutil_array_list_t * | axis2_http_transport_utils_process_accept_headers (const axutil_env_t *env, axis2_char_t *accept_value)
AXIS2_EXTERN axis2_status_t | axis2_http_transport_utils_send_mtom_message (axutil_http_chunked_stream_t *chunked_stream, const axutil_env_t *env, axutil_array_list_t *mime_parts, axis2_char_t *sending_callback_name)
AXIS2_EXTERN void | axis2_http_transport_utils_destroy_mime_parts (axutil_array_list_t *mime_parts, const axutil_env_t *env)
AXIS2_EXTERN void * | axis2_http_transport_utils_initiate_callback (const axutil_env_t *env, axis2_char_t *callback_name, void *user_param, axiom_mtom_sending_callback_t **callback)
AXIS2_EXTERN axis2_bool_t | axis2_http_transport_utils_is_callback_required (const axutil_env_t *env, axutil_array_list_t *mime_parts)
## Defines
#define | AXIS2_MTOM_OUTPUT_BUFFER_SIZE 1024

## Detailed Description

axis2 HTTP Transport Utility functions This file includes functions that handles soap and rest request that comes to the engine via HTTP protocol.

## Function Documentation

AXIS2_EXTERN axis2_status_t axis2_http_transport_utils_process_http_post_request | ( | const axutil_env_t * | env,
|  | axis2_msg_ctx_t * | msg_ctx,
|  | axutil_stream_t * | in_stream,
|  | axutil_stream_t * | out_stream,
|  | const axis2_char_t * | content_type,
|  | const int | content_length,
|  | axutil_string_t * | soap_action_header,
|  | const axis2_char_t * | request_uri |
| ) |  |  |

This function handles the HTTP POST request that comes to the axis2 engine. The request can be either a SOAP request OR a REST request.

Parameters:

  | env,axutil_env_t | instance
  | msg_ctx,Input | message context. (an instance of axis2_msg_ctx_t struct.)
  | in_stream,This | is the input message content represented as an axutil_stream instance. A callback function will be used to read as required from the stream with in the engine.
  | out_stream,This | is the output stream. The outgoing message contents is represented as an instance of axutil_stream
  | content_type,HTTP | content type. This value should not be null.
  | content_length,HTTP | Content length value.
  | soap_action_header,SOAPAction | header value. This is only required in case of SOAP 1.1. For SOAP 1.2 , the action header will be within the ContentType header and this method is able to obtain the extract the action header value from content type.
  | request_uri,This | is the HTTP request uri. Should not be null.

Returns:
  AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise

AXIS2_EXTERN axis2_status_t axis2_http_transport_utils_process_http_put_request | ( | const axutil_env_t * | env,
|  | axis2_msg_ctx_t * | msg_ctx,
|  | axutil_stream_t * | in_stream,
|  | axutil_stream_t * | out_stream,
|  | const axis2_char_t * | content_type,
|  | const int | content_length,
|  | axutil_string_t * | soap_action_header,
|  | const axis2_char_t * | request_uri |
| ) |  |  |

This method handles the HTTP put request. Parameters are similar to that of post_request method.

Parameters:

  | env,environment |
  | msg_ctx,in | message context.
  | in_stream,input | stream
  | out_stream,output | stream.
  | content_type,HTTP | ContentType header value
  | content_length,HTTP | Content length value
  | soap_action_header,SOAP | Action header value
  | request_uri,request | uri

Returns:
  AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise

AXIS2_EXTERN axis2_status_t axis2_http_transport_utils_process_request | ( | const axutil_env_t * | env,
|  | axis2_conf_ctx_t * | conf_ctx,
|  | axis2_http_transport_in_t * | request,
|  | axis2_http_transport_out_t * | response |
| ) |  |  |

This methods provides the HTTP request handling functionality using axis2 for server side HTTP modules.

Parameters:

  | env,environments |
  | conf_ctx,Instance | of axis2_conf_ctx_t
  | request,populated | instance of axis2_http_transport_in_t struct
  | response,an | instance of axis2_http_transport_out_t struct

Returns:
  AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise

AXIS2_EXTERN axis2_status_t axis2_http_transport_utils_transport_in_init | ( | axis2_http_transport_in_t * | in,
|  | const axutil_env_t * | env |
| ) |  |  |

Initialize the axis2_http_tranport_in_t. Before using this structure users should initialize it using this method.

Parameters:

  | in | a pointer to a axis2_http_tranport_in_t
  | env,environments |

AXIS2_EXTERN axis2_status_t axis2_http_transport_utils_transport_in_uninit | ( | axis2_http_transport_in_t * | request,
|  | const axutil_env_t * | env |
| ) |  |  |

Uninitialize the axis2_http_tranport_in_t. Before using this structure users should initialize it using this method.

Parameters:

  | in | a pointer to a axis2_http_tranport_in_t
  | env,environments |

AXIS2_EXTERN axis2_status_t axis2_http_transport_utils_transport_out_init | ( | axis2_http_transport_out_t * | out,
|  | const axutil_env_t * | env |
| ) |  |  |

Initialize the axis2_http_tranport_out_t. Before using this structure users should initialize it using this method.

Parameters:

  | out | a pointer to a axis2_http_tranport_out_t
  | env,environments |