# Security Header Builder
[Rampart Utilities]

## Functions
AXIS2_EXTERN axis2_status_t | rampart_shb_build_message (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, rampart_context_t *context, axiom_soap_envelope_t *soap_envelope)
AXIS2_EXTERN axis2_status_t | rampart_shb_ensure_sec_header_order (const axutil_env_t *env, axis2_msg_ctx_t *msg_ctx, rampart_context_t *rampart_context, axiom_node_t *sec_node)

## Function Documentation

AXIS2_EXTERN axis2_status_t rampart_shb_build_message | ( | const axutil_env_t * | env,
|  | axis2_msg_ctx_t * | msg_ctx,
|  | rampart_context_t * | context,
|  | axiom_soap_envelope_t * | soap_envelope |
| ) |  |  |

Build a message depending on configurations.

Parameters:

  | env | pointer to environment struct
  | msg_ctx | message context
  | soap_envelope | the SOAP envelope

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t rampart_shb_ensure_sec_header_order | ( | const axutil_env_t * | env,
|  | axis2_msg_ctx_t * | msg_ctx,
|  | rampart_context_t * | rampart_context,
|  | axiom_node_t * | sec_node |
| ) |  |  |

After building the SOPA message as per the policy, this function will re-order the header elements of the SOAP message to make sure that the processing doesnt fail.

Parameters:

  | env | pointer to environment struct
  | msg_ctx | message context
  | rampart_context | The Rampart Context

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE