You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by da...@apache.org on 2006/10/31 08:55:33 UTC
svn commit: r469402 [1/2] - in /webservices/sandesha/trunk/c: ./ include/
samples/client/rm_echo/ samples/client/rm_echo_blocking/
samples/client/rm_ping/ src/core/ src/handlers/ src/msgprocessors/
src/storage/beans/ src/storage/inmemory/ src/util/ src...
Author: damitha
Date: Mon Oct 30 23:55:32 2006
New Revision: 469402
URL: http://svn.apache.org/viewvc?view=rev&rev=469402
Log:
Fixed AXIS2C-284. Implemented in order invocation. Fixed several bugs.
Modified:
webservices/sandesha/trunk/c/configure.ac
webservices/sandesha/trunk/c/include/sandesha2_ack_msg_processor.h
webservices/sandesha/trunk/c/include/sandesha2_ack_req_msg_processor.h
webservices/sandesha/trunk/c/include/sandesha2_app_msg_processor.h
webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_create_seq_msg_processor.h
webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_msg_processor.h
webservices/sandesha/trunk/c/samples/client/rm_echo/rm_echo_client.c
webservices/sandesha/trunk/c/samples/client/rm_echo_blocking/rm_echo_blocking.c
webservices/sandesha/trunk/c/samples/client/rm_ping/rm_ping_client.c
webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c
webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_res_msg_processor.c
webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c
webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
webservices/sandesha/trunk/c/src/storage/inmemory/create_seq_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/sender_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/seq_property_mgr.c
webservices/sandesha/trunk/c/src/util/ack_mgr.c
webservices/sandesha/trunk/c/src/util/msg_creator.c
webservices/sandesha/trunk/c/src/util/msg_init.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
webservices/sandesha/trunk/c/src/util/seq_mgr.c
webservices/sandesha/trunk/c/src/workers/in_order_invoker.c
webservices/sandesha/trunk/c/src/workers/sender.c
webservices/sandesha/trunk/c/src/wsrm/sequence.c
Modified: webservices/sandesha/trunk/c/configure.ac
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/configure.ac?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/configure.ac (original)
+++ webservices/sandesha/trunk/c/configure.ac Mon Oct 30 23:55:32 2006
@@ -22,7 +22,7 @@
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
if test "$GCC" = "yes"; then
- CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration"
+ CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration -Werror"
fi
LDFLAGS="-lpthread"
Modified: webservices/sandesha/trunk/c/include/sandesha2_ack_msg_processor.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_ack_msg_processor.h?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_ack_msg_processor.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_ack_msg_processor.h Mon Oct 30 23:55:32 2006
@@ -39,7 +39,7 @@
AXIS2_EXTERN sandesha2_msg_processor_t* AXIS2_CALL
sandesha2_ack_msg_processor_create(
- const axis2_env_t *env);
+ const axis2_env_t *env);
/** @} */
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/include/sandesha2_ack_req_msg_processor.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_ack_req_msg_processor.h?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_ack_req_msg_processor.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_ack_req_msg_processor.h Mon Oct 30 23:55:32 2006
@@ -39,7 +39,7 @@
AXIS2_EXTERN sandesha2_msg_processor_t* AXIS2_CALL
sandesha2_ack_req_msg_processor_create(
- const axis2_env_t *env);
+ const axis2_env_t *env);
/** @} */
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/include/sandesha2_app_msg_processor.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_app_msg_processor.h?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_app_msg_processor.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_app_msg_processor.h Mon Oct 30 23:55:32 2006
@@ -40,15 +40,14 @@
AXIS2_EXTERN sandesha2_msg_processor_t* AXIS2_CALL
sandesha2_app_msg_processor_create(
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_status_t AXIS2_CALL
sandesha2_app_msg_processor_send_ack_if_reqd(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *msg_ctx,
- axis2_char_t *msg_str,
- sandesha2_storage_mgr_t *mgr);
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *msg_ctx,
+ axis2_char_t *msg_str,
+ sandesha2_storage_mgr_t *mgr);
/** @} */
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h Mon Oct 30 23:55:32 2006
@@ -71,7 +71,7 @@
retrieve) (
sandesha2_create_seq_mgr_t *seq_mgr,
const axis2_env_t *env,
- axis2_char_t *msg_id);
+ const axis2_char_t *msg_id);
axis2_bool_t (AXIS2_CALL *
update) (
Modified: webservices/sandesha/trunk/c/include/sandesha2_create_seq_msg_processor.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_create_seq_msg_processor.h?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq_msg_processor.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq_msg_processor.h Mon Oct 30 23:55:32 2006
@@ -39,7 +39,7 @@
AXIS2_EXTERN sandesha2_msg_processor_t* AXIS2_CALL
sandesha2_create_seq_msg_processor_create(
- const axis2_env_t *env);
+ const axis2_env_t *env);
/** @} */
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h Mon Oct 30 23:55:32 2006
@@ -65,13 +65,13 @@
remove) (
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- axis2_char_t *msg_id);
+ const axis2_char_t *msg_id);
sandesha2_sender_bean_t *(AXIS2_CALL *
retrieve) (
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- axis2_char_t *msg_id);
+ const axis2_char_t *msg_id);
axis2_bool_t (AXIS2_CALL *
update) (
Modified: webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_msg_processor.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_msg_processor.h?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_msg_processor.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_terminate_seq_msg_processor.h Mon Oct 30 23:55:32 2006
@@ -39,7 +39,7 @@
AXIS2_EXTERN sandesha2_msg_processor_t* AXIS2_CALL
sandesha2_terminate_seq_msg_processor_create(
- const axis2_env_t *env);
+ const axis2_env_t *env);
/** @} */
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/samples/client/rm_echo/rm_echo_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/client/rm_echo/rm_echo_client.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/samples/client/rm_echo/rm_echo_client.c (original)
+++ webservices/sandesha/trunk/c/samples/client/rm_echo/rm_echo_client.c Mon Oct 30 23:55:32 2006
@@ -18,22 +18,44 @@
#include <axis2_util.h>
#include <axiom_soap.h>
#include <axis2_client.h>
+#include <axis2_svc_ctx.h>
+#include <axis2_conf_ctx.h>
+#include <axis2_op_client.h>
+#include <axis2_listener_manager.h>
+#include <callback_recv.h>
-#define MAX_COUNT 10
-
-/* my on_complete callback function */
+/* on_complete callback function */
axis2_status_t AXIS2_CALL
rm_echo_callback_on_complete(struct axis2_callback *callback,
const axis2_env_t *env);
-/* my on_error callback function */
+/* on_error callback function */
axis2_status_t AXIS2_CALL
rm_echo_callback_on_error(struct axis2_callback *callback,
const axis2_env_t *env,
int exception);
-/* to check whether the callback is completed */
-int is_complete = 0;
+void wait_on_callback(
+ const axis2_env_t *env,
+ axis2_callback_t *callback);
+
+static axis2_status_t
+send_non_blocking(
+ const axis2_env_t *env,
+ axis2_svc_client_t *svc_client,
+ axis2_options_t *options,
+ axis2_qname_t *op_qname,
+ axis2_callback_t *callback,
+ axiom_node_t *payload,
+ axis2_listener_manager_t *listner_manager);
+
+static axis2_bool_t
+fill_soap_envelope(
+ const axis2_env_t *env,
+ axis2_svc_client_t *svc_client,
+ axis2_msg_ctx_t *msg_ctx,
+ axis2_options_t *options,
+ const axiom_node_t *payload);
int main(int argc, char** argv)
{
@@ -45,15 +67,15 @@
const axis2_char_t *client_home = NULL;
axis2_svc_client_t* svc_client = NULL;
axiom_node_t *payload = NULL;
- axis2_callback_t *callback1 = NULL;
+ axis2_callback_t *callback = NULL;
axis2_callback_t *callback2 = NULL;
axis2_callback_t *callback3 = NULL;
- int count = 0;
axis2_property_t *property = NULL;
- /*axis2_qname_t *op_qname = NULL;*/
+ axis2_listener_manager_t *listener_manager = NULL;
/* Set up the environment */
- env = axis2_env_create_all("echo_non_blocking_dual.log", AXIS2_LOG_LEVEL_TRACE);
+ env = axis2_env_create_all("echo_non_blocking_dual.log",
+ AXIS2_LOG_LEVEL_TRACE);
/* Set end point reference of echo service */
address = "http://localhost:9090/axis2/services/rm_echo";
@@ -78,19 +100,22 @@
/* Seperate listner needs addressing, hence addressing stuff in options */
AXIS2_OPTIONS_SET_ACTION(options, env,
"http://ws.apache.org/axis2/c/samples/echoString");
- reply_to = axis2_endpoint_ref_create(env, "http://localhost:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__");
+ reply_to = axis2_endpoint_ref_create(env,
+ "http://localhost:6060/axis2/services/__ANONYMOUS_SERVICE__/"\
+ "__OPERATION_OUT_IN__");
AXIS2_OPTIONS_SET_REPLY_TO(options, env, reply_to);
property = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_VALUE_TRUE);
- /* Set up deploy folder. It is from the deploy folder, the configuration is picked up
- * using the axis2.xml file.
- * In this sample client_home points to the Axis2/C default deploy folder. The client_home can
- * be different from this folder on your system. For example, you may have a different folder
- * (say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the
- * modules that the client uses
+ /* Set up deploy folder. It is from the deploy folder, the configuration is
+ * picked up using the axis2.xml file.
+ * In this sample client_home points to the Axis2/C default deploy folder.
+ * The client_home can be different from this folder on your system. For
+ * example, you may have a different folder (say, my_client_folder) with its
+ * own axis2.xml file. my_client_folder/modules will have the modules that
+ * the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
if (!client_home)
@@ -113,63 +138,39 @@
AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);
AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, "sandesha2");
- /* Build the SOAP request message payload using OM API.*/
- /*payload = build_om_payload_for_echo_svc(env, "echo1");
-
- callback1 = axis2_callback_create(env);
-
- AXIS2_CALLBACK_SET_ON_COMPLETE(callback1, rm_echo_callback_on_complete);
+ listener_manager = axis2_listener_manager_create(env);
+ if (!listener_manager)
+ {
+ return AXIS2_FAILURE;
+ }
- AXIS2_CALLBACK_SET_ON_ERROR(callback1, rm_echo_callback_on_error);
+ payload = build_om_payload_for_echo_svc(env, "echo1");
+ callback = axis2_callback_create(env);
+ AXIS2_CALLBACK_SET_ON_COMPLETE(callback, rm_echo_callback_on_complete);
+ AXIS2_CALLBACK_SET_ON_ERROR(callback, rm_echo_callback_on_error);
+ send_non_blocking(env, svc_client, options, NULL, callback, payload,
+ listener_manager);
+
+ wait_on_callback(env, callback);
-
- AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env,
- payload, callback1);
- AXIS2_SLEEP(10);
payload = build_om_payload_for_echo_svc(env, "echo2");
-
callback2 = axis2_callback_create(env);
-
AXIS2_CALLBACK_SET_ON_COMPLETE(callback2, rm_echo_callback_on_complete);
-
AXIS2_CALLBACK_SET_ON_ERROR(callback2, rm_echo_callback_on_error);
+ send_non_blocking(env, svc_client, options, NULL, callback2, payload,
+ listener_manager);
+ wait_on_callback(env, callback2);
-
- AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env,
- payload, callback2);
- AXIS2_SLEEP(10);*/
- /* Create the callback object with default on_complete and on_error
- callback functions */
callback3 = axis2_callback_create(env);
- /* Set our on_complete fucntion pointer to the callback object */
AXIS2_CALLBACK_SET_ON_COMPLETE(callback3, rm_echo_callback_on_complete);
- /* Set our on_error function pointer to the callback object */
AXIS2_CALLBACK_SET_ON_ERROR(callback3, rm_echo_callback_on_error);
payload = build_om_payload_for_echo_svc(env, "echo3");
AXIS2_OPTIONS_SET_PROPERTY(options, env, "Sandesha2LastMessage",
property);
- /* Send request */
- AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env,
- payload, callback3);
- AXIS2_SLEEP(10);
-
- /** Wait till callback is complete. Simply keep the parent thread running
- until our on_complete or on_error is invoked */
- while(count < MAX_COUNT )
- {
- if (is_complete)
- {
- /* We are done with the callback */
- break;
- }
- count++;
- }
-
- if (!(count < MAX_COUNT))
- {
- printf("\nrm_echo client invoke FAILED. Counter timed out.\n");
- }
-
+ send_non_blocking(env, svc_client, options, NULL, callback3, payload,
+ listener_manager);
+ wait_on_callback(env, callback3);
+ AXIS2_SLEEP(10);
if (svc_client)
{
AXIS2_SVC_CLIENT_FREE(svc_client, env);
@@ -209,9 +210,10 @@
if(!ret_node)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:%d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
printf("echo stub invoke FAILED!\n");
status = AXIS2_FAILURE;
}
@@ -224,8 +226,7 @@
printf("\necho client invoke SUCCESSFUL!\n");
}
}
- is_complete = 1;
- return status;
+ return status;
}
axis2_status_t AXIS2_CALL
@@ -237,6 +238,132 @@
/** take necessary action on error */
printf("\nEcho client invoke FAILED. Error code:%d ::%s", exception,
AXIS2_ERROR_GET_MESSAGE(env->error));
- is_complete = 1;
return AXIS2_SUCCESS;
}
+
+void wait_on_callback(
+ const axis2_env_t *env,
+ axis2_callback_t *callback)
+{
+ /** Wait till callback is complete. Simply keep the parent thread running
+ until our on_complete or on_error is invoked */
+ while(1)
+ {
+ if (AXIS2_CALLBACK_GET_COMPLETE(callback, env))
+ {
+ /* We are done with the callback */
+ break;
+ }
+ }
+ return;
+}
+
+static axis2_status_t
+send_non_blocking(
+ const axis2_env_t *env,
+ axis2_svc_client_t *svc_client,
+ axis2_options_t *options,
+ axis2_qname_t *op_qname,
+ axis2_callback_t *callback,
+ axiom_node_t *payload,
+ axis2_listener_manager_t *listener_manager)
+{
+ axis2_op_client_t *op_client = NULL;
+ axis2_svc_ctx_t *svc_ctx = NULL;
+ axis2_conf_ctx_t *conf_ctx = NULL;
+ axis2_msg_ctx_t *msg_ctx = NULL;
+ axis2_svc_t *svc = NULL;
+ axis2_op_t *op = NULL;
+ axis2_callback_recv_t *callback_recv = NULL;
+ const axis2_char_t *transport_in_protocol = NULL;
+ axis2_callback_t *callback_temp = NULL;
+
+ if(!op_qname)
+ op_qname = axis2_qname_create(env, AXIS2_ANON_OUT_IN_OP, NULL, NULL);
+ svc_ctx = AXIS2_SVC_CLIENT_GET_SVC_CTX(svc_client, env);
+ conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env);
+ msg_ctx = axis2_msg_ctx_create(env, conf_ctx, NULL, NULL);
+ svc = AXIS2_SVC_CLIENT_GET_AXIS_SERVICE(svc_client, env);
+ op = AXIS2_SVC_GET_OP_WITH_QNAME(svc, env,
+ op_qname);
+ op_client = axis2_op_client_create(env, op, svc_ctx, options);
+ if (!op_client)
+ {
+ return AXIS2_FAILURE;
+ }
+ if (!fill_soap_envelope(env, svc_client, msg_ctx, options, payload))
+ return AXIS2_FAILURE;
+ AXIS2_OP_CLIENT_SET_CALLBACK(op_client, env, callback);
+ AXIS2_OP_CLIENT_ADD_OUT_MSG_CTX(op_client, env, msg_ctx);
+ transport_in_protocol = AXIS2_OPTIONS_GET_TRANSPORT_IN_PROTOCOL(
+ options, env);
+ if (!transport_in_protocol)
+ transport_in_protocol = AXIS2_TRANSPORT_HTTP;
+ AXIS2_LISTNER_MANAGER_MAKE_SURE_STARTED(listener_manager, env,
+ transport_in_protocol, conf_ctx);
+ callback_recv = axis2_callback_recv_create(env);
+ if (!(callback_recv))
+ {
+ axis2_svc_client_free(svc_client, env);
+ return AXIS2_FAILURE;
+ }
+
+ AXIS2_OP_SET_MSG_RECV(op, env,
+ AXIS2_CALLBACK_RECV_GET_BASE(callback_recv, env));
+ AXIS2_OP_CLIENT_SET_CALLBACK_RECV(op_client, env, callback_recv);
+ return AXIS2_OP_CLIENT_EXECUTE(op_client, env, AXIS2_FALSE);
+}
+
+static axis2_bool_t
+fill_soap_envelope(
+ const axis2_env_t *env,
+ axis2_svc_client_t *svc_client,
+ axis2_msg_ctx_t *msg_ctx,
+ axis2_options_t *options,
+ const axiom_node_t *payload)
+{
+ const axis2_char_t *soap_version_uri;
+ int soap_version;
+ axiom_soap_envelope_t *envelope = NULL;
+
+ soap_version_uri = AXIS2_OPTIONS_GET_SOAP_VERSION_URI(options, env);
+
+ if (!soap_version_uri)
+ {
+ return AXIS2_FALSE;
+ }
+
+ if (AXIS2_STRCMP(soap_version_uri,
+ AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI) == 0)
+ soap_version = AXIOM_SOAP11;
+ else
+ soap_version = AXIOM_SOAP12;
+
+
+ envelope = axiom_soap_envelope_create_default_soap_envelope(env,
+ soap_version);
+ if (!envelope)
+ {
+ return AXIS2_FALSE;
+ }
+
+ if (payload)
+ {
+ axiom_soap_body_t *soap_body = NULL;
+ soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(envelope, env);
+ if (soap_body)
+ {
+ axiom_node_t *node = NULL;
+ node = AXIOM_SOAP_BODY_GET_BASE_NODE(soap_body, env);
+ if (node)
+ {
+ AXIOM_NODE_ADD_CHILD(node, env, (axiom_node_t *)payload);
+ }
+ }
+ }
+
+ AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, envelope);
+
+ return AXIS2_TRUE;
+}
+
Modified: webservices/sandesha/trunk/c/samples/client/rm_echo_blocking/rm_echo_blocking.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/client/rm_echo_blocking/rm_echo_blocking.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/samples/client/rm_echo_blocking/rm_echo_blocking.c (original)
+++ webservices/sandesha/trunk/c/samples/client/rm_echo_blocking/rm_echo_blocking.c Mon Oct 30 23:55:32 2006
@@ -19,7 +19,7 @@
#include <axiom_soap.h>
#include <axis2_client.h>
-#define MAX_COUNT 10
+#define MAX_COUNT 100000000000000000
/* to check whether the callback is completed */
int is_complete = 0;
@@ -34,7 +34,7 @@
const axis2_char_t *client_home = NULL;
axis2_svc_client_t* svc_client = NULL;
axiom_node_t *payload = NULL;
- axiom_node_t *payload2 = NULL;
+ axiom_node_t *ret_node = NULL;
int count = 0;
axis2_property_t *property = NULL;
/*axis2_qname_t *op_qname = NULL;*/
@@ -93,7 +93,7 @@
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
- return -1;
+ return AXIS2_FAILURE;
}
/* Set service client options */
@@ -103,18 +103,63 @@
AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, "sandesha2");
/* Build the SOAP request message payload using OM API.*/
- /*payload = build_om_payload_for_echo_svc(env, "echo1");
- AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
- AXIS2_SLEEP(2);*/
+ payload = build_om_payload_for_echo_svc(env, "echo1");
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
+ if(ret_node)
+ {
+ axis2_char_t *om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+ if (om_str)
+ printf("\nReceived OM : %s\n", om_str);
+ }else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:%d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ printf("echo stub invoke FAILED!\n");
+ }
+ payload = NULL;
- /* Build the SOAP request message payload using OM API.*/
- payload2 = build_om_payload_for_echo_svc(env, "echo2");
+ payload = build_om_payload_for_echo_svc(env, "echo2");
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
+ if(ret_node)
+ {
+ axis2_char_t *om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+ if (om_str)
+ printf("\nReceived OM : %s\n", om_str);
+ }else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:%d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ printf("echo stub invoke FAILED!\n");
+ }
+ payload = NULL;
+ /* Build the SOAP request message payload using OM API.*/
+ payload = build_om_payload_for_echo_svc(env, "echo3");
AXIS2_OPTIONS_SET_PROPERTY(options, env, "Sandesha2LastMessage",
property);
/* Send request */
- AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload2);
- AXIS2_SLEEP(MAX_COUNT);
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
+ if(ret_node)
+ {
+ axis2_char_t *om_str = NULL;
+ om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+ if (om_str)
+ printf("\nReceived OM : %s\n", om_str);
+ }else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:%d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ printf("echo stub invoke FAILED!\n");
+ }
+ AXIS2_SLEEP(10);
if (svc_client)
{
Modified: webservices/sandesha/trunk/c/samples/client/rm_ping/rm_ping_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/client/rm_ping/rm_ping_client.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/samples/client/rm_ping/rm_ping_client.c (original)
+++ webservices/sandesha/trunk/c/samples/client/rm_ping/rm_ping_client.c Mon Oct 30 23:55:32 2006
@@ -21,8 +21,6 @@
#include <axis2_client.h>
#define MAX_COUNT 10
-/* to check whether the callback is completed */
-int is_complete = 0;
axiom_node_t *
build_om_programatically(
@@ -111,13 +109,20 @@
status = AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload);
if(status)
printf("\nping client invoke SUCCESSFUL!\n");
+ payload = NULL;
+
+ payload = build_om_programatically(env, "ping2");
+ status = AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload);
+ if(status)
+ printf("\nping client invoke SUCCESSFUL!\n");
+ payload = NULL;
property = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_VALUE_TRUE);
AXIS2_OPTIONS_SET_PROPERTY(options, env, "Sandesha2LastMessage",
property);
- payload = build_om_programatically(env, "ping2");
+ payload = build_om_programatically(env, "ping3");
status = AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload);
if(status)
printf("\nping client invoke SUCCESSFUL!\n");
@@ -154,3 +159,4 @@
return ping_om_node;
}
+
Modified: webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c (original)
+++ webservices/sandesha/trunk/c/src/core/sandesha2_msg_ctx.c Mon Oct 30 23:55:32 2006
@@ -42,198 +42,198 @@
((sandesha2_msg_ctx_impl_t *)(rm_msg_ctx))
/***************************** Function headers *******************************/
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_ctx(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_msg_ctx_t *msg_ctx);
-axis2_msg_ctx_t *AXIS2_CALL
+static axis2_msg_ctx_t *AXIS2_CALL
sandesha2_msg_ctx_get_msg_ctx(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_add_soap_envelope(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-int AXIS2_CALL
+static int AXIS2_CALL
sandesha2_msg_ctx_get_msg_type (
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_type (
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
int msg_type);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_part (
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
int part_id,
sandesha2_iom_rm_part_t *part);
-sandesha2_iom_rm_part_t *AXIS2_CALL
+static sandesha2_iom_rm_part_t *AXIS2_CALL
sandesha2_msg_ctx_get_msg_part(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
int part_id);
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_from(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_from(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_endpoint_ref_t *from);
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_to (
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_to(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_endpoint_ref_t *to);
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_reply_to(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_reply_to(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_endpoint_ref_t *reply_to);
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_fault_to(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_fault_to(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_endpoint_ref_t *fault_to);
-axis2_relates_to_t *AXIS2_CALL
+static axis2_relates_to_t *AXIS2_CALL
sandesha2_msg_ctx_get_relates_to(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_relates_to(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_relates_to_t *relates_to);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_msg_id(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_id(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_char_t *msg_id);
-axiom_soap_envelope_t *AXIS2_CALL
+static axiom_soap_envelope_t *AXIS2_CALL
sandesha2_msg_ctx_get_soap_envelope(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_soap_envelope(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axiom_soap_envelope_t *soap_envelope);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_wsa_action(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_wsa_action(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_char_t *action);
-void *AXIS2_CALL
+static void *AXIS2_CALL
sandesha2_msg_ctx_get_property(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_char_t *key);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_property(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_char_t *key,
void *val);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_soap_action(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_char_t *soap_action);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_paused(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_bool_t paused);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_rm_ns_val(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_rm_ns_val(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_char_t *ns_val);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_addr_ns_val(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_addr_ns_val(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axis2_char_t *ns_val);
-int AXIS2_CALL
+static int AXIS2_CALL
sandesha2_msg_ctx_get_flow(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_flow(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
int flow);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_rm_spec_ver(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_free(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env);
@@ -330,7 +330,7 @@
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_free(sandesha2_msg_ctx_t *rm_msg_ctx, const axis2_env_t *env)
{
sandesha2_msg_ctx_impl_t *msg_ctx_impl = NULL;
@@ -366,7 +366,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_ctx(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
{
@@ -379,7 +379,7 @@
return AXIS2_SUCCESS;
}
-axis2_msg_ctx_t *AXIS2_CALL
+static axis2_msg_ctx_t *AXIS2_CALL
sandesha2_msg_ctx_get_msg_ctx(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -387,7 +387,7 @@
return SANDESHA2_INTF_TO_IMPL(rm_msg_ctx)->msg_ctx;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_add_soap_envelope(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
@@ -424,7 +424,7 @@
return AXIS2_SUCCESS;
}
-int AXIS2_CALL
+static int AXIS2_CALL
sandesha2_msg_ctx_get_msg_type (sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -432,7 +432,7 @@
return SANDESHA2_INTF_TO_IMPL(rm_msg_ctx)->msg_type;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_type (sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, int msg_type)
{
@@ -444,7 +444,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_part (sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, int part_id,
sandesha2_iom_rm_part_t *part)
@@ -462,7 +462,7 @@
return AXIS2_SUCCESS;
}
-sandesha2_iom_rm_part_t *AXIS2_CALL
+static sandesha2_iom_rm_part_t *AXIS2_CALL
sandesha2_msg_ctx_get_msg_part(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
@@ -478,7 +478,7 @@
AXIS2_HASH_KEY_STRING);
}
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_from(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -489,7 +489,7 @@
return AXIS2_MSG_CTX_GET_FROM(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_from(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_endpoint_ref_t *from)
{
@@ -501,7 +501,7 @@
return AXIS2_MSG_CTX_SET_TO(msg_ctx_impl->msg_ctx, env, from);;
}
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_to (sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -512,7 +512,7 @@
return AXIS2_MSG_CTX_GET_TO(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_to(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_endpoint_ref_t *to)
{
@@ -524,7 +524,7 @@
return AXIS2_MSG_CTX_SET_TO(msg_ctx_impl->msg_ctx, env, to);
}
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_reply_to(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -535,7 +535,7 @@
return AXIS2_MSG_CTX_GET_REPLY_TO(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_reply_to(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_endpoint_ref_t *reply_to)
{
@@ -547,7 +547,7 @@
return AXIS2_MSG_CTX_SET_REPLY_TO(msg_ctx_impl->msg_ctx, env, reply_to);
}
-axis2_endpoint_ref_t *AXIS2_CALL
+static axis2_endpoint_ref_t *AXIS2_CALL
sandesha2_msg_ctx_get_fault_to(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -558,7 +558,7 @@
return AXIS2_MSG_CTX_GET_FAULT_TO(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_fault_to(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_endpoint_ref_t *fault_to)
{
@@ -570,7 +570,7 @@
return AXIS2_MSG_CTX_SET_FAULT_TO(msg_ctx_impl->msg_ctx, env, fault_to);
}
-axis2_relates_to_t *AXIS2_CALL
+static axis2_relates_to_t *AXIS2_CALL
sandesha2_msg_ctx_get_relates_to(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -581,7 +581,7 @@
return AXIS2_MSG_CTX_GET_RELATES_TO(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_relates_to(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_relates_to_t *relates_to)
{
@@ -593,7 +593,7 @@
return AXIS2_MSG_CTX_SET_RELATES_TO(msg_ctx_impl->msg_ctx, env, relates_to);
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_msg_id(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
@@ -606,7 +606,7 @@
msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_msg_id(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
@@ -620,7 +620,7 @@
return AXIS2_MSG_CTX_SET_MESSAGE_ID(msg_ctx_impl->msg_ctx, env, msg_id);
}
-axiom_soap_envelope_t *AXIS2_CALL
+static axiom_soap_envelope_t *AXIS2_CALL
sandesha2_msg_ctx_get_soap_envelope(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -631,7 +631,7 @@
return AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_soap_envelope(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
axiom_soap_envelope_t *soap_envelope)
@@ -645,7 +645,7 @@
soap_envelope);
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_wsa_action(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -657,7 +657,7 @@
return (axis2_char_t*)AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_wsa_action(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_char_t *action)
{
@@ -670,7 +670,7 @@
return AXIS2_MSG_CTX_SET_WSA_ACTION(msg_ctx_impl->msg_ctx, env, action);
}
-void *AXIS2_CALL
+static void *AXIS2_CALL
sandesha2_msg_ctx_get_property(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_char_t *key)
{
@@ -683,7 +683,7 @@
AXIS2_FALSE);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_property(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
@@ -699,7 +699,7 @@
AXIS2_FALSE);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_soap_action(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_char_t *soap_action)
{
@@ -715,7 +715,7 @@
soap_action);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_paused(
sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env,
@@ -730,7 +730,7 @@
return AXIS2_MSG_CTX_SET_PAUSED(msg_ctx_impl->msg_ctx, env, paused);
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_rm_ns_val(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -738,9 +738,11 @@
return SANDESHA2_INTF_TO_IMPL(rm_msg_ctx)->rm_ns_val;
}
-axis2_status_t AXIS2_CALL
-sandesha2_msg_ctx_set_rm_ns_val(sandesha2_msg_ctx_t *rm_msg_ctx,
- const axis2_env_t *env, axis2_char_t *ns_val)
+static axis2_status_t AXIS2_CALL
+sandesha2_msg_ctx_set_rm_ns_val(
+ sandesha2_msg_ctx_t *rm_msg_ctx,
+ const axis2_env_t *env,
+ axis2_char_t *ns_val)
{
sandesha2_msg_ctx_impl_t *msg_ctx_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -761,7 +763,7 @@
return AXIS2_SUCCESS;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_addr_ns_val(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -769,7 +771,7 @@
return SANDESHA2_INTF_TO_IMPL(rm_msg_ctx)->addr_ns_val;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_addr_ns_val(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, axis2_char_t *ns_val)
{
@@ -787,7 +789,7 @@
return AXIS2_SUCCESS;
}
-int AXIS2_CALL
+static int AXIS2_CALL
sandesha2_msg_ctx_get_flow(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
@@ -800,7 +802,7 @@
return AXIS2_MSG_CTX_GET_FLOW(msg_ctx_impl->msg_ctx, env);
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_msg_ctx_set_flow(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env, int flow)
{
@@ -814,10 +816,11 @@
return AXIS2_MSG_CTX_SET_FLOW(msg_ctx_impl->msg_ctx, env, flow);
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
sandesha2_msg_ctx_get_rm_spec_ver(sandesha2_msg_ctx_t *rm_msg_ctx,
const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, NULL);
return SANDESHA2_INTF_TO_IMPL(rm_msg_ctx)->spec_ver;
}
+
Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Mon Oct 30 23:55:32 2006
@@ -36,19 +36,19 @@
#include <sandesha2_msg_number.h>
#include <sandesha2_identifier.h>
#include <sandesha2_app_msg_processor.h>
-
-axis2_qname_t *AXIS2_CALL
+/*
+static axis2_qname_t *AXIS2_CALL
sandesha2_global_in_handler_get_qname(
struct axis2_handler *handler,
const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
+*/
+static axis2_status_t AXIS2_CALL
sandesha2_global_in_handler_invoke(
struct axis2_handler *handler,
const axis2_env_t *env,
struct axis2_msg_ctx *msg_ctx);
-axis2_bool_t AXIS2_CALL
+static axis2_bool_t AXIS2_CALL
sandesha2_global_in_handler_drop_if_duplicate(
struct axis2_handler *handler,
const axis2_env_t *env,
@@ -56,7 +56,7 @@
sandesha2_storage_mgr_t *storage_mgr);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_global_in_handler_process_dropped_msg(
struct axis2_handler *handler,
const axis2_env_t *env,
@@ -89,7 +89,7 @@
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_global_in_handler_invoke(
struct axis2_handler *handler,
const axis2_env_t *env,
@@ -119,7 +119,7 @@
"[sandesha2]Starting sandesha2 global in handler ......");
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
- if(conf_ctx == NULL)
+ if(!conf_ctx)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]Configuration"
" Context is NULL");
@@ -130,7 +130,7 @@
conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
soap_envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
- if(NULL == soap_envelope)
+ if(!soap_envelope)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]SOAP envelope "
"is NULL");
@@ -138,7 +138,7 @@
}
property = AXIS2_CTX_GET_PROPERTY(ctx, env, SANDESHA2_REINJECTED_MESSAGE,
AXIS2_FALSE);
- if(NULL != property)
+ if(property)
reinjected_msg = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(property, env);
if(reinjected_msg && 0 == AXIS2_STRCMP(SANDESHA2_VALUE_TRUE, reinjected_msg))
{
@@ -148,7 +148,7 @@
sandesha2 inflow handlers */
}
storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
- if(NULL == storage_mgr)
+ if(!storage_mgr)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot get the "
"storage manager");
@@ -156,7 +156,7 @@
}
property = AXIS2_CTX_GET_PROPERTY(ctx, env,
SANDESHA2_WITHIN_TRANSACTION, AXIS2_FALSE);
- if(NULL != property)
+ if(property)
within_transaction_str = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(
property, env);
if(within_transaction_str && 0 == AXIS2_STRCMP(SANDESHA2_VALUE_TRUE,
@@ -164,7 +164,7 @@
{
within_transaction = AXIS2_TRUE;
}
- if(AXIS2_TRUE != within_transaction)
+ if(!within_transaction)
{
axis2_property_t *prop = NULL;
@@ -177,26 +177,26 @@
}
fault_part = AXIOM_SOAP_BODY_GET_FAULT(AXIOM_SOAP_ENVELOPE_GET_BODY(
soap_envelope, env), env);
- if(NULL != fault_part)
+ if(fault_part)
{
axis2_relates_to_t *relates_to = NULL;
relates_to = AXIS2_MSG_CTX_GET_RELATES_TO(msg_ctx, env);
- if(NULL != relates_to)
+ if(relates_to)
{
- axis2_char_t *relates_to_val = NULL;
+ const axis2_char_t *relates_to_val = NULL;
axis2_op_ctx_t *op_ctx = NULL;
relates_to_val = AXIS2_RELATES_TO_GET_VALUE(relates_to, env);
op_ctx = AXIS2_CONF_CTX_GET_OP_CTX(conf_ctx, env, relates_to_val);
- if(NULL != op_ctx)
+ if(op_ctx)
{
axis2_msg_ctx_t *req_msg_ctx = NULL;
req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env,
AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE);
- if(NULL != req_msg_ctx)
+ if(req_msg_ctx)
{
- if(AXIS2_TRUE == sandesha2_utils_is_retrievable_on_faults(env,
+ if(sandesha2_utils_is_retrievable_on_faults(env,
req_msg_ctx))
{
/* TODO we need to notify the listeners */
@@ -208,7 +208,7 @@
}
}
is_rm_global_msg = sandesha2_utils_is_rm_global_msg(env, msg_ctx);
- if(AXIS2_FALSE == is_rm_global_msg)
+ if(!is_rm_global_msg)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Not a global RM Message");
return AXIS2_SUCCESS;
@@ -216,7 +216,7 @@
rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
dropped = sandesha2_global_in_handler_drop_if_duplicate(handler, env,
rm_msg_ctx, storage_mgr);
- if(AXIS2_TRUE == dropped)
+ if(dropped)
{
sandesha2_global_in_handler_process_dropped_msg(handler, env, rm_msg_ctx,
storage_mgr);
@@ -224,7 +224,7 @@
return AXIS2_SUCCESS;
}
/*Process if global processing possible. - Currently none*/
- if(AXIS2_TRUE != within_transaction)
+ if(!within_transaction)
{
SANDESHA2_TRANSACTION_COMMIT(transaction, env);
property = axis2_property_create(env);
@@ -237,16 +237,16 @@
return AXIS2_SUCCESS;
}
-
-axis2_qname_t *AXIS2_CALL
+/*
+static axis2_qname_t *AXIS2_CALL
sandesha2_global_in_handler_get_qname(
struct axis2_handler *handler,
const axis2_env_t *env)
{
return axis2_qname_create(env, SANDESHA2_GLOBAL_IN_HANDLER_NAME, NULL, NULL);
}
-
-axis2_bool_t AXIS2_CALL
+*/
+static axis2_bool_t AXIS2_CALL
sandesha2_global_in_handler_drop_if_duplicate(
struct axis2_handler *handler,
const axis2_env_t *env,
@@ -268,14 +268,14 @@
sequence = (sandesha2_seq_t*)SANDESHA2_MSG_CTX_GET_MSG_PART(rm_msg_ctx,
env, SANDESHA2_MSG_PART_SEQ);
- if(NULL != sequence)
+ if(sequence)
{
seq_id = SANDESHA2_IDENTIFIER_GET_IDENTIFIER(
SANDESHA2_SEQ_GET_IDENTIFIER(sequence, env), env);
msg_no = SANDESHA2_MSG_NUMBER_GET_MSG_NUM(SANDESHA2_SEQ_GET_MSG_NUM(
sequence, env), env);
}
- if(NULL != seq_id && 0 < msg_no)
+ if(seq_id && 0 < msg_no)
{
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
sandesha2_seq_property_bean_t *rcvd_msgs_bean = NULL;
@@ -285,7 +285,7 @@
rcvd_msgs_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(seq_prop_mgr,
env, seq_id,
SANDESHA2_SEQ_PROP_SERVER_COMPLETED_MESSAGES);
- if(NULL != rcvd_msgs_bean)
+ if(rcvd_msgs_bean)
{
axis2_char_t *rcvd_msgs_str = NULL;
axis2_array_list_t *msg_no_list = NULL;
@@ -306,7 +306,7 @@
drop = AXIS2_TRUE;
}
}
- if(AXIS2_FALSE == drop)
+ if(!drop)
{
axiom_soap_body_t *soap_body = NULL;
axiom_node_t *body_node = NULL;
@@ -322,10 +322,9 @@
body_element = AXIOM_NODE_GET_DATA_ELEMENT(body_node, env);
children_iterator = AXIOM_ELEMENT_GET_CHILDREN(body_element, env,
body_node);
- if(AXIS2_FALSE == AXIOM_CHILDREN_ITERATOR_HAS_NEXT(
- children_iterator, env))
+ if(!AXIOM_CHILDREN_ITERATOR_HAS_NEXT(children_iterator, env))
empty_body = AXIS2_TRUE;
- if(AXIS2_TRUE == empty_body)
+ if(empty_body)
{
axis2_char_t *rcvd_msgs_str1 = NULL;
axis2_char_t *bean_value = NULL;
@@ -335,7 +334,7 @@
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Empty "
"body last msg recieved");
drop = AXIS2_TRUE;
- if(NULL == rcvd_msgs_bean)
+ if(!rcvd_msgs_bean)
{
rcvd_msgs_bean = sandesha2_seq_property_bean_create_with_data
(env, seq_id,
@@ -346,7 +345,7 @@
rcvd_msgs_str1 = SANDESHA2_SEQ_PROPERTY_BEAN_GET_VALUE(
rcvd_msgs_bean, env);
sprintf(msg_no_str, "%ld", msg_no);
- if(NULL!= rcvd_msgs_str1 && 0 < AXIS2_STRLEN(rcvd_msgs_str1))
+ if(rcvd_msgs_str1 && 0 < AXIS2_STRLEN(rcvd_msgs_str1))
bean_value = axis2_strcat(env, rcvd_msgs_str1, ",",
msg_no_str, NULL);
else
@@ -357,9 +356,8 @@
SANDESHA2_SEQ_PROPERTY_MGR_UPDATE(seq_prop_mgr, env,
rcvd_msgs_bean);
app_msg_processor = sandesha2_app_msg_processor_create(env);
- sandesha2_app_msg_processor_send_ack_if_reqd(
- app_msg_processor, env, rm_msg_ctx, bean_value,
- storage_mgr);
+ sandesha2_app_msg_processor_send_ack_if_reqd(env,
+ rm_msg_ctx, bean_value, storage_mgr);
}
}
}
@@ -371,9 +369,9 @@
relates_to = SANDESHA2_MSG_CTX_GET_RELATES_TO(rm_msg_ctx, env);
- if(NULL != relates_to)
+ if(relates_to)
{
- axis2_char_t *relates_to_val = NULL;
+ const axis2_char_t *relates_to_val = NULL;
axis2_op_ctx_t *op_ctx = NULL;
axis2_op_ctx_t *op_ctx1 = NULL;
@@ -383,7 +381,7 @@
op_ctx = AXIS2_CONF_CTX_GET_OP_CTX(conf_ctx, env, relates_to_val);
op_ctx1 = AXIS2_MSG_CTX_GET_OP_CTX(SANDESHA2_MSG_CTX_GET_MSG_CTX(
rm_msg_ctx, env), env);
- if(NULL == op_ctx && NULL == op_ctx1)
+ if(!op_ctx && !op_ctx1)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Dropping"
" duplicate RM message");
@@ -391,7 +389,7 @@
}
}
}
- if(AXIS2_TRUE == drop)
+ if(drop)
{
SANDESHA2_MSG_CTX_SET_PAUSED(rm_msg_ctx, env, AXIS2_TRUE);
return AXIS2_TRUE;
@@ -400,7 +398,7 @@
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_global_in_handler_process_dropped_msg(
struct axis2_handler *handler,
const axis2_env_t *env,
@@ -420,11 +418,11 @@
sequence = (sandesha2_seq_t*)SANDESHA2_MSG_CTX_GET_MSG_PART(rm_msg_ctx,
env, SANDESHA2_MSG_PART_SEQ);
- if(NULL != sequence)
+ if(sequence)
seq_id = SANDESHA2_IDENTIFIER_GET_IDENTIFIER(
SANDESHA2_SEQ_GET_IDENTIFIER(sequence, env), env);
- if(NULL != seq_id)
+ if(seq_id)
{
sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
sandesha2_seq_property_bean_t *rcvd_msgs_bean = NULL;
@@ -439,9 +437,8 @@
rcvd_msgs_str = SANDESHA2_SEQ_PROPERTY_BEAN_GET_VALUE(
rcvd_msgs_bean, env);
app_msg_processor = sandesha2_app_msg_processor_create(env);
- sandesha2_app_msg_processor_send_ack_if_reqd(
- app_msg_processor, env, rm_msg_ctx, rcvd_msgs_str,
- storage_mgr);
+ sandesha2_app_msg_processor_send_ack_if_reqd(env, rm_msg_ctx,
+ rcvd_msgs_str, storage_mgr);
}
}
Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c Mon Oct 30 23:55:32 2006
@@ -28,24 +28,24 @@
#include <sandesha2_seq.h>
#include <sandesha2_constants.h>
#include <sandesha2_utils.h>
-
-axis2_qname_t *AXIS2_CALL
+/*
+static axis2_qname_t *AXIS2_CALL
sandesha2_in_handler_get_qname(
- struct axis2_handler *handler,
- const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
+ struct axis2_handler *handler,
+ const axis2_env_t *env);
+*/
+static axis2_status_t AXIS2_CALL
sandesha2_in_handler_invoke(
- struct axis2_handler *handler,
- const axis2_env_t *env,
- struct axis2_msg_ctx *msg_ctx);
+ struct axis2_handler *handler,
+ const axis2_env_t *env,
+ struct axis2_msg_ctx *msg_ctx);
/******************************************************************************/
AXIS2_EXTERN axis2_handler_t* AXIS2_CALL
sandesha2_in_handler_create(
- const axis2_env_t *env,
- axis2_qname_t *qname)
+ const axis2_env_t *env,
+ axis2_qname_t *qname)
{
axis2_handler_t *handler = NULL;
@@ -67,17 +67,15 @@
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_in_handler_invoke(
struct axis2_handler *handler,
const axis2_env_t *env,
struct axis2_msg_ctx *msg_ctx)
{
axis2_property_t *temp_prop = NULL;
- axis2_property_t *property = NULL;
axis2_conf_ctx_t *conf_ctx = NULL;
axis2_conf_t *conf = NULL;
- axis2_op_ctx_t *op_ctx = NULL;
axis2_ctx_t *ctx = NULL;
axis2_char_t *str_done = NULL;
axis2_char_t *reinjected_msg = NULL;
@@ -89,8 +87,6 @@
sandesha2_transaction_t *transaction = NULL;
sandesha2_msg_ctx_t *rm_msg_ctx = NULL;
sandesha2_msg_processor_t *msg_processor = NULL;
- sandesha2_seq_t *seq_part = NULL;
- axis2_endpoint_ref_t *reply_to_epr = NULL;
AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
@@ -99,11 +95,12 @@
printf("Starting Sandesha2 in handler\n");
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
- if(conf_ctx == NULL)
+ if(!conf_ctx)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"[sandesha2] Configuration Context is NULL");
- AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONF_CTX_NULL, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONF_CTX_NULL,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
ctx = AXIS2_MSG_CTX_GET_BASE(msg_ctx, env);
@@ -115,21 +112,22 @@
return AXIS2_SUCCESS;
temp_prop = AXIS2_CTX_GET_PROPERTY(ctx, env, SANDESHA2_REINJECTED_MESSAGE,
AXIS2_FALSE);
- if(NULL != temp_prop)
+ if(temp_prop)
reinjected_msg = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(temp_prop,
- env);
+ env);
if(reinjected_msg && 0 == AXIS2_STRCMP(SANDESHA2_VALUE_TRUE, reinjected_msg))
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "[sandesha2] Exit: sandesha2_in_handler::invoke, reinjected_msg");
+ "[sandesha2] Exit: sandesha2_in_handler::invoke, reinjected_msg");
return AXIS2_SUCCESS; /* Reinjected Messages are not processed by
sandesha2 inflow handlers */
}
conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
+ temp_prop = NULL;
temp_prop = AXIS2_CTX_GET_PROPERTY(ctx, env,
SANDESHA2_WITHIN_TRANSACTION, AXIS2_FALSE);
- if(NULL != temp_prop)
+ if(temp_prop)
within_transaction_str = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(
temp_prop, env);
if(within_transaction_str && 0 == AXIS2_STRCMP(SANDESHA2_VALUE_TRUE,
@@ -137,51 +135,55 @@
{
within_transaction = AXIS2_TRUE;
}
- if(AXIS2_TRUE != within_transaction)
+ if(!within_transaction)
{
axis2_property_t *prop = NULL;
transaction = SANDESHA2_STORAGE_MGR_GET_TRANSACTION(storage_mgr, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
- AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(SANDESHA2_VALUE_TRUE, env));
+ AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(SANDESHA2_VALUE_TRUE,
+ env));
AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop,
AXIS2_FALSE);
}
svc = AXIS2_MSG_CTX_GET_SVC(msg_ctx, env);
- if(svc == NULL)
+ if(!svc)
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Axis2 Service is NULL");
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Axis2 Service is NULL");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SVC_NULL, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
- if(AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(env->error))
+ if(!AXIS2_ERROR_GET_STATUS_CODE(env->error))
{
/* Message should not be sent in an exception situation */
AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
- if(AXIS2_TRUE != within_transaction)
+ if(!within_transaction)
{
axis2_property_t *prop = NULL;
SANDESHA2_TRANSACTION_ROLLBACK(transaction, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
- AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(SANDESHA2_VALUE_FALSE, env));
+ AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(
+ SANDESHA2_VALUE_FALSE, env));
AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION,
prop, AXIS2_FALSE);
rolled_back = AXIS2_TRUE;
}
- if(AXIS2_TRUE != within_transaction && AXIS2_TRUE != rolled_back)
+ if(!within_transaction && !rolled_back)
{
axis2_property_t *prop = NULL;
SANDESHA2_TRANSACTION_COMMIT(transaction, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
- AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(SANDESHA2_VALUE_FALSE, env));
+ AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(
+ SANDESHA2_VALUE_FALSE, env));
AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION,
prop, AXIS2_FALSE);
}
@@ -195,42 +197,46 @@
* TODO Validate the message
* SANDESHA2_MSG_VALIDATOR_VALIDATE(env, rm_msg_ctx, storage_mgr);
*/
- msg_processor = sandesha2_msg_processor_create_msg_processor(env, rm_msg_ctx);
+ msg_processor = sandesha2_msg_processor_create_msg_processor(env,
+ rm_msg_ctx);
if(msg_processor)
SANDESHA2_MSG_PROCESSOR_PROCESS_IN_MSG(msg_processor, env, rm_msg_ctx);
- if(AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(env->error))
+ if(!AXIS2_ERROR_GET_STATUS_CODE(env->error))
{
/* Message should not be sent in an exception situation */
AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
- if(AXIS2_TRUE != within_transaction)
+ if(!within_transaction)
{
axis2_property_t *prop = NULL;
SANDESHA2_TRANSACTION_ROLLBACK(transaction, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
- AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(SANDESHA2_VALUE_FALSE, env));
+ AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(
+ SANDESHA2_VALUE_FALSE, env));
AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION,
prop, AXIS2_FALSE);
rolled_back = AXIS2_TRUE;
}
- if(AXIS2_TRUE != within_transaction && AXIS2_TRUE != rolled_back)
+ if(!within_transaction && !rolled_back)
{
axis2_property_t *prop = NULL;
SANDESHA2_TRANSACTION_COMMIT(transaction, env);
prop = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
- AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(SANDESHA2_VALUE_FALSE, env));
+ AXIS2_PROPERTY_SET_VALUE(prop, env, AXIS2_STRDUP(
+ SANDESHA2_VALUE_FALSE, env));
AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION,
prop, AXIS2_FALSE);
}
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Error in processing the message");
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Error in processing the message");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_PROCESS_MSG,
AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- if(AXIS2_TRUE != within_transaction && AXIS2_TRUE != rolled_back)
+ if(!within_transaction && !rolled_back)
{
axis2_property_t *prop = NULL;
@@ -245,13 +251,14 @@
return AXIS2_SUCCESS;
}
-
-axis2_qname_t *AXIS2_CALL
+/*
+static axis2_qname_t *AXIS2_CALL
sandesha2_in_handler_get_qname(
- struct axis2_handler *handler,
- const axis2_env_t *env)
+ struct axis2_handler *handler,
+ const axis2_env_t *env)
{
return (axis2_qname_t *) axis2_qname_create(env, SANDESHA2_IN_HANDLER_NAME,
NULL, NULL);
}
+*/
Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Mon Oct 30 23:55:32 2006
@@ -58,39 +58,39 @@
((sandesha2_ack_msg_processor_impl_t *)(msg_proc))
/***************************** Function headers *******************************/
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_msg_processor_process_in_msg (
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *rm_msg_ctx);
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *rm_msg_ctx);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_msg_processor_process_out_msg(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *rm_msg_ctx);
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *rm_msg_ctx);
-sandesha2_sender_bean_t* AXIS2_CALL
+static sandesha2_sender_bean_t* AXIS2_CALL
sandesha2_ack_msg_processor_get_retrans_entry(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- axis2_array_list_t *list,
- long msg_no);
+ const axis2_env_t *env,
+ axis2_array_list_t *list,
+ long msg_no);
-long AXIS2_CALL
+static long AXIS2_CALL
sandesha2_ack_msg_processor_get_no_of_msgs_acked(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- axis2_array_list_t *list);
+ const axis2_env_t *env,
+ axis2_array_list_t *list);
-axis2_status_t AXIS2_CALL
-sandesha2_ack_msg_processor_free (sandesha2_msg_processor_t *element,
- const axis2_env_t *env);
+static axis2_status_t AXIS2_CALL
+sandesha2_ack_msg_processor_free (
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env);
/***************************** End of function headers ************************/
AXIS2_EXTERN sandesha2_msg_processor_t* AXIS2_CALL
-sandesha2_ack_msg_processor_create(const axis2_env_t *env)
+sandesha2_ack_msg_processor_create(
+ const axis2_env_t *env)
{
sandesha2_ack_msg_processor_impl_t *msg_proc_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
@@ -125,9 +125,10 @@
}
-axis2_status_t AXIS2_CALL
-sandesha2_ack_msg_processor_free (sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env)
+static axis2_status_t AXIS2_CALL
+sandesha2_ack_msg_processor_free (
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env)
{
sandesha2_ack_msg_processor_impl_t *msg_proc_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -141,7 +142,7 @@
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_msg_processor_process_in_msg (
sandesha2_msg_processor_t *msg_processor,
const axis2_env_t *env,
@@ -175,10 +176,13 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
- printf("In ack_msg_processor\n");
+ AXIS2_LOG_INFO(env->log,
+ "[sandesha2] sandesha2_ack_msg_processor_process_in_msg .........");
+ printf("sandesha2_ack_msg_processor_process_in_msg\n");
+
seq_ack = (sandesha2_seq_ack_t*)SANDESHA2_MSG_CTX_GET_MSG_PART(rm_msg_ctx,
env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
- if(NULL == seq_ack)
+ if(!seq_ack)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence"
" acknowledgement part is null");
@@ -201,7 +205,7 @@
nack_list = SANDESHA2_SEQ_ACK_GET_NACK_LIST(seq_ack, env);
out_seq_id = SANDESHA2_IDENTIFIER_GET_IDENTIFIER(
SANDESHA2_SEQ_ACK_GET_IDENTIFIER(seq_ack, env), env);
- if(NULL == out_seq_id || 0 == AXIS2_STRLEN(out_seq_id))
+ if(!out_seq_id || 0 == AXIS2_STRLEN(out_seq_id))
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] OutSequenceId is"
" null");
@@ -211,7 +215,7 @@
fault_mgr = sandesha2_fault_mgr_create(env);
fault_msg_ctx = SANDESHA2_FAULT_MGR_CHECK_FOR_UNKNOWN_SEQ(fault_mgr, env,
rm_msg_ctx, out_seq_id, storage_mgr);
- if(NULL != fault_msg_ctx)
+ if(fault_msg_ctx)
{
axis2_engine_t *engine = NULL;
engine = axis2_engine_create(env, conf_ctx);
@@ -221,7 +225,7 @@
}
fault_msg_ctx = SANDESHA2_FAULT_MGR_CHECK_FOR_INVALID_ACK(fault_mgr, env,
rm_msg_ctx, storage_mgr);
- if(NULL != fault_msg_ctx)
+ if(fault_msg_ctx)
{
axis2_engine_t *engine = NULL;
engine = axis2_engine_create(env, conf_ctx);
@@ -235,7 +239,7 @@
storage_mgr);
int_seq_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(seq_prop_mgr, env,
out_seq_id, SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID);
- if(NULL == int_seq_bean || NULL == SANDESHA2_SEQ_PROPERTY_BEAN_GET_VALUE(
+ if(!int_seq_bean || NULL == SANDESHA2_SEQ_PROPERTY_BEAN_GET_VALUE(
int_seq_bean, env))
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] TempSequenceId "
@@ -278,8 +282,8 @@
long *add_no = NULL;
retrans_bean = sandesha2_ack_msg_processor_get_retrans_entry(
- msg_processor, env, retrans_list, j);
- if(NULL != retrans_bean)
+ env, retrans_list, j);
+ if(retrans_bean)
{
SANDESHA2_SENDER_MGR_REMOVE(retrans_mgr, env,
SANDESHA2_SENDER_BEAN_GET_MSG_ID(retrans_bean, env));
@@ -299,12 +303,12 @@
/* TODO processing nacks */
}
no_of_msgs_acked = sandesha2_ack_msg_processor_get_no_of_msgs_acked(
- msg_processor, env, ack_range_list);
+ env, ack_range_list);
no_of_msgs_acked_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(seq_prop_mgr,
env, out_seq_id,
SANDESHA2_SEQ_PROP_NO_OF_OUTGOING_MSGS_ACKED);
sprintf(str_long, "%ld", no_of_msgs_acked);
- if(NULL == no_of_msgs_acked_bean)
+ if(!no_of_msgs_acked_bean)
{
no_of_msgs_acked_bean = sandesha2_seq_property_bean_create(env);
SANDESHA2_SEQ_PROPERTY_BEAN_SET_NAME(no_of_msgs_acked_bean, env,
@@ -326,7 +330,7 @@
completed_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(seq_prop_mgr,
env, int_seq_id,
SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES);
- if(NULL == completed_bean)
+ if(!completed_bean)
{
completed_bean = sandesha2_seq_property_bean_create(env);
SANDESHA2_SEQ_PROPERTY_BEAN_SET_SEQ_ID(completed_bean, env, int_seq_id);
@@ -341,7 +345,7 @@
last_out_msg_no_str = sandesha2_utils_get_seq_property(env, int_seq_id,
SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO, storage_mgr);
- if(NULL != last_out_msg_no_str)
+ if(last_out_msg_no_str)
{
long highest_out_msg_no = 0;
highest_out_msg_no = atol(last_out_msg_no_str);
@@ -356,14 +360,16 @@
}
}
SANDESHA2_MSG_CTX_SET_PAUSED(rm_msg_ctx, env, AXIS2_TRUE);
+ AXIS2_LOG_INFO(env->log,
+ "[sandesha2] Exit: sandesha2_ack_msg_processor_process_in_msg");
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_msg_processor_process_out_msg(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *rm_msg_ctx)
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *rm_msg_ctx)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -373,12 +379,11 @@
}
-sandesha2_sender_bean_t* AXIS2_CALL
+static sandesha2_sender_bean_t* AXIS2_CALL
sandesha2_ack_msg_processor_get_retrans_entry(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- axis2_array_list_t *list,
- long msg_no)
+ const axis2_env_t *env,
+ axis2_array_list_t *list,
+ long msg_no)
{
int i = 0;
@@ -395,11 +400,10 @@
return NULL;
}
-long AXIS2_CALL
+static long AXIS2_CALL
sandesha2_ack_msg_processor_get_no_of_msgs_acked(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- axis2_array_list_t *list)
+ const axis2_env_t *env,
+ axis2_array_list_t *list)
{
long no_of_msgs = 0;
int i = 0;
@@ -424,3 +428,4 @@
}
return no_of_msgs;
}
+
Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c?view=diff&rev=469402&r1=469401&r2=469402
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Mon Oct 30 23:55:32 2006
@@ -59,21 +59,22 @@
((sandesha2_ack_req_msg_processor_impl_t *)(msg_proc))
/***************************** Function headers *******************************/
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_req_msg_processor_process_in_msg (
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *rm_msg_ctx);
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *rm_msg_ctx);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_req_msg_processor_process_out_msg(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *rm_msg_ctx);
-
-axis2_status_t AXIS2_CALL
-sandesha2_ack_req_msg_processor_free (sandesha2_msg_processor_t *element,
- const axis2_env_t *env);
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *rm_msg_ctx);
+
+static axis2_status_t AXIS2_CALL
+sandesha2_ack_req_msg_processor_free (
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env);
/***************************** End of function headers ************************/
@@ -114,9 +115,10 @@
}
-axis2_status_t AXIS2_CALL
-sandesha2_ack_req_msg_processor_free (sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env)
+static axis2_status_t AXIS2_CALL
+sandesha2_ack_req_msg_processor_free (
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env)
{
sandesha2_ack_req_msg_processor_impl_t *msg_proc_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -130,11 +132,11 @@
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_req_msg_processor_process_in_msg (
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *rm_msg_ctx)
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *rm_msg_ctx)
{
sandesha2_ack_requested_t *ack_requested = NULL;
axis2_msg_ctx_t *msg_ctx = NULL;
@@ -394,11 +396,11 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
sandesha2_ack_req_msg_processor_process_out_msg(
- sandesha2_msg_processor_t *msg_processor,
- const axis2_env_t *env,
- sandesha2_msg_ctx_t *rm_msg_ctx)
+ sandesha2_msg_processor_t *msg_processor,
+ const axis2_env_t *env,
+ sandesha2_msg_ctx_t *rm_msg_ctx)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -406,3 +408,4 @@
return AXIS2_SUCCESS;
}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org