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/12/07 05:26:55 UTC
svn commit: r483342 [1/5] - in /webservices/sandesha/trunk/c: ./ config/
include/ samples/ samples/RMSampleService/ samples/rm_echo/
samples/rm_ping/ src/ src/client/ src/core/ src/handlers/
src/msgprocessors/ src/polling/ src/util/ src/workers/ src/wsrm/
Author: damitha
Date: Wed Dec 6 20:26:47 2006
New Revision: 483342
URL: http://svn.apache.org/viewvc?view=rev&rev=483342
Log:
More work on abstracting storage.
Modified:
webservices/sandesha/trunk/c/Makefile.am
webservices/sandesha/trunk/c/config/module.xml
webservices/sandesha/trunk/c/include/sandesha2_ack_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_create_seq_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_invoker_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_transaction.h
webservices/sandesha/trunk/c/samples/Makefile.am
webservices/sandesha/trunk/c/samples/RMSampleService/rm_sample_svc.c
webservices/sandesha/trunk/c/samples/configure.ac
webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am
webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am
webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c
webservices/sandesha/trunk/c/src/Makefile.am
webservices/sandesha/trunk/c/src/client/Makefile.am
webservices/sandesha/trunk/c/src/client/client.c
webservices/sandesha/trunk/c/src/client/sequence_report.c
webservices/sandesha/trunk/c/src/core/Makefile.am
webservices/sandesha/trunk/c/src/core/mod_sandesha2.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/handlers/sandesha2_out_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/make_connection_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
webservices/sandesha/trunk/c/src/polling/polling_mgr.c
webservices/sandesha/trunk/c/src/util/ack_mgr.c
webservices/sandesha/trunk/c/src/util/fault_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/msg_retrans_adjuster.c
webservices/sandesha/trunk/c/src/util/property_mgr.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
webservices/sandesha/trunk/c/src/util/seq_mgr.c
webservices/sandesha/trunk/c/src/util/spec_specific_consts.c
webservices/sandesha/trunk/c/src/util/terminate_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/workers/sender_worker.c
webservices/sandesha/trunk/c/src/wsrm/accept.c
webservices/sandesha/trunk/c/src/wsrm/ack_requested.c
webservices/sandesha/trunk/c/src/wsrm/close_seq.c
webservices/sandesha/trunk/c/src/wsrm/close_seq_res.c
webservices/sandesha/trunk/c/src/wsrm/create_seq.c
webservices/sandesha/trunk/c/src/wsrm/create_seq_res.c
webservices/sandesha/trunk/c/src/wsrm/identifier.c
webservices/sandesha/trunk/c/src/wsrm/make_connection.c
webservices/sandesha/trunk/c/src/wsrm/msg_pending.c
webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
webservices/sandesha/trunk/c/src/wsrm/seq_ack.c
webservices/sandesha/trunk/c/src/wsrm/sequence.c
webservices/sandesha/trunk/c/src/wsrm/terminate_seq.c
webservices/sandesha/trunk/c/src/wsrm/terminate_seq_res.c
Modified: webservices/sandesha/trunk/c/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/Makefile.am?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/Makefile.am (original)
+++ webservices/sandesha/trunk/c/Makefile.am Wed Dec 6 20:26:47 2006
@@ -2,5 +2,8 @@
SUBDIRS = src
data_DATA = LICENSE config/module.xml \
src/client/sandesha2_client_constants.h \
- include/sandesha2_constants.h
+ include/sandesha2_constants.h \
+ include/sandesha2_client.h \
+ include/sandesha2_seq_report.h \
+ include/sandesha2_report.h
Modified: webservices/sandesha/trunk/c/config/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (original)
+++ webservices/sandesha/trunk/c/config/module.xml Wed Dec 6 20:26:47 2006
@@ -38,10 +38,7 @@
<operation name="RMInOnlyOperation" mep="http://www.w3.org/2004/08/wsdl/in-only">
<messageReceiver class="axis2_receivers"/>
- <parameter name="wsamapping" >http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</parameter>
-
<!-- namespaces for the 2005-02 spec -->
-
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence</actionMapping>
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement</actionMapping>
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse</actionMapping>
@@ -49,7 +46,6 @@
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/LastMessage</actionMapping>
<!-- namespaces for the 2006-08 spec -->
-
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/SequenceAcknowledgement</actionMapping>
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/CreateSequenceResponse</actionMapping>
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/AckRequested</actionMapping>
@@ -57,7 +53,6 @@
<operation name="RMInOutOperation" mep="http://www.w3.org/2004/08/wsdl/in-out">
<messageReceiver class="axis2_receivers"/>
- <parameter name="wsamapping" >http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</parameter>
<!-- namespaces for the 2005-02 spec -->
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</actionMapping>
Modified: webservices/sandesha/trunk/c/include/sandesha2_ack_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_ack_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_ack_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_ack_mgr.h Wed Dec 6 20:26:47 2006
@@ -31,6 +31,7 @@
{
#endif
+struct sandesha2_seq_property_mgr;
/** @defgroup sandesha2_ack_mgr
* @ingroup sandesha2_util
* @{
@@ -54,13 +55,13 @@
sandesha2_ack_mgr_get_client_completed_msgs_list(
const axis2_env_t *env,
axis2_char_t *seq_id,
- sandesha2_seq_property_mgr_t *seq_prop_mgr);
+ struct sandesha2_seq_property_mgr *seq_prop_mgr);
AXIS2_EXTERN axis2_array_list_t *AXIS2_CALL
sandesha2_ack_mgr_get_svr_completed_msgs_list(
const axis2_env_t *env,
axis2_char_t *seq_id,
- sandesha2_seq_property_mgr_t *seq_prop_mgr);
+ struct sandesha2_seq_property_mgr *seq_prop_mgr);
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
sandesha2_ack_mgr_verify_seq_completion(
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=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h Wed Dec 6 20:26:47 2006
@@ -44,59 +44,57 @@
* @{
*/
-struct sandesha2_create_seq_mgr_ops
+AXIS2_DECLARE_DATA struct sandesha2_create_seq_mgr_ops
{
/**
* Deallocate memory
* @return status code
*/
axis2_status_t (AXIS2_CALL *
- free) (
- void *seq_mgr,
- const axis2_env_t *env);
+ free) (
+ sandesha2_create_seq_mgr_t *seq_mgr,
+ const axis2_env_t *env);
axis2_bool_t (AXIS2_CALL *
- insert) (
- sandesha2_create_seq_mgr_t *seq_mgr,
- const axis2_env_t *env,
- sandesha2_create_seq_bean_t *bean);
+ insert) (
+ sandesha2_create_seq_mgr_t *seq_mgr,
+ const axis2_env_t *env,
+ sandesha2_create_seq_bean_t *bean);
axis2_bool_t (AXIS2_CALL *
- remove) (
- sandesha2_create_seq_mgr_t *seq_mgr,
- const axis2_env_t *env,
- axis2_char_t *msg_id);
+ remove) (
+ sandesha2_create_seq_mgr_t *seq_mgr,
+ const axis2_env_t *env,
+ axis2_char_t *msg_id);
sandesha2_create_seq_bean_t *(AXIS2_CALL *
- retrieve) (
- sandesha2_create_seq_mgr_t *seq_mgr,
- const axis2_env_t *env,
- const axis2_char_t *msg_id);
+ retrieve) (
+ sandesha2_create_seq_mgr_t *seq_mgr,
+ const axis2_env_t *env,
+ const axis2_char_t *msg_id);
axis2_bool_t (AXIS2_CALL *
- update) (
- sandesha2_create_seq_mgr_t *seq_mgr,
- const axis2_env_t *env,
- sandesha2_create_seq_bean_t *bean);
+ update) (
+ sandesha2_create_seq_mgr_t *seq_mgr,
+ const axis2_env_t *env,
+ sandesha2_create_seq_bean_t *bean);
axis2_array_list_t *(AXIS2_CALL *
- find) (
- sandesha2_create_seq_mgr_t *seq_mgr,
- const axis2_env_t *env,
- sandesha2_create_seq_bean_t *bean);
+ find) (
+ sandesha2_create_seq_mgr_t *seq_mgr,
+ const axis2_env_t *env,
+ sandesha2_create_seq_bean_t *bean);
sandesha2_create_seq_bean_t *(AXIS2_CALL *
- find_unique) (
- sandesha2_create_seq_mgr_t *seq_mgr,
- const axis2_env_t *env,
- sandesha2_create_seq_bean_t *bean);
-
-
+ find_unique) (
+ sandesha2_create_seq_mgr_t *seq_mgr,
+ const axis2_env_t *env,
+ sandesha2_create_seq_bean_t *bean);
};
-struct sandesha2_create_seq_mgr
+AXIS2_DECLARE_DATA struct sandesha2_create_seq_mgr
{
- sandesha2_create_seq_mgr_ops_t *ops;
+ const sandesha2_create_seq_mgr_ops_t *ops;
};
AXIS2_EXTERN sandesha2_create_seq_mgr_t * AXIS2_CALL
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_create_seq_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_create_seq_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_create_seq_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_create_seq_mgr.h Wed Dec 6 20:26:47 2006
@@ -40,7 +40,7 @@
* @{
*/
-AXIS2_EXTERN sandesha2_create_seq_mgr_t * AXIS2_CALL
+AXIS2_EXTERN struct sandesha2_create_seq_mgr * AXIS2_CALL
sandesha2_inmemory_create_seq_mgr_create(
const axis2_env_t *env,
struct axis2_ctx *ctx);
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_invoker_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_invoker_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_invoker_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_invoker_mgr.h Wed Dec 6 20:26:47 2006
@@ -40,7 +40,7 @@
* @{
*/
-AXIS2_EXTERN sandesha2_invoker_mgr_t * AXIS2_CALL
+AXIS2_EXTERN struct sandesha2_invoker_mgr * AXIS2_CALL
sandesha2_inmemory_invoker_mgr_create(
const axis2_env_t *env,
struct axis2_ctx *ctx);
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h Wed Dec 6 20:26:47 2006
@@ -40,7 +40,7 @@
* @{
*/
-AXIS2_EXTERN sandesha2_next_msg_mgr_t * AXIS2_CALL
+AXIS2_EXTERN struct sandesha2_next_msg_mgr * AXIS2_CALL
sandesha2_inmemory_next_msg_mgr_create(
const axis2_env_t *env,
struct axis2_ctx *ctx);
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h Wed Dec 6 20:26:47 2006
@@ -34,13 +34,14 @@
#endif
struct axis2_ctx;
+struct sandesha2_sender_mgr;
/** @defgroup sandesha2_inmemory_sender_mgr In Memory Sender Manager
* @ingroup sandesha2
* @{
*/
-AXIS2_EXTERN sandesha2_sender_mgr_t * AXIS2_CALL
+AXIS2_EXTERN struct sandesha2_sender_mgr * AXIS2_CALL
sandesha2_inmemory_sender_mgr_create(
const axis2_env_t *env,
struct axis2_ctx *ctx);
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h Wed Dec 6 20:26:47 2006
@@ -41,7 +41,7 @@
* @{
*/
-AXIS2_EXTERN sandesha2_seq_property_mgr_t * AXIS2_CALL
+AXIS2_EXTERN struct sandesha2_seq_property_mgr * AXIS2_CALL
sandesha2_inmemory_seq_property_mgr_create(
const axis2_env_t *env,
struct axis2_ctx *ctx);
Modified: webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h Wed Dec 6 20:26:47 2006
@@ -39,7 +39,7 @@
typedef struct sandesha2_invoker_mgr sandesha2_invoker_mgr_t;
typedef struct sandesha2_invoker_mgr_ops sandesha2_invoker_mgr_ops_t;
-struct sandesha2_sender_mgr_ops
+AXIS2_DECLARE_DATA struct sandesha2_invoker_mgr_ops
{
/**
* Deallocate memory
@@ -88,9 +88,9 @@
};
-struct sandesha2_invoker_mgr
+AXIS2_DECLARE_DATA struct sandesha2_invoker_mgr
{
- sandesha2_invoker_mgr_ops_t *ops;
+ const sandesha2_invoker_mgr_ops_t *ops;
};
AXIS2_EXTERN sandesha2_invoker_mgr_t * AXIS2_CALL
Modified: webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h Wed Dec 6 20:26:47 2006
@@ -39,7 +39,7 @@
typedef struct sandesha2_next_msg_mgr sandesha2_next_msg_mgr_t;
typedef struct sandesha2_next_msg_mgr_ops sandesha2_next_msg_mgr_ops_t;
-struct sandesha2_next_msg_mgr_ops
+AXIS2_DECLARE_DATA struct sandesha2_next_msg_mgr_ops
{
/**
* Deallocate memory
@@ -90,11 +90,11 @@
retrieve_all)(
sandesha2_next_msg_mgr_t *next_msg,
const axis2_env_t *env);
-}
+};
-struct sandesha2_next_msg_mgr
+AXIS2_DECLARE_DATA struct sandesha2_next_msg_mgr
{
- sandesha2_next_msg_mgr_ops_t *ops;
+ const sandesha2_next_msg_mgr_ops_t *ops;
};
AXIS2_EXTERN sandesha2_next_msg_mgr_t * AXIS2_CALL
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=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h Wed Dec 6 20:26:47 2006
@@ -19,7 +19,7 @@
/**
* @file sandesha2_sender_mgr.h
- * @brief Sandesha In Memory Sender Manager Interface
+ * @brief Sandesha Inmemory Sender Manager Interface
*/
#include <axis2_allocator.h>
@@ -29,7 +29,6 @@
#include <axis2_utils.h>
#include <axis2_ctx.h>
#include <axis2_array_list.h>
-#include <sandesha2_sender_bean.h>
#ifdef __cplusplus
extern "C"
@@ -38,8 +37,9 @@
typedef struct sandesha2_sender_mgr sandesha2_sender_mgr_t;
typedef struct sandesha2_sender_mgr_ops sandesha2_sender_mgr_ops_t;
+struct sandesha2_sender_bean_t;
-struct sandesha2_sender_mgr_ops
+AXIS2_DECLARE_DATA struct sandesha2_sender_mgr_ops
{
/**
* Deallocate memory
@@ -48,31 +48,31 @@
axis2_status_t (AXIS2_CALL *
free)(
sandesha2_sender_mgr_t *sender,
- const axis2_env_t *envv);
+ const axis2_env_t *env);
axis2_bool_t (AXIS2_CALL *
insert)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
axis2_bool_t (AXIS2_CALL *
remove)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- const axis2_char_t *msg_id);
+ axis2_char_t *msg_id);
- sandesha2_sender_bean_t *(AXIS2_CALL *
+ struct sandesha2_sender_bean_t *(AXIS2_CALL *
retrieve)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- const axis2_char_t *msg_id);
+ axis2_char_t *msg_id);
axis2_bool_t (AXIS2_CALL *
update)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
axis2_array_list_t *(AXIS2_CALL *
find_by_internal_seq_id)(
@@ -84,29 +84,29 @@
find_by_sender_bean)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
- sandesha2_sender_bean_t *(AXIS2_CALL *
+ struct sandesha2_sender_bean_t *(AXIS2_CALL *
find_unique)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
- sandesha2_sender_bean_t *(AXIS2_CALL *
+ struct sandesha2_sender_bean_t *(AXIS2_CALL *
get_next_msg_to_send)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env);
- sandesha2_sender_bean_t *(AXIS2_CALL *
+ struct sandesha2_sender_bean_t *(AXIS2_CALL *
retrieve_from_msg_ref_key)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
axis2_char_t *msg_ctx_ref_key);
-}
+};
-struct sandesha2_sender_mgr
+AXIS2_DECLARE_DATA struct sandesha2_sender_mgr
{
- sandesha2_sender_mgr_ops_t *ops;
+ const sandesha2_sender_mgr_ops_t *ops;
};
AXIS2_EXTERN sandesha2_sender_mgr_t * AXIS2_CALL
@@ -123,25 +123,25 @@
sandesha2_sender_mgr_insert(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
axis2_bool_t AXIS2_CALL
sandesha2_sender_mgr_remove(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- const axis2_char_t *msg_id);
+ axis2_char_t *msg_id);
-sandesha2_sender_bean_t *AXIS2_CALL
+struct sandesha2_sender_bean_t *AXIS2_CALL
sandesha2_sender_mgr_retrieve(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- const axis2_char_t *msg_id);
+ axis2_char_t *msg_id);
axis2_bool_t AXIS2_CALL
sandesha2_sender_mgr_update(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
axis2_array_list_t *AXIS2_CALL
sandesha2_sender_mgr_find_by_internal_seq_id(
@@ -153,20 +153,20 @@
sandesha2_sender_mgr_find_by_sender_bean(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
-sandesha2_sender_bean_t *AXIS2_CALL
+struct sandesha2_sender_bean_t *AXIS2_CALL
sandesha2_sender_mgr_find_unique(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- sandesha2_sender_bean_t *bean);
+ struct sandesha2_sender_bean_t *bean);
-sandesha2_sender_bean_t *AXIS2_CALL
+struct sandesha2_sender_bean_t *AXIS2_CALL
sandesha2_sender_mgr_get_next_msg_to_send(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env);
-sandesha2_sender_bean_t *AXIS2_CALL
+struct sandesha2_sender_bean_t *AXIS2_CALL
sandesha2_sender_mgr_retrieve_from_msg_ref_key(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
Modified: webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h Wed Dec 6 20:26:47 2006
@@ -39,7 +39,7 @@
typedef struct sandesha2_seq_property_mgr sandesha2_seq_property_mgr_t;
typedef struct sandesha2_seq_property_mgr_ops sandesha2_seq_property_mgr_ops_t;
-struct sandesha2_seq_property_mgr_ops
+AXIS2_DECLARE_DATA struct sandesha2_seq_property_mgr_ops
{
/**
* Deallocate memory
@@ -99,11 +99,11 @@
const axis2_env_t *env,
sandesha2_seq_property_bean_t *bean);
-}
+};
-struct sandesha2_seq_property_mgr
+AXIS2_DECLARE_DATA struct sandesha2_seq_property_mgr
{
- sandesha2_seq_property_mgr_ops_t *ops;
+ const sandesha2_seq_property_mgr_ops_t *ops;
};
AXIS2_EXTERN sandesha2_seq_property_mgr_t * AXIS2_CALL
Modified: webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_storage_mgr.h Wed Dec 6 20:26:47 2006
@@ -28,12 +28,6 @@
#include <axis2_conf_ctx.h>
#include <axis2_module_desc.h>
#include <sandesha2_transaction.h>
-#include <sandesha2_create_seq_mgr.h>
-#include <sandesha2_next_msg_mgr.h>
-#include <sandesha2_sender_mgr.h>
-#include <sandesha2_seq_property_mgr.h>
-#include <sandesha2_invoker_mgr.h>
-
#ifdef __cplusplus
extern "C"
@@ -47,7 +41,12 @@
typedef struct sandesha2_storage_mgr sandesha2_storage_mgr_t;
typedef struct sandesha2_storage_mgr_ops sandesha2_storage_mgr_ops_t;
-struct sandesha2_rm_bean;
+struct sandesha2_rm_bean_t;
+struct sandesha2_sender_mgr;
+struct sandesha2_create_seq_mgr;
+struct sandesha2_invoker_mgr;
+struct sandesha2_seq_property_mgr;
+struct sandesha2_next_msg_mgr;
/**
* @brief Storage Manager ops struct
@@ -76,27 +75,27 @@
const axis2_env_t *env,
struct sandesha2_rm_bean_t *rm_bean);
- sandesha2_create_seq_mgr_t *(AXIS2_CALL *
+ struct sandesha2_create_seq_mgr *(AXIS2_CALL *
get_create_seq_mgr)(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
- sandesha2_next_msg_mgr_t *(AXIS2_CALL *
+ struct sandesha2_next_msg_mgr *(AXIS2_CALL *
get_next_msg_mgr)(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
- sandesha2_sender_mgr_t *(AXIS2_CALL *
+ struct sandesha2_sender_mgr *(AXIS2_CALL *
get_retrans_mgr)(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
- sandesha2_seq_property_mgr_t *(AXIS2_CALL *
+ struct sandesha2_seq_property_mgr *(AXIS2_CALL *
get_seq_property_mgr)(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
- sandesha2_invoker_mgr_t *(AXIS2_CALL *
+ struct sandesha2_invoker_mgr *(AXIS2_CALL *
get_storage_map_mgr)(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
@@ -165,7 +164,7 @@
axis2_char_t *key);
};
-struct sandesha2_storage_mgr
+AXIS2_DECLARE_DATA struct sandesha2_storage_mgr
{
const sandesha2_storage_mgr_ops_t *ops;
};
@@ -203,27 +202,27 @@
const axis2_env_t *env,
struct sandesha2_rm_bean_t *rm_bean);
-sandesha2_create_seq_mgr_t *AXIS2_CALL
+struct sandesha2_create_seq_mgr *AXIS2_CALL
sandesha2_storage_mgr_get_create_seq_mgr(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
-sandesha2_next_msg_mgr_t *AXIS2_CALL
+struct sandesha2_next_msg_mgr *AXIS2_CALL
sandesha2_storage_mgr_get_next_msg_mgr(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
-sandesha2_sender_mgr_t *AXIS2_CALL
+struct sandesha2_sender_mgr *AXIS2_CALL
sandesha2_storage_mgr_get_retrans_mgr(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
-sandesha2_seq_property_mgr_t *AXIS2_CALL
+struct sandesha2_seq_property_mgr *AXIS2_CALL
sandesha2_storage_mgr_get_seq_property_mgr(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
-sandesha2_invoker_mgr_t *AXIS2_CALL
+struct sandesha2_invoker_mgr *AXIS2_CALL
sandesha2_storage_mgr_get_storage_map_mgr(
sandesha2_storage_mgr_t *storage_mgr,
const axis2_env_t *env);
Modified: webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h Wed Dec 6 20:26:47 2006
@@ -41,6 +41,9 @@
{
#endif
+struct sandesha2_seq_property_mgr;
+struct sandesha2_seq_property_bean_t;
+
/** @defgroup sandesha2_terminate_mgr
* @ingroup sandesha2_util
* @{
@@ -88,8 +91,8 @@
sandesha2_terminate_mgr_do_updates_if_needed(
const axis2_env_t *env,
axis2_char_t *seq_id,
- sandesha2_seq_property_bean_t *prop_bean,
- sandesha2_seq_property_mgr_t *prop_mgr);
+ struct sandesha2_seq_property_bean_t *prop_bean,
+ struct sandesha2_seq_property_mgr *prop_mgr);
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
sandesha2_terminate_mgr_is_property_deletable(
Modified: webservices/sandesha/trunk/c/include/sandesha2_transaction.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_transaction.h?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_transaction.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_transaction.h Wed Dec 6 20:26:47 2006
@@ -43,7 +43,7 @@
* @{
*/
-struct sandesha2_transaction_ops
+AXIS2_DECLARE_DATA struct sandesha2_transaction_ops
{
/**
* Deallocate memory
@@ -76,9 +76,9 @@
struct sandesha2_rm_bean_t *rm_bean);
};
-struct sandesha2_transaction
+AXIS2_DECLARE_DATA struct sandesha2_transaction
{
- sandesha2_transaction_ops_t *ops;
+ const sandesha2_transaction_ops_t *ops;
};
AXIS2_EXTERN sandesha2_transaction_t* AXIS2_CALL
Modified: webservices/sandesha/trunk/c/samples/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/Makefile.am?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/samples/Makefile.am (original)
+++ webservices/sandesha/trunk/c/samples/Makefile.am Wed Dec 6 20:26:47 2006
@@ -1,4 +1,4 @@
samplesdir=$(prefix)/samples
-SUBDIRS = resources RMSampleService rm_echo rm_ping rm_mtom
+SUBDIRS = resources RMSampleService rm_echo rm_ping rm_mtom rm_1_1_echo
samples_DATA= Makefile.am Makefile.in
Modified: webservices/sandesha/trunk/c/samples/RMSampleService/rm_sample_svc.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/RMSampleService/rm_sample_svc.c?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/samples/RMSampleService/rm_sample_svc.c (original)
+++ webservices/sandesha/trunk/c/samples/RMSampleService/rm_sample_svc.c Wed Dec 6 20:26:47 2006
@@ -54,7 +54,6 @@
if (!node) /* 'echoString' node */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
- printf("Echo client ERROR: input parameter NULL\n");
return NULL;
}
else
@@ -69,7 +68,6 @@
AXIOM_NODE_SERIALIZE (node, env, om_output);
buffer = AXIOM_XML_WRITER_GET_XML(writer, env);
- printf("buffer = %s \n", buffer);
}
element = AXIOM_NODE_GET_DATA_ELEMENT(node, env);
@@ -80,7 +78,6 @@
if (!text_parent_node) /* 'text' node */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return NULL;
}
@@ -88,7 +85,6 @@
if (!text_node) /* actual text to echo */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return NULL;
}
@@ -98,14 +94,12 @@
if( text && AXIOM_TEXT_GET_VALUE(text , env))
{
axis2_char_t *text_str = AXIOM_TEXT_GET_VALUE(text, env);
- printf("Echoing text value %s \n", text_str);
ret_node = build_echo_om(env, text_str);
}
}
else
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return NULL;
}
@@ -163,7 +157,6 @@
if (!node) /* 'echoString' node */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
- printf("Echo client ERROR: input parameter NULL\n");
return;
}
else
@@ -178,7 +171,6 @@
AXIOM_NODE_SERIALIZE (node, env, om_output);
buffer = AXIOM_XML_WRITER_GET_XML(writer, env);
- printf("buffer = %s \n", buffer);
}
element = AXIOM_NODE_GET_DATA_ELEMENT(node, env);
@@ -189,7 +181,6 @@
if (!text_parent_node) /* 'text' node */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return;
}
@@ -197,7 +188,6 @@
if (!text_node) /* actual text to echo */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return;
}
@@ -207,13 +197,11 @@
if( text && AXIOM_TEXT_GET_VALUE(text , env))
{
axis2_char_t *text_str = AXIOM_TEXT_GET_VALUE(text, env);
- printf("Echoing text value %s \n", text_str);
}
}
else
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return;
}
@@ -242,7 +230,6 @@
if (!node) /* 'mtomSample' node */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
- printf("Echo client ERROR: input parameter NULL\n");
return NULL;
}
@@ -250,7 +237,6 @@
if (!file_name_node) /* 'text' node */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return NULL;
}
@@ -258,7 +244,6 @@
if (!file_text_node) /* actual text to mtom */
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return NULL;
}
@@ -269,7 +254,6 @@
{
axiom_node_t *image_node = NULL;
axis2_char_t *text_str = AXIOM_TEXT_GET_VALUE(text, env);
- printf("File Name %s \n", text_str);
image_node = AXIOM_NODE_GET_NEXT_SIBLING(file_name_node, env);
if (image_node)
@@ -301,7 +285,6 @@
else
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
- printf("Echo client ERROR: invalid XML in request\n");
return NULL;
}
Modified: webservices/sandesha/trunk/c/samples/configure.ac
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/configure.ac?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/samples/configure.ac (original)
+++ webservices/sandesha/trunk/c/samples/configure.ac Wed Dec 6 20:26:47 2006
@@ -120,6 +120,7 @@
AC_CONFIG_FILES([Makefile \
RMSampleService/Makefile \
rm_echo/Makefile \
+ rm_1_1_echo/Makefile \
rm_ping/Makefile \
rm_mtom/Makefile \
resources/Makefile
Modified: webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am Wed Dec 6 20:26:47 2006
@@ -16,6 +16,9 @@
-laxis2_http_receiver \
-lwoden \
-laxis2_xml_schema \
+ -L$(AXIS2C_HOME)/modules/sandesha2 \
+ -lsandesha2_client \
+ -lsandesha2 \
$(GUTHTHILA_LIBS) \
$(LIBXML2_LIBS)
Modified: webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c Wed Dec 6 20:26:47 2006
@@ -26,6 +26,9 @@
#include <axis2_svc_client.h>
#include <sandesha2_client_constants.h>
#include <sandesha2_constants.h>
+#include <sandesha2_client.h>
+
+#define MAX_COUNT 20
/* on_complete callback function */
axis2_status_t AXIS2_CALL
@@ -42,25 +45,7 @@
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);
-
-void
+static void
usage(
axis2_char_t *prog_name);
@@ -68,7 +53,9 @@
{
const axis2_env_t *env = NULL;
const axis2_char_t *address = NULL;
+ const axis2_char_t *to = NULL;
axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_endpoint_ref_t* target_epr = NULL;
axis2_endpoint_ref_t* reply_to = NULL;
axis2_options_t *options = NULL;
const axis2_char_t *client_home = NULL;
@@ -81,7 +68,7 @@
axis2_listener_manager_t *listener_manager = NULL;
axis2_char_t *offered_seq_id = NULL;
axis2_bool_t offer = AXIS2_FALSE;
- int version = 0;
+ int version = 1;
int c;
/* Set up the environment */
@@ -90,7 +77,8 @@
/* Set end point reference of echo service */
/*address = "http://127.0.0.1:8888/axis2/services/RMSampleService";*/
- address = "http://127.0.0.1:5555/axis2/services/RMSampleService";
+ /*address = "http://127.0.0.1:5555/axis2/services/RMSampleService";*/
+ to = "http://127.0.0.1:5555/axis2/services/RMSampleService";
while ((c = AXIS2_GETOPT(argc, argv, ":a:o:v:")) != -1)
{
@@ -126,11 +114,21 @@
printf ("Using endpoint : %s\n", address);
/* Create EPR with given address */
- endpoint_ref = axis2_endpoint_ref_create(env, address);
+ if(to)
+ endpoint_ref = axis2_endpoint_ref_create(env, to);
+ if(address)
+ target_epr = axis2_endpoint_ref_create(env, address);
/* Setup options */
options = axis2_options_create(env);
- AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+ if(endpoint_ref)
+ AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+ if(target_epr)
+ {
+ property = axis2_property_create(env);
+ AXIS2_PROPERTY_SET_VALUE(property, env, target_epr);
+ AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TARGET_EPR, property);
+ }
AXIS2_OPTIONS_SET_USE_SEPARATE_LISTENER(options, env, AXIS2_TRUE);
/* Seperate listner needs addressing, hence addressing stuff in options */
@@ -204,7 +202,7 @@
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,
+ sandesha2_client_send_non_blocking(env, svc_client, options, NULL, callback, payload,
listener_manager);
wait_on_callback(env, callback);
@@ -213,7 +211,7 @@
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,
+ sandesha2_client_send_non_blocking(env, svc_client, options, NULL, callback2, payload,
listener_manager);
wait_on_callback(env, callback2);
@@ -226,10 +224,10 @@
AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_VALUE_TRUE);
AXIS2_OPTIONS_SET_PROPERTY(options, env, "Sandesha2LastMessage",
property);
- send_non_blocking(env, svc_client, options, NULL, callback3, payload,
+ sandesha2_client_send_non_blocking(env, svc_client, options, NULL, callback3, payload,
listener_manager);
wait_on_callback(env, callback3);
- AXIS2_SLEEP(10);
+ AXIS2_SLEEP(MAX_COUNT);
if (svc_client)
{
AXIS2_SVC_CLIENT_FREE(svc_client, env);
@@ -317,115 +315,7 @@
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;
-
- 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;
-}
-
-void
+static void
usage(
axis2_char_t *prog_name)
{
Modified: webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am (original)
+++ webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am Wed Dec 6 20:26:47 2006
@@ -20,5 +20,6 @@
$(LIBXML2_LIBS)
INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/modules/sandesha2 \
@UTILINC@ \
@AXIOMINC@
Modified: webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c Wed Dec 6 20:26:47 2006
@@ -19,14 +19,20 @@
#include <axis2_util.h>
#include <axiom_soap.h>
#include <axis2_client.h>
+#include <sandesha2_client_constants.h>
+#include <sandesha2_constants.h>
-#define MAX_COUNT 10
+#define MAX_COUNT 60
axiom_node_t *
build_om_programatically(
const axis2_env_t *env,
axis2_char_t *text);
+static void
+usage(
+ axis2_char_t *prog_name);
+
int main(int argc, char** argv)
{
const axis2_env_t *env = NULL;
@@ -41,6 +47,8 @@
axis2_status_t status = AXIS2_FAILURE;
axis2_property_t *property = NULL;
int count = 0;
+ int version = 1;
+ int c;
/* Set up the environment */
env = axis2_env_create_all("rm_ping.log", AXIS2_LOG_LEVEL_TRACE);
@@ -49,29 +57,48 @@
/*address = "http://127.0.0.1:8888/axis2/services/RMSampleService";*/
address = "http://127.0.0.1:5555/axis2/services/RMSampleService";
/*to = "http://127.0.0.1:8080/axis2/services/RMSampleService";*/
- to = "http://127.0.0.1:9090/axis2/services/RMSampleService";
- if (argc > 1 )
- {
- address = argv[1];
- }
- if (AXIS2_STRCMP(address, "-h") == 0)
+ to = "http://127.0.0.1:5555/axis2/services/RMSampleService";
+ while ((c = AXIS2_GETOPT(argc, argv, ":a:v:")) != -1)
{
- printf("Usage : %s [endpoint_url]\n", argv[0]);
- printf("use -h for help\n");
- return 0;
+
+ switch (c)
+ {
+ case 'a':
+ address = optarg;
+ break;
+ case 'v': /* RM Version */
+ version = AXIS2_ATOI(optarg);
+ break;
+ case ':':
+ fprintf(stderr, "\nOption -%c requires an operand\n", optopt);
+ usage(argv[0]);
+ return -1;
+ case '?':
+ if (isprint(optopt))
+ fprintf(stderr, "\nUnknown option `-%c'.\n", optopt);
+ usage(argv[0]);
+ return -1;
+ }
}
+
printf ("Using endpoint : %s\n", address);
/* Create EPR with given address */
- endpoint_ref = axis2_endpoint_ref_create(env, to);
- target_epr = axis2_endpoint_ref_create(env, address);
+ if(to)
+ endpoint_ref = axis2_endpoint_ref_create(env, to);
+ if(address)
+ target_epr = axis2_endpoint_ref_create(env, address);
/* Setup options */
options = axis2_options_create(env);
- AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
- property = axis2_property_create(env);
- AXIS2_PROPERTY_SET_VALUE(property, env, target_epr);
- AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TARGET_EPR, property);
+ if(endpoint_ref)
+ AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+ if(target_epr)
+ {
+ property = axis2_property_create(env);
+ AXIS2_PROPERTY_SET_VALUE(property, env, target_epr);
+ AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TARGET_EPR, property);
+ }
/*AXIS2_OPTIONS_SET_ACTION(options, env, "urn:wsrm:Ping");*/
/* Set up deploy folder. It is from the deploy folder, the configuration is
@@ -104,7 +131,18 @@
/* Build the SOAP request message payload using OM API.*/
AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, "sandesha2");
-
+ /* RM Version 1.1 */
+ if(version == 1)
+ {
+ property = axis2_property_create(env);
+ if(property)
+ {
+ AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(
+ SANDESHA2_SPEC_VERSION_1_1, env));
+ AXIS2_OPTIONS_SET_PROPERTY(options, env,
+ SANDESHA2_CLIENT_RM_SPEC_VERSION, property);
+ }
+ }
/* Send request */
payload = build_om_programatically(env, "ping1");
status = AXIS2_SVC_CLIENT_SEND_ROBUST(svc_client, env, payload);
@@ -119,7 +157,6 @@
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);
@@ -163,4 +200,20 @@
return ping_om_node;
}
+
+static void
+usage(
+ axis2_char_t *prog_name)
+{
+ fprintf(stdout, "\n Usage : %s", prog_name);
+ fprintf(stdout, " [-a ADDRESS]");
+ fprintf(stdout, " [-v RM VERSION]");
+ fprintf(stdout, " Options :\n");
+ fprintf(stdout, "\t-v RM VERSION \t rm version.. The"
+ " default rm version is 1.0 ../\n");
+ fprintf(stdout, "\t-a ADDRESS \t endpoint address.. The"
+ " default is http://127.0.0.1:5555/axis2/services/RMSampleService ../\n");
+ fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
+}
+
Modified: webservices/sandesha/trunk/c/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/Makefile.am?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/src/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/Makefile.am Wed Dec 6 20:26:47 2006
@@ -1 +1 @@
-SUBDIRS = wsrm storage util transport workers client handlers msgprocessors core polling
+SUBDIRS = wsrm storage util transport workers client handlers msgprocessors polling core
Modified: webservices/sandesha/trunk/c/src/client/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/client/Makefile.am?view=diff&rev=483342&r1=483341&r2=483342
==============================================================================
--- webservices/sandesha/trunk/c/src/client/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/client/Makefile.am Wed Dec 6 20:26:47 2006
@@ -1,6 +1,7 @@
-noinst_LTLIBRARIES = libsandesha_client.la
+prglibdir=$(prefix)/sandesha2
+prglib_LTLIBRARIES = libsandesha2_client.la
-libsandesha_client_la_SOURCES = \
+libsandesha2_client_la_SOURCES = \
sequence_report.c \
report.c \
client.c
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org