axis2_svc_client.h

Go to the documentation of this file.
00001 /*
00002 * Licensed to the Apache Software Foundation (ASF) under one or more
00003 * contributor license agreements.  See the NOTICE file distributed with
00004 * this work for additional information regarding copyright ownership.
00005 * The ASF licenses this file to You under the Apache License, Version 2.0
00006 * (the "License"); you may not use this file except in compliance with
00007 * the License.  You may obtain a copy of the License at
00008 *
00009 *      http://www.apache.org/licenses/LICENSE-2.0
00010 *
00011 * Unless required by applicable law or agreed to in writing, software
00012 * distributed under the License is distributed on an "AS IS" BASIS,
00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 * See the License for the specific language governing permissions and
00015 * limitations under the License.
00016 */
00017 
00018 #ifndef AXIS2_SVC_CLIENT_H
00019 #define AXIS2_SVC_CLIENT_H
00020 
00043 #include <axis2_defines.h>
00044 #include <axis2_env.h>
00045 #include <axis2_uri.h>
00046 #include <axis2_svc.h>
00047 #include <axis2_options.h>
00048 #include <axis2_qname.h>
00049 #include <axiom_element.h>
00050 #include <axis2_callback.h>
00051 #include <axis2_endpoint_ref.h>
00052 #include <axis2_svc_ctx.h>
00053 #include <axis2_conf_ctx.h>
00054 #include <axis2_op_client.h>
00055 
00057 #define AXIS2_ANON_SERVICE  "__ANONYMOUS_SERVICE__"
00058 
00060 #define AXIS2_ANON_OUT_ONLY_OP "__OPERATION_OUT_ONLY__"
00061 
00063 #define AXIS2_ANON_ROBUST_OUT_ONLY_OP "__OPERATION_ROBUST_OUT_ONLY__"
00064 
00066 #define AXIS2_ANON_OUT_IN_OP "__OPERATION_OUT_IN__"
00067 
00068 
00069 #ifdef __cplusplus
00070 extern "C"
00071 {
00072 #endif
00073 
00075     typedef struct axis2_svc_client_ops axis2_svc_client_ops_t;
00077     typedef struct axis2_svc_client axis2_svc_client_t;
00078 
00079 
00084     struct axis2_svc_client_ops
00085     {
00094         axis2_svc_t *(AXIS2_CALL *
00095                 get_svc)(
00096                     const axis2_svc_client_t *svc_client,
00097                     const axis2_env_t *env);
00098 
00106         axis2_status_t (AXIS2_CALL *
00107                 set_options)(
00108                     axis2_svc_client_t *svc_client,
00109                     const axis2_env_t *env,
00110                     const axis2_options_t *options);
00111 
00119         const axis2_options_t *(AXIS2_CALL *
00120                 get_options)(
00121                     const axis2_svc_client_t *svc_client,
00122                     const axis2_env_t *env);
00123 
00133         axis2_status_t (AXIS2_CALL *
00134                 set_override_options)(
00135                     axis2_svc_client_t *svc_client,
00136                     const axis2_env_t *env,
00137                     const axis2_options_t *override_options);
00138 
00146         const axis2_options_t *(AXIS2_CALL *
00147                 get_override_options)(
00148                     const axis2_svc_client_t *svc_client,
00149                     const axis2_env_t *env);
00150 
00162         axis2_status_t (AXIS2_CALL *
00163                 engage_module)(
00164                     axis2_svc_client_t *svc_client,
00165                     const axis2_env_t *env,
00166                     const axis2_char_t *module_name);
00167 
00177         axis2_status_t (AXIS2_CALL *
00178                 disengage_module)(
00179                     axis2_svc_client_t *svc_client,
00180                     const axis2_env_t *env,
00181                     const axis2_char_t *module_name);
00182 
00193         axis2_status_t (AXIS2_CALL *
00194                 add_header)(
00195                     axis2_svc_client_t *svc_client,
00196                     const axis2_env_t *env,
00197                     axiom_node_t *header);
00198 
00205         axis2_status_t (AXIS2_CALL *
00206                 remove_all_headers)(
00207                     axis2_svc_client_t *svc_client,
00208                     const axis2_env_t *env);
00209 
00222         axis2_status_t (AXIS2_CALL *
00223                 send_robust)(
00224                     axis2_svc_client_t *svc_client,
00225                     const axis2_env_t *env,
00226                     const axis2_qname_t *op_qname,
00227                     const axiom_node_t *payload);
00228 
00240         void (AXIS2_CALL *
00241                 fire_and_forget)(
00242                     axis2_svc_client_t *svc_client,
00243                     const axis2_env_t *env,
00244                     const axis2_qname_t *op_qname,
00245                     const axiom_node_t *payload);
00246 
00258         axiom_node_t *(AXIS2_CALL *
00259                 send_receive)(
00260                     axis2_svc_client_t *svc_client,
00261                     const axis2_env_t *env,
00262                     const axis2_qname_t *op_qname,
00263                     const axiom_node_t *payload);
00264 
00276         void (AXIS2_CALL *
00277                 send_receive_non_blocking)(
00278                     axis2_svc_client_t *svc_client,
00279                     const axis2_env_t *env,
00280                     const axis2_qname_t *op_qname,
00281                     const axiom_node_t *payload,
00282                     axis2_callback_t *callback);
00283 
00293         axis2_op_client_t *(AXIS2_CALL *
00294                 create_op_client)(
00295                     axis2_svc_client_t *svc_client,
00296                     const axis2_env_t *env,
00297                     const axis2_qname_t *op_qname);
00298 
00307         axis2_status_t (AXIS2_CALL *
00308                 finalize_invoke)(
00309                     axis2_svc_client_t *svc_client,
00310                     const axis2_env_t *env);
00311 
00321         const axis2_endpoint_ref_t *(AXIS2_CALL *
00322                 get_own_endpoint_ref)(
00323                     const axis2_svc_client_t *svc_client,
00324                     const axis2_env_t *env,
00325                     const axis2_char_t *transport);
00326 
00334         const axis2_endpoint_ref_t *(AXIS2_CALL *
00335                 get_target_endpoint_ref)(
00336                     const axis2_svc_client_t *svc_client,
00337                     const axis2_env_t *env);
00338 
00347         axis2_status_t (AXIS2_CALL *
00348                 set_target_endpoint_ref)(
00349                     axis2_svc_client_t *svc_client,
00350                     const axis2_env_t *env,
00351                     axis2_endpoint_ref_t *target_epr);
00352 
00360         axis2_svc_ctx_t *(AXIS2_CALL *
00361                 get_svc_ctx)(
00362                     const axis2_svc_client_t *svc_client,
00363                     const axis2_env_t *env);
00364 
00372         axis2_status_t (AXIS2_CALL *
00373                 free_fn)(
00374                     axis2_svc_client_t *svc_client,
00375                     const axis2_env_t *env);
00376 
00384         axis2_op_client_t *(AXIS2_CALL *
00385                 get_op_client)(
00386                     const axis2_svc_client_t *svc_client,
00387                     const axis2_env_t *env);
00388     };
00389 
00393     struct axis2_svc_client
00394     {
00396         axis2_svc_client_ops_t *ops;
00397     };
00398 
00406     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00407     axis2_svc_client_create(
00408         const axis2_env_t *env,
00409         const axis2_char_t *client_home);
00410 
00423     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00424     axis2_svc_client_create_with_conf_ctx_and_svc(
00425         const axis2_env_t *env,
00426         const axis2_char_t *client_home,
00427         axis2_conf_ctx_t *conf_ctx,
00428         axis2_svc_t *svc);
00429 
00445     AXIS2_EXTERN axis2_svc_client_t* AXIS2_CALL
00446     axis2_svc_client_create_for_dynamic_invocation(
00447         const axis2_env_t *env,
00448         axis2_conf_ctx_t *conf_ctx,
00449         const axis2_uri_t *wsdl_uri,
00450         const axis2_qname_t *wsdl_svc_qname,
00451         const axis2_char_t *endpoint_name,
00452         const axis2_char_t *client_home);
00453 
00456 #define AXIS2_SVC_CLIENT_GET_AXIS_SERVICE(svc_client, env) \
00457         ((svc_client)->ops->get_svc(svc_client, env))
00458 
00461 #define AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options) \
00462         ((svc_client)->ops->set_options(svc_client, env, options))
00463 
00466 #define AXIS2_SVC_CLIENT_GET_OPTIONS(svc_client, env) \
00467         ((svc_client)->ops->get_options(svc_client, env))
00468 
00471 #define AXIS2_SVC_CLIENT_SET_OVERRIDE_OPTIONS(svc_client, env, override_options) \
00472         ((svc_client)->ops->set_override_options(svc_client, env, override_options))
00473 
00476 #define AXIS2_SVC_CLIENT_GET_OVERRIDE_OPTIONS(svc_client, env) \
00477         ((svc_client)->ops->get_override_options(svc_client, env))
00478 
00481 #define AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, module_name) \
00482         ((svc_client)->ops->engage_module(svc_client, env, module_name))
00483 
00486 #define AXIS2_SVC_CLIENT_DISENGAGE_MODULE(svc_client, env, module_name) \
00487         ((svc_client)->ops->disengage_module(svc_client, env, module_name))
00488 
00491 #define AXIS2_SVC_CLIENT_ADD_HEADER(svc_client, env, header) \
00492         ((svc_client)->ops->add_header(svc_client, env, header))
00493 
00496 #define AXIS2_SVC_CLIENT_REMOVE_ALL_HEADERS(svc_client, env) \
00497         ((svc_client)->ops->remove_all_headers(svc_client, env))
00498 
00502 #define AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload) \
00503         ((svc_client)->ops->send_robust(svc_client, env, NULL, payload))
00504 
00507 #define AXIS2_SVC_CLIENT_SEND_ROBUST_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00508         ((svc_client)->ops->send_robust(svc_client, env, op_qname, payload))
00509 
00513 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET(svc_client, env, payload) \
00514         ((svc_client)->ops->fire_and_forget(svc_client, env, NULL, payload))
00515 
00518 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00519         ((svc_client)->ops->fire_and_forget(svc_client, env, op_qname, payload))
00520 
00523 #define AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload) \
00524         ((svc_client)->ops->send_receive(svc_client, env, NULL, payload))
00525 
00528 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00529         ((svc_client)->ops->send_receive(svc_client, env, op_qname, payload))
00530 
00534 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env, payload, callback) \
00535         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, NULL, payload, callback))
00536 
00540 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING_WITH_OP_QNAME(svc_client, env, op_qname, payload, callback) \
00541         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, op_qname, payload, callback))
00542 
00545 #define AXIS2_SVC_CLIENT_CREATE_OP_CLIENT(svc_client, env, op_qname) \
00546         ((svc_client)->ops->create_op_client(svc_client, env, op_qname))
00547 
00550 #define AXIS2_SVC_CLIENT_FINALIZE_INVOKE(svc_client, env) \
00551         ((svc_client)->ops->finalize_invoke(svc_client, env))
00552 
00555 #define AXIS2_SVC_CLIENT_GET_OWN_ENDPOINT_REF(svc_client, env, transport) \
00556         ((svc_client)->ops->get_own_endpoint_ref(svc_client, env, transport))
00557 
00560 #define AXIS2_SVC_CLIENT_GET_TARGET_ENDPOINT_REF(svc_client, env) \
00561         ((svc_client)->ops->get_target_endpoint_ref(svc_client, env))
00562 
00565 #define AXIS2_SVC_CLIENT_SET_TARGET_ENDPOINT_REF(svc_client, env, target_epr) \
00566         ((svc_client)->ops->set_target_endpoint_ref(svc_client, env, target_epr))
00567 
00570 #define AXIS2_SVC_CLIENT_GET_SVC_CTX(svc_client, env) \
00571         ((svc_client)->ops->get_svc_ctx(svc_client, env))
00572 
00575 #define AXIS2_SVC_CLIENT_FREE(svc_client, env) \
00576         ((svc_client)->ops->free_fn(svc_client, env))
00577         
00580     #define AXIS2_SVC_CLIENT_GET_OP_CLIENT(svc_client, env) \
00581             ((svc_client)->ops->get_op_client(svc_client, env))
00582 
00583 
00585 #ifdef __cplusplus
00586 }
00587 #endif
00588 
00589 #endif                          /* AXIS2_SVC_CLIENT_H */

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1