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 
00383         axis2_op_client_t *(AXIS2_CALL *
00384                 get_op_client)(
00385                     const axis2_svc_client_t *svc_client,
00386                     const axis2_env_t *env);
00387     };
00388 
00392     struct axis2_svc_client
00393     {
00395         axis2_svc_client_ops_t *ops;
00396     };
00397 
00405     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00406     axis2_svc_client_create(
00407         const axis2_env_t *env,
00408         const axis2_char_t *client_home);
00409 
00422     AXIS2_EXTERN axis2_svc_client_t * AXIS2_CALL
00423     axis2_svc_client_create_with_conf_ctx_and_svc(
00424         const axis2_env_t *env,
00425         const axis2_char_t *client_home,
00426         axis2_conf_ctx_t *conf_ctx,
00427         axis2_svc_t *svc);
00428 
00444     AXIS2_EXTERN axis2_svc_client_t* AXIS2_CALL
00445     axis2_svc_client_create_for_dynamic_invocation(
00446         const axis2_env_t *env,
00447         axis2_conf_ctx_t *conf_ctx,
00448         const axis2_uri_t *wsdl_uri,
00449         const axis2_qname_t *wsdl_svc_qname,
00450         const axis2_char_t *endpoint_name,
00451         const axis2_char_t *client_home);
00452 
00455 #define AXIS2_SVC_CLIENT_GET_AXIS_SERVICE(svc_client, env) \
00456         ((svc_client)->ops->get_svc(svc_client, env))
00457 
00460 #define AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options) \
00461         ((svc_client)->ops->set_options(svc_client, env, options))
00462 
00465 #define AXIS2_SVC_CLIENT_GET_OPTIONS(svc_client, env) \
00466         ((svc_client)->ops->get_options(svc_client, env))
00467 
00470 #define AXIS2_SVC_CLIENT_SET_OVERRIDE_OPTIONS(svc_client, env, override_options) \
00471         ((svc_client)->ops->set_override_options(svc_client, env, override_options))
00472 
00475 #define AXIS2_SVC_CLIENT_GET_OVERRIDE_OPTIONS(svc_client, env) \
00476         ((svc_client)->ops->get_override_options(svc_client, env))
00477 
00480 #define AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, module_name) \
00481         ((svc_client)->ops->engage_module(svc_client, env, module_name))
00482 
00485 #define AXIS2_SVC_CLIENT_DISENGAGE_MODULE(svc_client, env, module_name) \
00486         ((svc_client)->ops->disengage_module(svc_client, env, module_name))
00487 
00490 #define AXIS2_SVC_CLIENT_ADD_HEADER(svc_client, env, header) \
00491         ((svc_client)->ops->add_header(svc_client, env, header))
00492 
00495 #define AXIS2_SVC_CLIENT_REMOVE_ALL_HEADERS(svc_client, env) \
00496         ((svc_client)->ops->remove_all_headers(svc_client, env))
00497 
00501 #define AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload) \
00502         ((svc_client)->ops->send_robust(svc_client, env, NULL, payload))
00503 
00506 #define AXIS2_SVC_CLIENT_SEND_ROBUST_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00507         ((svc_client)->ops->send_robust(svc_client, env, op_qname, payload))
00508 
00512 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET(svc_client, env, payload) \
00513         ((svc_client)->ops->fire_and_forget(svc_client, env, NULL, payload))
00514 
00517 #define AXIS2_SVC_CLIENT_FIRE_AND_FORGET_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00518         ((svc_client)->ops->fire_and_forget(svc_client, env, op_qname, payload))
00519 
00522 #define AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload) \
00523         ((svc_client)->ops->send_receive(svc_client, env, NULL, payload))
00524 
00527 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME(svc_client, env, op_qname, payload) \
00528         ((svc_client)->ops->send_receive(svc_client, env, op_qname, payload))
00529 
00533 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env, payload, callback) \
00534         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, NULL, payload, callback))
00535 
00539 #define AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING_WITH_OP_QNAME(svc_client, env, op_qname, payload, callback) \
00540         ((svc_client)->ops->send_receive_non_blocking(svc_client, env, op_qname, payload, callback))
00541 
00544 #define AXIS2_SVC_CLIENT_CREATE_OP_CLIENT(svc_client, env, op_qname) \
00545         ((svc_client)->ops->create_op_client(svc_client, env, op_qname))
00546 
00549 #define AXIS2_SVC_CLIENT_FINALIZE_INVOKE(svc_client, env) \
00550         ((svc_client)->ops->finalize_invoke(svc_client, env))
00551 
00554 #define AXIS2_SVC_CLIENT_GET_OWN_ENDPOINT_REF(svc_client, env, transport) \
00555         ((svc_client)->ops->get_own_endpoint_ref(svc_client, env, transport))
00556 
00559 #define AXIS2_SVC_CLIENT_GET_TARGET_ENDPOINT_REF(svc_client, env) \
00560         ((svc_client)->ops->get_target_endpoint_ref(svc_client, env))
00561 
00564 #define AXIS2_SVC_CLIENT_SET_TARGET_ENDPOINT_REF(svc_client, env, target_epr) \
00565         ((svc_client)->ops->set_target_endpoint_ref(svc_client, env, target_epr))
00566 
00569 #define AXIS2_SVC_CLIENT_GET_SVC_CTX(svc_client, env) \
00570         ((svc_client)->ops->get_svc_ctx(svc_client, env))
00571 
00574 #define AXIS2_SVC_CLIENT_FREE(svc_client, env) \
00575         ((svc_client)->ops->free_fn(svc_client, env))
00576         
00579     #define AXIS2_SVC_CLIENT_GET_OP_CLIENT(svc_client, env) \
00580             ((svc_client)->ops->get_op_client(svc_client, env))
00581 
00582 
00584 #ifdef __cplusplus
00585 }
00586 #endif
00587 
00588 #endif                          /* AXIS2_SVC_CLIENT_H */

Generated on Tue Oct 3 22:35:48 2006 for Axis2/C by  doxygen 1.4.7