# 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
## 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 |