You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2005/12/09 09:57:44 UTC
svn commit: r355418 - in /webservices/axis2/trunk/c: include/axis2_addr.h
include/axis2_disp.h include/axis2_msg_ctx.h
modules/core/context/src/msg_ctx.c modules/core/engine/src/disp.c
Author: samisa
Date: Fri Dec 9 00:57:26 2005
New Revision: 355418
URL: http://svn.apache.org/viewcvs?rev=355418&view=rev
Log:
Fixed the problems related to find service operation in dispatcher
Modified:
webservices/axis2/trunk/c/include/axis2_addr.h
webservices/axis2/trunk/c/include/axis2_disp.h
webservices/axis2/trunk/c/include/axis2_msg_ctx.h
webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c
webservices/axis2/trunk/c/modules/core/engine/src/disp.c
Modified: webservices/axis2/trunk/c/include/axis2_addr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_addr.h?rev=355418&r1=355417&r2=355418&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_addr.h (original)
+++ webservices/axis2/trunk/c/include/axis2_addr.h Fri Dec 9 00:57:26 2005
@@ -44,9 +44,9 @@
#define EPR_SERVICE_NAME "ServiceName"
/* ====================== Addressing Submission Version Constants ========*/
- #define AXIS2_WSA_NAMESPACE "http://schemas.xmlsoap.org/ws/2004/08/addressing"
- #define AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE "wsa:Reply"
- #define AXIS2_WSA_ANONYMOUS_URL "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"
+ #define AXIS2_WSA_NAMESPACE_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing"
+ #define AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE_SUBMISSION "wsa:Reply"
+ #define AXIS2_WSA_ANONYMOUS_URL_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"
#define EPR_REFERENCE_PROPERTIES "ReferenceProperties"
#define EPR_PORT_TYPE "PortType"
Modified: webservices/axis2/trunk/c/include/axis2_disp.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_disp.h?rev=355418&r1=355417&r2=355418&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_disp.h (original)
+++ webservices/axis2/trunk/c/include/axis2_disp.h Fri Dec 9 00:57:26 2005
@@ -59,9 +59,8 @@
* @param messageContext
* @return
*/
- axis2_svc_t* (AXIS2_CALL *find_svc)(struct axis2_disp *disp,
- axis2_env_t **env,
- axis2_msg_ctx_t *msg_ctx);
+ axis2_svc_t* (AXIS2_CALL *find_svc)(axis2_msg_ctx_t *msg_ctx,
+ axis2_env_t **env);
/**
* finds the operation
*
@@ -69,10 +68,9 @@
* @param msg_ctx
* @return
*/
- axis2_operation_t* (AXIS2_CALL *find_operation)(struct axis2_disp *disp,
+ axis2_operation_t* (AXIS2_CALL *find_operation)(axis2_msg_ctx_t *msg_ctx,
axis2_env_t **env,
- axis2_svc_t *svc,
- axis2_msg_ctx_t * msg_ctx);
+ axis2_svc_t *svc);
} axis2_disp_ops_t;
@@ -96,8 +94,8 @@
#define AXIS2_DISP_GET_QNAME(disp, env) ((disp)->ops->get_qname(disp, env))
#define AXIS2_DISP_SET_QNAME(disp, env, name) ((disp)->ops->set_qname(disp, env, name))
#define AXIS2_DISP_FREE(disp, env) ((disp)->ops->free(disp, env))
-#define AXIS2_DISP_FIND_SVC(disp, env, msg_ctx) ((disp)->ops->find_svc(disp, env, msg_ctx))
-#define AXIS2_DISP_FIND_OPERATION(disp, env, svc, msg_ctx) ((disp)->ops->find_operation(disp, env, svc, msg_ctx))
+#define AXIS2_DISP_FIND_SVC(msg_ctx, env) ((msg_ctx)->ops->find_svc(msg_ctx, env))
+#define AXIS2_DISP_FIND_OPERATION(msg_ctx, env, svc) ((msg_ctx)->ops->find_operation(msg_ctx, env, svc))
/** @} */
Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?rev=355418&r1=355417&r2=355418&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Fri Dec 9 00:57:26 2005
@@ -556,7 +556,26 @@
axis2_status_t (AXIS2_CALL *set_svc_grp_ctx_id)(struct axis2_msg_ctx *msg_ctx,
axis2_env_t **env,
axis2_char_t *svc_grp_ctx_id);
-
+
+ /**
+ * finds the service
+ *
+ * @param messageContext
+ * @return
+ */
+ struct axis2_svc* (AXIS2_CALL *find_svc)(axis2_msg_ctx_t *msg_ctx,
+ axis2_env_t **env);
+ /**
+ * finds the operation
+ *
+ * @param service
+ * @param msg_ctx
+ * @return
+ */
+ struct axis2_operation* (AXIS2_CALL *find_operation)(axis2_msg_ctx_t *msg_ctx,
+ axis2_env_t **env,
+ struct axis2_svc *svc);
+
/**
* @return
*/
@@ -688,6 +707,8 @@
#define AXIS2_MSG_CTX_GET_SVC_GRP_CTX_ID(msg_ctx, env) ((msg_ctx)->ops->get_svc_grp_ctx_id(msg_ctx, env))
#define AXIS2_MSG_CTX_SET_SVC_GRP_CTX_ID(msg_ctx, env, svc_grp_ctx_id) ((msg_ctx)->ops->set_svc_grp_ctx_id(msg_ctx, env, svc_grp_ctx_id))
#define AXIS2_MSG_CTX_IS_PAUSED(msg_ctx, env) ((msg_ctx)->ops->is_paused(msg_ctx, env))
+#define AXIS2_MSG_CTX_FIND_SVC(msg_ctx, env) ((msg_ctx)->ops->find_svc(msg_ctx, env))
+#define AXIS2_MSG_CTX_FIND_OPERATION(msg_ctx, env, svc) ((msg_ctx)->ops->find_operation(msg_ctx, env, svc))
/************************** End of function macros ****************************/
Modified: webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c?rev=355418&r1=355417&r2=355418&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/src/msg_ctx.c Fri Dec 9 00:57:26 2005
@@ -406,6 +406,13 @@
axis2_msg_ctx_is_paused(axis2_msg_ctx_t *msg_ctx,
axis2_env_t **env);
+axis2_svc_t* AXIS2_CALL axis2_msg_ctx_find_svc(axis2_msg_ctx_t *msg_ctx,
+ axis2_env_t **env);
+axis2_operation_t* AXIS2_CALL axis2_msg_ctx_find_operation(axis2_msg_ctx_t *msg_ctx,
+ axis2_env_t **env,
+ axis2_svc_t *svc);
+
+
/************************* End of function headers ****************************/
axis2_msg_ctx_t * AXIS2_CALL
@@ -614,6 +621,8 @@
msg_ctx_impl->msg_ctx.ops->get_svc_grp_ctx_id = axis2_msg_ctx_get_svc_grp_ctx_id;
msg_ctx_impl->msg_ctx.ops->set_svc_grp_ctx_id = axis2_msg_ctx_set_svc_grp_ctx_id;
msg_ctx_impl->msg_ctx.ops->is_paused = axis2_msg_ctx_is_paused;
+ msg_ctx_impl->msg_ctx.ops->find_svc = axis2_msg_ctx_find_svc;
+ msg_ctx_impl->msg_ctx.ops->find_operation = axis2_msg_ctx_find_operation;
return &(msg_ctx_impl->msg_ctx);
}
@@ -1916,3 +1925,20 @@
/** TODO: there are many block to be uncommented once external depandancies are resoled,
that is when thos structs are implemented */
+
+/** find_svc and find_operation methods has to implemented by the dispatchers and
+ the function pointers assigined to the ops of message context.
+ The following are just dummy implemntations.
+*/
+axis2_svc_t* AXIS2_CALL axis2_msg_ctx_find_svc(axis2_msg_ctx_t *msg_ctx,
+ axis2_env_t **env)
+{
+ return NULL;
+}
+
+axis2_operation_t* AXIS2_CALL axis2_msg_ctx_find_operation(axis2_msg_ctx_t *msg_ctx,
+ axis2_env_t **env,
+ axis2_svc_t *svc)
+{
+ return NULL;
+}
Modified: webservices/axis2/trunk/c/modules/core/engine/src/disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/disp.c?rev=355418&r1=355417&r2=355418&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/disp.c Fri Dec 9 00:57:26 2005
@@ -29,7 +29,10 @@
/** base class, inherits from handler */
axis2_handler_t *base;
/** phase name */
- axis2_qname_t *qname;
+ axis2_qname_t *qname;
+ /** derived struct */
+ void* derived; /* deep copy */
+ int derived_type;
} axis2_disp_impl_t;
/** Interface to implementation conversion macro */
@@ -46,13 +49,11 @@
axis2_env_t **env, axis2_qname_t *qname);
axis2_status_t AXIS2_CALL axis2_disp_free (struct axis2_disp * disp,
axis2_env_t **env);
-axis2_svc_t* AXIS2_CALL axis2_disp_find_svc(struct axis2_disp *disp,
- axis2_env_t **env,
- axis2_msg_ctx_t *msg_ctx);
-axis2_operation* AXIS2_CALL axis2_disp_find_operation(struct axis2_disp *disp,
+axis2_svc_t* AXIS2_CALL axis2_disp_find_svc(axis2_msg_ctx_t * msg_ctx,
+ axis2_env_t **env);
+axis2_operation* AXIS2_CALL axis2_disp_find_operation(axis2_msg_ctx_t * msg_ctx,
axis2_env_t **env,
- axis2_svc_t *svc,
- axis2_msg_ctx_t * msg_ctx);
+ axis2_svc_t *svc);
axis2_disp_t* AXIS2_CALL axis2_disp_create(axis2_env_t **env, axis2_qname_t *qname)
@@ -175,7 +176,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL axis2_disp_invoke (struct axis2_handler *handler,
+axis2_status_t AXIS2_CALL axis2_disp_invoke(struct axis2_handler *handler,
axis2_env_t **env,
struct axis2_msg_ctx *msg_ctx)
{
@@ -186,29 +187,6 @@
AXIS2_FUNC_PARAM_CHECK(handler, env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, msg_ctx, AXIS2_FAILURE);
- relates_to = AXIS2_MSG_CTX_GET_RELATES_TO(msg_ctx, env);
-
- /** first check if we can dispatch using the relates_to */
- if (relates_to)
- {
- axis2_char_t *relates_to_value = NULL;
- relates_to_value = AXIS2_RELATES_TO_GET_VALUE(relates_to, env);
- if (relates_to_value && AXIS2_STRCMP(relates_to_value, "") != 0 )
- {
- /** TODO need to complete the following */
- /*OperationContext operationContext = msgctx.getSystemContext().getOperationContext(relatesTo);
- if (operationContext != null) {
- msgctx.setAxisOperation(operationContext.getAxisOperation());
- msgctx.setOperationContext(operationContext);
- msgctx.setServiceContext((ServiceContext) operationContext.getParent());
- msgctx.setAxisService(((ServiceContext) operationContext.getParent()).getAxisService());
- msgctx.getAxisOperation().registerOperationContext(msgctx, operationContext);
- msgctx.setServiceGroupContextId(((ServiceGroupContext) msgctx.getServiceContext().getParent()).getId());
- }*/
- return AXIS2_SUCCESS;
- }
- }
-
axis_service = AXIS2_MSG_CTX_GET_SVC(msg_ctx, env);
if (!axis_service)
@@ -224,7 +202,7 @@
axis_service = AXIS2_MSG_CTX_GET_SVC(msg_ctx, env);
if (axis_service)
{
- operation = AXIS2_MSG_CTX_GET_OPERATION(msg_ctx, env);
+ operation = AXIS2_MSG_CTX_GET_OPERATION(msg_ctx, env, axis_service);
if (operation)
{
AXIS2_MSG_CTX_SET_OPERATION(msg_ctx, env, operation);
@@ -280,9 +258,8 @@
* @param messageContext
* @return
*/
-axis2_svc_t* AXIS2_CALL axis2_disp_find_svc(struct axis2_disp *disp,
- axis2_env_t **env,
- axis2_msg_ctx_t *msg_ctx)
+axis2_svc_t* AXIS2_CALL axis2_disp_find_svc(axis2_msg_ctx_t * msg_ctx,
+ axis2_env_t **env)
{
return NULL;
}
@@ -294,10 +271,9 @@
* @param msg_ctx
* @return
*/
-axis2_operation* AXIS2_CALL axis2_disp_find_operation(struct axis2_disp *disp,
+axis2_operation* AXIS2_CALL axis2_disp_find_operation(axis2_msg_ctx_t * msg_ctx,
axis2_env_t **env,
- axis2_svc_t *svc,
- axis2_msg_ctx_t * msg_ctx)
+ axis2_svc_t *svc)
{
return NULL;
}