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 
00042 #include <axis2_defines.h>
00043 #include <axis2_env.h>
00044 #include <axis2_uri.h>
00045 #include <axis2_svc.h>
00046 #include <axis2_options.h>
00047 #include <axis2_qname.h>
00048 #include <axiom_element.h>
00049 #include <axis2_callback.h>
00050 #include <axis2_endpoint_ref.h>
00051 #include <axis2_svc_ctx.h>
00052 #include <axis2_conf_ctx.h>
00053 #include <axis2_op_client.h>
00054 
00056 #define AXIS2_ANON_SERVICE  "__ANONYMOUS_SERVICE__"
00057 
00059 #define AXIS2_ANON_OUT_ONLY_OP "__OPERATION_OUT_ONLY__"
00060 
00062 #define AXIS2_ANON_ROBUST_OUT_ONLY_OP "__OPERATION_ROBUST_OUT_ONLY__"
00063 
00065 #define AXIS2_ANON_OUT_IN_OP "__OPERATION_OUT_IN__"
00066 
00067 
00068 #ifdef __cplusplus
00069 extern "C"
00070 {
00071 #endif
00072 
00074     typedef struct axis2_svc_client_ops axis2_svc_client_ops_t;
00076     typedef struct axis2_svc_client axis2_svc_client_t;
00077 
00078 
00083     struct axis2_svc_client_ops
00084     {
00093         axis2_svc_t *(AXIS2_CALL *
00094                 get_svc)(
00095                     const axis2_svc_client_t *svc_client,
00096                     const axis2_env_t *env);
00097 
00105         axis2_status_t (AXIS2_CALL *
00106                 set_options)(
00107                     axis2_svc_client_t *svc_client,
00108                     const axis2_env_t *env,
00109                     const axis2_options_t *options);
00110 
00118         const axis2_options_t *(AXIS2_CALL *
00119                 get_options)(
00120                     const axis2_svc_client_t *svc_client,
00121                     const axis2_env_t *env);
00122 
00132         axis2_status_t (AXIS2_CALL *
00133                 set_override_options)(
00134                     axis2_svc_client_t *svc_client,
00135                     const axis2_env_t *env,
00136                     const axis2_options_t *override_options);
00137 
00145         const axis2_options_t *(AXIS2_CALL *
00146                 get_override_options)(
00147                     const axis2_svc_client_t *svc_client,
00148                     const axis2_env_t *env);
00149 
00161         axis2_status_t (AXIS2_CALL *
00162                 engage_module)(
00163                     axis2_svc_client_t *svc_client,
00164                     const axis2_env_t *env,
00165                     const axis2_char_t *module_name);
00166 
00176         axis2_status_t (AXIS2_CALL *
00177                 disengage_module)(
00178                     axis2_svc_client_t *svc_client,
00179                     const axis2_env_t *env,
00180                     const axis2_char_t *module_name);
00181 
00192         axis2_status_t (AXIS2_CALL *
00193                 add_header)(
00194                     axis2_svc_client_t *svc_client,
00195                     const axis2_env_t *env,
00196                     axiom_node_t *header);
00197 
00204         axis2_status_t (AXIS2_CALL *
00205                 remove_all_headers)(
00206                     axis2_svc_client_t *svc_client,
00207                     const axis2_env_t *env);
00208 
00221         axis2_status_t (AXIS2_CALL *
00222                 send_robust)(
00223                     axis2_svc_client_t *svc_client,
00224                     const axis2_env_t *env,
00225                     const axis2_qname_t *op_qname,
00226                     const axiom_node_t *payload);
00227 
00239         void (AXIS2_CALL *
00240                 fire_and_forget)(
00241                     axis2_svc_client_t *svc_client,
00242                     const axis2_env_t *env,
00243                     const axis2_qname_t *op_qname,
00244                     const axiom_node_t *payload);
00245 
00257         axiom_node_t *(AXIS2_CALL *
00258                 send_receive)(
00259                     axis2_svc_client_t *svc_client,
00260                     const axis2_env_t *env,
00261                     const axis2_qname_t *op_qname,
00262                     const axiom_node_t *payload);
00263 
00275         void (AXIS2_CALL *
00276                 send_receive_non_blocking)(
00277                     axis2_svc_client_t *svc_client,
00278                     const axis2_env_t *env,
00279                     const axis2_qname_t *op_qname,
00280                     const axiom_node_t *payload,
00281                     axis2_callback_t *callback);
00282 
00292         axis2_op_client_t *(AXIS2_CALL *
00293                 create_op_client)(
00294                     axis2_svc_client_t *svc_client,
00295                     const axis2_env_t *env,
00296                     const axis2_qname_t *op_qname);
00297 
00306         axis2_status_t (AXIS2_CALL *
00307                 finalize_invoke)(
00308                     axis2_svc_client_t *svc_client,
00309                     const axis2_env_t *env);
00310 
00320         const axis2_endpoint_ref_t *(AXIS2_CALL *
00321                 get_own_endpoint_ref)(
00322                     const axis2_svc_client_t *svc_client,
00323                     const axis2_env_t *env,
00324                     const axis2_char_t *transport);
00325 
00333         const axis2_endpoint_ref_t *(AXIS2_CALL *
00334                 get_target_endpoint_ref)(
00335                     const axis2_svc_client_t *svc_client,
00336                     const axis2_env_t *env);
00337 
00346         axis2_status_t (AXIS2_CALL *
00347                 set_target_endpoint_ref)(
00348                     axis2_svc_client_t *svc_client,
00349                     const axis2_env_t *env,
00350                     axis2_endpoint_ref_t *target_epr);
00351 
00359         axis2_svc_ctx_t *(AXIS2_CALL *
00360                 get_svc_ctx)(
00361                     const axis2_svc_client_t *svc_client,
00362                     const axis2_env_t *env);
00363 
00371         axis2_status_t (AXIS2_CALL *
00372                 free_fn)(
00373                     axis2_svc_client_t *svc_client,
00374                     const axis2_env_t *env);
00375     };
00376 
00380     struct axis2_svc_client
00381     {
00383         axis2_svc_client_ops_t *ops;
00384     };
00385 
00393     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00394     axis2_svc_client_create(
00395         const axis2_env_t *env,
00396         const axis2_char_t *client_home);
00397 
00410     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00411     axis2_svc_client_create_with_conf_ctx_and_svc(
00412         const axis2_env_t *env,
00413         const axis2_char_t *client_home,
00414         axis2_conf_ctx_t *conf_ctx,
00415         axis2_svc_t *svc);
00416 
00432     AXIS2_EXTERN axis2_svc_client_t* AXIS2_CALL
00433     axis2_svc_client_create_for_dynamic_invocation(
00434         const axis2_env_t *env,
00435         axis2_conf_ctx_t *conf_ctx,
00436         const axis2_uri_t *wsdl_uri,
00437         const axis2_qname_t *wsdl_svc_qname,
00438         const axis2_char_t *endpoint_name,
00439         const axis2_char_t *client_home);
00440 
00443 #define AXIS2_SVC_CLIENT_GET_AXIS_SERVICE(svc_client, env) \
00444         ((svc_client)->ops->get_svc(svc_client, env))
00445 
00448 #define AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options) \
00449         ((svc_client)->ops->set_options(svc_client, env, options))
00450 
00453 #define AXIS2_SVC_CLIENT_GET_OPTIONS(svc_client, env) \
00454         ((svc_client)->ops->get_options(svc_client, env))
00455 
00458 #define AXIS2_SVC_CLIENT_SET_OVERRIDE_OPTIONS(svc_client, env, override_options) \
00459         ((svc_client)->ops->set_override_options(svc_client, env, override_options))
00460 
00463 #define AXIS2_SVC_CLIENT_GET_OVERRIDE_OPTIONS(svc_client, env) \
00464         ((svc_client)->ops->get_override_options(svc_client, env))
00465 
00468 #define AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, module_name) \
00469         ((svc_client)->ops->engage_module(svc_client, env, module_name))
00470 
00473 #define AXIS2_SVC_CLIENT_DISENGAGE_MODULE(svc_client, env, module_name) \
00474         ((svc_client)->ops->disengage_module(svc_client, env, module_name))
00475 
00478 #define AXIS2_SVC_CLIENT_ADD_HEADER(svc_client, env, header) \
00479         ((svc_client)->ops->add_header(svc_client, env, header))
00480 
00483 #define AXIS2_SVC_CLIENT_REMOVE_ALL_HEADERS(svc_client, env) \
00484         ((svc_client)->ops->remove_all_headers(svc_client, env))
00485 
00489 #define AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload) \
00490         ((svc_client)->ops->send_robust(svc_client, env, NULL, payload))
00491 
00494 #define AXIS2_SVC_CLIENT_SEND_ROBUST_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00495         ((svc_client)->ops->send_robust(svc_client, env, op_qname, payload))
00496 
00500 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET(svc_client, env, payload) \
00501         ((svc_client)->ops->fire_and_forget(svc_client, env, NULL, payload))
00502 
00505 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00506         ((svc_client)->ops->fire_and_forget(svc_client, env, op_qname, payload))
00507 
00510 #define AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload) \
00511         ((svc_client)->ops->send_receive(svc_client, env, NULL, payload))
00512 
00515 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00516         ((svc_client)->ops->send_receive(svc_client, env, op_qname, payload))
00517 
00521 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env, payload, callback) \
00522         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, NULL, payload, callback))
00523 
00527 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING_WITH_OP_QNAME(svc_client, env, op_qname, payload, callback) \
00528         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, op_qname, payload, callback))
00529 
00532 #define AXIS2_SVC_CLIENT_CREATE_OP_CLIENT(svc_client, env, op_qname) \
00533         ((svc_client)->ops->create_op_client(svc_client, env, op_qname))
00534 
00537 #define AXIS2_SVC_CLIENT_FINALIZE_INVOKE(svc_client, env) \
00538         ((svc_client)->ops->finalize_invoke(svc_client, env))
00539 
00542 #define AXIS2_SVC_CLIENT_GET_OWN_ENDPOINT_REF(svc_client, env, transport) \
00543         ((svc_client)->ops->get_own_endpoint_ref(svc_client, env, transport))
00544 
00547 #define AXIS2_SVC_CLIENT_GET_TARGET_ENDPOINT_REF(svc_client, env) \
00548         ((svc_client)->ops->get_target_endpoint_ref(svc_client, env))
00549 
00552 #define AXIS2_SVC_CLIENT_SET_TARGET_ENDPOINT_REF(svc_client, env, target_epr) \
00553         ((svc_client)->ops->set_target_endpoint_ref(svc_client, env, target_epr))
00554 
00557 #define AXIS2_SVC_CLIENT_GET_SVC_CTX(svc_client, env) \
00558         ((svc_client)->ops->get_svc_ctx(svc_client, env))
00559 
00562 #define AXIS2_SVC_CLIENT_FREE(svc_client, env) \
00563         ((svc_client)->ops->free_fn(svc_client, env))
00564 
00566 #ifdef __cplusplus
00567 }
00568 #endif
00569 
00570 #endif                          /* AXIS2_SVC_CLIENT_H */

Generated on Thu Aug 31 17:32:36 2006 for Axis2/C by  doxygen 1.4.6