# Client

## Modules
| Sandesha2_client_constants
## Functions
AXIS2_EXTERN sandesha2_seq_report_t * | sandesha2_client_get_outgoing_seq_report_with_svc_client (const axutil_env_t *env, axis2_svc_client_t *svc_client)
AXIS2_EXTERN sandesha2_seq_report_t * | sandesha2_client_get_outgoing_seq_report_with_seq_key (const axutil_env_t *env, axis2_char_t *to, axis2_char_t *seq_key, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN sandesha2_seq_report_t * | sandesha2_client_get_outgoing_seq_report_with_internal_seq_id (const axutil_env_t *env, axis2_char_t *internal_seq_id, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axutil_array_list_t * | sandesha2_client_get_incoming_seq_reports (axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN sandesha2_report_t * | sandesha2_client_get_report (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_status_t | sandesha2_client_create_seq_with_svc_client (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_bool_t offer)
AXIS2_EXTERN axis2_status_t | sandesha2_client_create_seq_with_svc_client_and_seq_key (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_bool_t offer, axis2_char_t *seq_key)
AXIS2_EXTERN axis2_status_t | sandesha2_client_terminate_seq_with_svc_client (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_callback_t *callback)
AXIS2_EXTERN axis2_status_t | sandesha2_client_terminate_seq_with_svc_client_and_seq_key (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_callback_t *callback, axis2_char_t *seq_key)
AXIS2_EXTERN axis2_status_t | sandesha2_client_close_seq_with_svc_client (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_callback_t *callback)
AXIS2_EXTERN axis2_status_t | sandesha2_client_close_seq_with_svc_client_and_seq_key (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_callback_t *callback, axis2_char_t *seq_key)
AXIS2_EXTERN axis2_status_t | sandesha2_client_wait_until_seq_completed_with_svc_client (const axutil_env_t *env, axis2_svc_client_t *svc_client)
AXIS2_EXTERN axis2_status_t | sandesha2_client_wait_until_seq_completed_with_svc_client_and_seq_key (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_char_t *seq_key)
AXIS2_EXTERN axis2_status_t | sandesha2_client_wait_until_seq_completed_with_svc_client_and_max_waiting_time (const axutil_env_t *env, axis2_svc_client_t *svc_client, long max_waiting_time)
AXIS2_EXTERN axis2_status_t | sandesha2_client_wait_until_seq_completed_with_svc_client_and_max_waiting_time_and_seq_key (const axutil_env_t *env, axis2_svc_client_t *svc_client, long max_waiting_time, axis2_char_t *seq_key)
AXIS2_EXTERN axis2_char_t * | sandesha2_client_get_seq_id (const axutil_env_t *env, axis2_svc_client_t *svc_client)
AXIS2_EXTERN axis2_status_t | sandesha2_client_send_ack_request_with_svc_client (const axutil_env_t *env, axis2_svc_client_t *svc_client)
AXIS2_EXTERN axis2_status_t | sandesha2_client_send_ack_request_with_svc_client_and_seq_key (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_char_t *seq_key)
AXIS2_EXTERN axis2_status_t | sandesha2_client_send_non_blocking (const axutil_env_t *env, axis2_svc_client_t *svc_client, axis2_options_t *options, axutil_qname_t *op_qname, axis2_callback_t *callback, axiom_node_t *payload, axis2_listener_manager_t *listener_manager)
axiom_node_t * | sandesha2_client_get_response_envelope (const axutil_env_t *env, axis2_conf_ctx_t *conf_ctx, axis2_svc_client_t *svc_client, int msg_no)

## Function Documentation

AXIS2_EXTERN axis2_status_t sandesha2_client_close_seq_with_svc_client | ( | const axutil_env_t * | env,
|  | axis2_svc_client_t * | svc_client,
|  | axis2_callback_t * | callback |
| ) |  |  |

User can close the seq defined by the passed svc_client.

Parameters:

  | svc_client |

AXIS2_EXTERN axutil_array_list_t* sandesha2_client_get_incoming_seq_reports | ( | axutil_env_t * | env,
|  | axis2_conf_ctx_t * | conf_ctx |
| ) |  |  |

Users can get a list of seq_reports each describing a incoming sequence, which are the sequences the client work as a RMD. Caller must free the returned array.

Parameters:

  | config_ctx |

Returns:

AXIS2_EXTERN sandesha2_report_t* sandesha2_client_get_report | ( | const axutil_env_t * | env,
|  | axis2_conf_ctx_t * | conf_ctx |
| ) |  |  |

sandesha2_report gives the details of all incoming and outgoing sequences. The outgoing sequence have to pass the initial state (CS/CSR exchange) to be included in a sandesha2_report

Parameters:

  | conf_ctx |

Returns:

axiom_node_t* sandesha2_client_get_response_envelope | ( | const axutil_env_t * | env,
|  | axis2_conf_ctx_t * | conf_ctx,
|  | axis2_svc_client_t * | svc_client,
|  | int | msg_no |
| ) |  |  |

In RM 1.0 two way single channel messaging user need to call for the response envelope.

Parameters:

  | conf_ctx |
  | svc_client |
  | msg_no |

Returns:
  response soap envelope

AXIS2_EXTERN axis2_status_t sandesha2_client_terminate_seq_with_svc_client | ( | const axutil_env_t * | env,
|  | axis2_svc_client_t * | svc_client,
|  | axis2_callback_t * | callback |
| ) |  |  |

User can terminate the sequence defined by the passed svc_client.

Parameters:

  | svc_client |

AXIS2_EXTERN axis2_status_t sandesha2_client_wait_until_seq_completed_with_svc_client | ( | const axutil_env_t * | env,
|  | axis2_svc_client_t * | svc_client |
| ) |  |  |

This blocks the system until the messages sent have been completed.

Parameters:

  | svc_client |

AXIS2_EXTERN axis2_status_t sandesha2_client_wait_until_seq_completed_with_svc_client_and_max_waiting_time | ( | const axutil_env_t * | env,
|  | axis2_svc_client_t * | svc_client,
|  | long | max_waiting_time |
| ) |  |  |

This blocks the system until the messages sent have been completed or until the given time interval exceeds. (the time is taken in seconds)

Parameters:

  | svc_client |
  | max_waiting_time |