Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axis2_svc_client.h

Go to the documentation of this file.
00001 /*
00002 * Copyright 2004,2005 The Apache Software Foundation.
00003 *
00004 * Licensed under the Apache License, Version 2.0 (the "License");
00005 * you may not use this file except in compliance with the License.
00006 * You may obtain a copy of the License at
00007 *
00008 *      http://www.apache.org/licenses/LICENSE-2.0
00009 *
00010 * Unless required by applicable law or agreed to in writing, software
00011 * distributed under the License is distributed on an "AS IS" BASIS,
00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013 * See the License for the specific language governing permissions and
00014 * limitations under the License.
00015 */
00016 
00017 #ifndef AXIS2_SVC_CLIENT_H
00018 #define AXIS2_SVC_CLIENT_H
00019 
00020 
00036 #include <axis2_defines.h>
00037 #include <axis2_env.h>
00038 #include <axis2_svc.h>
00039 #include <axis2_options.h>
00040 #include <axis2_qname.h>
00041 #include <axiom_element.h>
00042 #include <axis2_callback.h>
00043 #include <axis2_endpoint_ref.h>
00044 #include <axis2_svc_ctx.h>
00045 #include <axis2_conf_ctx.h>
00046 #include <axis2_op_client.h>
00047 
00049 #define AXIS2_ANON_SERVICE  "__ANONYMOUS_SERVICE__"
00050 
00052 #define AXIS2_ANON_OUT_ONLY_OP "__OPERATION_OUT_ONLY__"
00053 
00055 #define AXIS2_ANON_ROBUST_OUT_ONLY_OP "__OPERATION_ROBUST_OUT_ONLY__"
00056 
00058 #define AXIS2_ANON_OUT_IN_OP "__OPERATION_OUT_IN__"
00059 
00060 
00061 #ifdef __cplusplus
00062 extern "C"
00063 {
00064 #endif
00065 
00073     typedef struct axis2_svc_client_ops axis2_svc_client_ops_t;
00075     typedef struct axis2_svc_client axis2_svc_client_t;
00076 
00077 
00082     struct axis2_svc_client_ops
00083     {
00092         const axis2_svc_t *(AXIS2_CALL *
00093                 get_svc)(
00094                     const axis2_svc_client_t *svc_client,
00095                     const axis2_env_t *env);
00096 
00104         axis2_status_t (AXIS2_CALL *
00105                 set_options)(
00106                     axis2_svc_client_t *svc_client,
00107                     const axis2_env_t *env,
00108                     const axis2_options_t *options);
00109 
00117         const axis2_options_t *(AXIS2_CALL *
00118                 get_options)(
00119                     const axis2_svc_client_t *svc_client,
00120                     const axis2_env_t *env);
00121 
00131         axis2_status_t (AXIS2_CALL *
00132                 set_override_options)(
00133                     axis2_svc_client_t *svc_client,
00134                     const axis2_env_t *env,
00135                     const axis2_options_t *override_options);
00136 
00143         axis2_options_t *(AXIS2_CALL *
00144                 get_override_options)(
00145                     const axis2_svc_client_t *svc_client,
00146                     const axis2_env_t *env);
00147 
00159         axis2_status_t (AXIS2_CALL *
00160                 engage_module)(
00161                     axis2_svc_client_t *svc_client,
00162                     const axis2_env_t *env,
00163                     const axis2_char_t *module_name);
00164 
00174         axis2_status_t (AXIS2_CALL *
00175                 disengage_module)(
00176                     axis2_svc_client_t *svc_client,
00177                     const axis2_env_t *env,
00178                     const axis2_char_t *module_name);
00179 
00190         axis2_status_t (AXIS2_CALL *
00191                 add_header)(
00192                     axis2_svc_client_t *svc_client,
00193                     const axis2_env_t *env,
00194                     axiom_node_t *header);
00195 
00202         axis2_status_t (AXIS2_CALL *
00203                 remove_all_headers)(
00204                     axis2_svc_client_t *svc_client,
00205                     const axis2_env_t *env);
00206 
00219         axis2_status_t (AXIS2_CALL *
00220                 send_robust)(
00221                     axis2_svc_client_t *svc_client,
00222                     const axis2_env_t *env,
00223                     const axis2_qname_t *op_qname,
00224                     const axiom_node_t *payload);
00225 
00237         void (AXIS2_CALL *
00238                 fire_and_forget)(
00239                     axis2_svc_client_t *svc_client,
00240                     const axis2_env_t *env,
00241                     const axis2_qname_t *op_qname,
00242                     const axiom_node_t *payload);
00243 
00255         axiom_node_t *(AXIS2_CALL *
00256                 send_receive)(
00257                     axis2_svc_client_t *svc_client,
00258                     const axis2_env_t *env,
00259                     const axis2_qname_t *op_qname,
00260                     const axiom_node_t *payload);
00261 
00273         void (AXIS2_CALL *
00274                 send_receive_non_blocking)(
00275                     axis2_svc_client_t *svc_client,
00276                     const axis2_env_t *env,
00277                     const axis2_qname_t *op_qname,
00278                     const axiom_node_t *payload,
00279                     axis2_callback_t *callback);
00280 
00290         axis2_op_client_t *(AXIS2_CALL *
00291                 create_op_client)(
00292                     axis2_svc_client_t *svc_client,
00293                     const axis2_env_t *env,
00294                     const axis2_qname_t *op_qname);
00295 
00304         axis2_status_t (AXIS2_CALL *
00305                 finalize_invoke)(
00306                     axis2_svc_client_t *svc_client,
00307                     const axis2_env_t *env);
00308 
00318         const axis2_endpoint_ref_t *(AXIS2_CALL *
00319                 get_own_endpoint_ref)(
00320                     axis2_svc_client_t *svc_client,
00321                     const axis2_env_t *env,
00322                     const axis2_char_t *transport);
00323 
00331         const axis2_endpoint_ref_t *(AXIS2_CALL *
00332                 get_target_endpoint_ref)(
00333                     axis2_svc_client_t *svc_client,
00334                     const axis2_env_t *env);
00335 
00344         axis2_status_t (AXIS2_CALL *
00345                 set_target_endpoint_ref)(
00346                     axis2_svc_client_t *svc_client,
00347                     const axis2_env_t *env,
00348                     axis2_endpoint_ref_t *target_epr);
00349 
00357         const axis2_svc_ctx_t *(AXIS2_CALL *
00358                 get_svc_ctx)(
00359                     const axis2_svc_client_t *svc_client,
00360                     const axis2_env_t *env);
00361 
00369         axis2_status_t (AXIS2_CALL *
00370                 free)(
00371                     axis2_svc_client_t *svc_client,
00372                     const axis2_env_t *env);
00373     };
00374 
00378     struct axis2_svc_client
00379     {
00380         axis2_svc_client_ops_t *ops;
00381     };
00382 
00390     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00391     axis2_svc_client_create(
00392         const axis2_env_t *env,
00393         const axis2_char_t *client_home);
00394 
00405     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00406     axis2_svc_client_create_with_conf_ctx_and_svc(
00407         const axis2_env_t *env,
00408         const axis2_char_t *client_home,
00409         axis2_conf_ctx_t *conf_ctx,
00410         axis2_svc_t *svc);
00411 
00414 #define AXIS2_SVC_CLIENT_GET_AXIS_SERVICE(svc_client, env) \
00415         ((svc_client)->ops->get_svc(svc_client, env))
00416 
00419 #define AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options) \
00420         ((svc_client)->ops->set_options(svc_client, env, options))
00421 
00424 #define AXIS2_SVC_CLIENT_GET_OPTIONS(svc_client, env) \
00425         ((svc_client)->ops->get_options(svc_client, env))
00426 
00429 #define AXIS2_SVC_CLIENT_SET_OVERRIDE_OPTIONS(svc_client, env, override_options) \
00430         ((svc_client)->ops->set_override_options(svc_client, env, override_options))
00431 
00434 #define AXIS2_SVC_CLIENT_GET_OVERRIDE_OPTIONS(svc_client, env) \
00435         ((svc_client)->ops->get_override_options(svc_client, env))
00436 
00439 #define AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, module_name) \
00440         ((svc_client)->ops->engage_module(svc_client, env, module_name))
00441 
00444 #define AXIS2_SVC_CLIENT_DISENGAGE_MODULE(svc_client, env, module_name) \
00445         ((svc_client)->ops->disengage_module(svc_client, env, module_name))
00446 
00449 #define AXIS2_SVC_CLIENT_ADD_HEADER(svc_client, env, header) \
00450         ((svc_client)->ops->add_header(svc_client, env, header))
00451 
00454 #define AXIS2_SVC_CLIENT_REMOVE_ALL_HEADERS(svc_client, env) \
00455         ((svc_client)->ops->remove_all_headers(svc_client, env))
00456 
00460 #define AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload) \
00461         ((svc_client)->ops->send_robust(svc_client, env, NULL, payload))
00462 
00465 #define AXIS2_SVC_CLIENT_SEND_ROBUST_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00466         ((svc_client)->ops->send_robust(svc_client, env, op_qname, payload))
00467 
00471 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET(svc_client, env, payload) \
00472         ((svc_client)->ops->fire_and_forget(svc_client, env, NULL, payload))
00473 
00476 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00477         ((svc_client)->ops->fire_and_forget(svc_client, env, op_qname, payload))
00478 
00481 #define AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload) \
00482         ((svc_client)->ops->send_receive(svc_client, env, NULL, payload))
00483 
00486 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00487         ((svc_client)->ops->send_receive(svc_client, env, op_qname, payload))
00488 
00492 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env, payload, callback) \
00493         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, NULL, payload, callback))
00494 
00498 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING_WITH_OP_QNAME(svc_client, env, op_qname, payload, callback) \
00499         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, op_qname, payload, callback))
00500 
00503 #define AXIS2_SVC_CLIENT_CREATE_OP_CLIENT(svc_client, env, op_qname) \
00504         ((svc_client)->ops->create_op_client(svc_client, env, op_qname))
00505 
00508 #define AXIS2_SVC_CLIENT_FINALIZE_INVOKE(svc_client, env) \
00509         ((svc_client)->ops->finalize_invoke(svc_client, env))
00510 
00513 #define AXIS2_SVC_CLIENT_GET_OWN_ENDPOINT_REF(svc_client, env, transport) \
00514         ((svc_client)->ops->get_own_endpoint_ref(svc_client, env, transport))
00515 
00518 #define AXIS2_SVC_CLIENT_GET_TARGET_ENDPOINT_REF(svc_client, env) \
00519         ((svc_client)->ops->get_target_endpoint_ref(svc_client, env))
00520 
00523 #define AXIS2_SVC_CLIENT_SET_TARGET_ENDPOINT_REF(svc_client, env, target_epr) \
00524         ((svc_client)->ops->set_target_endpoint_ref(svc_client, env, target_epr))
00525 
00528 #define AXIS2_SVC_CLIENT_GET_SVC_CTX(svc_client, env) \
00529         ((svc_client)->ops->get_svc_ctx(svc_client, env))
00530 
00533 #define AXIS2_SVC_CLIENT_FREE(svc_client, env) \
00534         ((svc_client)->ops->free(svc_client, env))
00535 
00537 #ifdef __cplusplus
00538 }
00539 #endif
00540 
00541 #endif                          /* AXIS2_SVC_CLIENT_H */

Generated on Fri Jun 16 18:02:31 2006 for Axis2/C by  doxygen 1.4.2