# Handler Utilities
[Rampart Utilities]

## Functions
AXIS2_EXTERN axiom_node_t * | rampart_get_security_header (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, axiom_soap_header_t *soap_header)
AXIS2_EXTERN void | rampart_create_fault_envelope (const axutil_env_t *env, const axis2_char_t *sub_code, const axis2_char_t *reason_text, const axis2_char_t *detail_node_text, axis2_msg_ctx_t *msg_ctx)
AXIS2_EXTERN void * | rampart_get_rampart_configuration (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, axis2_char_t *param_name)
AXIS2_EXTERN axis2_bool_t | rampart_is_rampart_engaged (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx)

## Function Documentation

AXIS2_EXTERN void rampart_create_fault_envelope | ( | const axutil_env_t * | env,
|  | const axis2_char_t * | sub_code,
|  | const axis2_char_t * | reason_text,
|  | const axis2_char_t * | detail_node_text,
|  | axis2_msg_ctx_t * | msg_ctx |
| ) |  |  |

Creates a SOAP fault based on params described below and store in msg_ctx

Parameters:

  | env | pointer to environment struct
  | sub_code | the text of the Subcode element of a SOAP fault message
  | reason_text | the text in soapenv:Reason element
  | detail_node_text | the text in the soapenv:Detail element
  | msg_ctx | the msg_ctx

Returns:
  void

AXIS2_EXTERN void* rampart_get_rampart_configuration | ( | const axutil_env_t * | env,
|  | axis2_msg_ctx_t * | msg_ctx,
|  | axis2_char_t * | param_name |
| ) |  |  |

Get rampart configurations from the message context

Parameters:

  | env | pointer to environment struct
  | msg_ctx | message context
  | param_name | name of the parameter of the configuration

Returns:
  the loaded configuration params

AXIS2_EXTERN axiom_node_t* rampart_get_security_header | ( | const axutil_env_t * | env,
|  | axis2_msg_ctx_t * | msg_ctx,
|  | axiom_soap_header_t * | soap_header |
| ) |  |  |

Get the security header from the header block

Parameters:

  | env | pointer to environment struct
  | msg_ctx | message context
  | soap_header | header block

Returns:
  security soap header node

AXIS2_EXTERN axis2_bool_t rampart_is_rampart_engaged | ( | const axutil_env_t * | env,
|  | axis2_msg_ctx_t * | msg_ctx |
| ) |  |  |

Check wether rampart is engaged or not

Parameters:

  | env | pointer to environment struct
  | msg_ctx | message context

Returns:
  if engaged returns AXIS2_TRUE, else returns AXIS2_FALSE