# soap fault reason
[SOAP]

## Functions
AXIS2_EXTERN axiom_soap_fault_reason_t * | axiom_soap_fault_reason_create_with_parent (const axutil_env_t *env, axiom_soap_fault_t *fault)
AXIS2_EXTERN void | axiom_soap_fault_reason_free (axiom_soap_fault_reason_t *fault_reason, const axutil_env_t *env)
AXIS2_EXTERN struct axiom_soap_fault_text * | axiom_soap_fault_reason_get_soap_fault_text (axiom_soap_fault_reason_t *fault_reason, const axutil_env_t *env, axis2_char_t *lang)
AXIS2_EXTERN axutil_array_list_t * | axiom_soap_fault_reason_get_all_soap_fault_texts (axiom_soap_fault_reason_t *fault_reason, const axutil_env_t *env)
AXIS2_EXTERN struct axiom_soap_fault_text * | axiom_soap_fault_reason_get_first_soap_fault_text (axiom_soap_fault_reason_t *fault_reason, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_soap_fault_reason_add_soap_fault_text (axiom_soap_fault_reason_t *fault_reason, const axutil_env_t *env, struct axiom_soap_fault_text *fault_text)
AXIS2_EXTERN axiom_node_t * | axiom_soap_fault_reason_get_base_node (axiom_soap_fault_reason_t *fault_reason, const axutil_env_t *env)

## Function Documentation

AXIS2_EXTERN axis2_status_t axiom_soap_fault_reason_add_soap_fault_text | ( | axiom_soap_fault_reason_t * | fault_reason,
|  | const axutil_env_t * | env,
|  | struct axiom_soap_fault_text * | fault_text |
| ) |  |  |

Add a string as a SOAP fault reason

Parameters:

  | fault_reason | pointer to soap_fault_reason struct
  | env | Environment. MUST NOT be NULL
  | fault_text | The text to be added as the SOAP fault reason

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE

AXIS2_EXTERN axiom_soap_fault_reason_t* axiom_soap_fault_reason_create_with_parent | ( | const axutil_env_t * | env,
|  | axiom_soap_fault_t * | fault |
| ) |  |  |

creates a SOAP fault reason struct

Parameters:

  | env | Environment. MUST NOT be NULL
  | fault | the SOAP fault

Returns:
  the created SOAP fault reason struct

AXIS2_EXTERN void axiom_soap_fault_reason_free | ( | axiom_soap_fault_reason_t * | fault_reason,
|  | const axutil_env_t * | env |
| ) |  |  |

Free an axiom_soap_fault_reason

Parameters:

  | fault_reason | pointer to soap_fault_reason struct
  | env | Environment. MUST NOT be NULL

Returns:
  VOID

AXIS2_EXTERN axutil_array_list_t* axiom_soap_fault_reason_get_all_soap_fault_texts | ( | axiom_soap_fault_reason_t * | fault_reason,
|  | const axutil_env_t * | env |
| ) |  |  |

Returns all the SOAP fault reason strings as an array list

Parameters:

  | fault_reason | pointer to soap_fault_reason struct
  | env | Environment. MUST NOT be NULL

Returns:
  all the SOAP fault reason strings as an array list

AXIS2_EXTERN axiom_node_t* axiom_soap_fault_reason_get_base_node | ( | axiom_soap_fault_reason_t * | fault_reason,
|  | const axutil_env_t * | env |
| ) |  |  |

Get the base node of the SOAP fault reason

Parameters:

  | fault_reason | pointer to soap_fault_reason struct
  | env | Environment. MUST NOT be NULL

Returns:
  the base node of the SOAP fault reason

AXIS2_EXTERN struct axiom_soap_fault_text* axiom_soap_fault_reason_get_first_soap_fault_text | ( | axiom_soap_fault_reason_t * | fault_reason,
|  | const axutil_env_t * | env |
| ) |  |  | `[read]`

Retuens the first SOAP fault reason string

Parameters:

  | fault_reason | pointer to soap_fault_reason struct
  | env | Environment. MUST NOT be NULL

Returns:
  The first SOAP fault reason string

AXIS2_EXTERN struct axiom_soap_fault_text* axiom_soap_fault_reason_get_soap_fault_text | ( | axiom_soap_fault_reason_t * | fault_reason,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | lang |
| ) |  |  | `[read]`

Get the SOAP fault text by comparing the given string

Parameters:

  | fault_reason | pointer to soap_fault_reason struct
  | env | Environment. MUST NOT be NULL
  | lang | string to be compares

Returns:
  the SOAP fault text of the SOAP fault string