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/08 05:38:14 UTC

svn commit: r354976 - in /webservices/axis2/trunk/c: include/axis2_disp.h modules/core/engine/src/disp.c

Author: samisa
Date: Wed Dec  7 20:37:57 2005
New Revision: 354976

URL: http://svn.apache.org/viewcvs?rev=354976&view=rev
Log:
Added find service and find operation

Modified:
    webservices/axis2/trunk/c/include/axis2_disp.h
    webservices/axis2/trunk/c/modules/core/engine/src/disp.c

Modified: webservices/axis2/trunk/c/include/axis2_disp.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_disp.h?rev=354976&r1=354975&r2=354976&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_disp.h (original)
+++ webservices/axis2/trunk/c/include/axis2_disp.h Wed Dec  7 20:37:57 2005
@@ -53,6 +53,26 @@
                                                axis2_env_t **env, axis2_qname_t *qname);
         axis2_status_t (AXIS2_CALL *free) (struct axis2_disp *disp, 
                                                axis2_env_t **env);
+        /**
+        * finds the service
+        *
+        * @param messageContext
+        * @return
+        */
+        axis2_svc_t* (AXIS2_CALL *find_svc)(struct axis2_disp *disp, 
+                        axis2_env_t **env,
+                        axis2_msg_ctx_t *msg_ctx);
+        /**
+        * finds the operation
+        *
+        * @param service
+        * @param msg_ctx
+        * @return
+        */
+        axis2_operation_t* (AXIS2_CALL *find_operation)(struct axis2_disp *disp, 
+                                    axis2_env_t **env,
+                                    axis2_svc_t *svc, 
+                                    axis2_msg_ctx_t * msg_ctx);
         
     } axis2_disp_ops_t;
 	
@@ -76,7 +96,9 @@
 #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))
+
 /** @} */
     
 #ifdef __cplusplus

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=354976&r1=354975&r2=354976&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/disp.c Wed Dec  7 20:37:57 2005
@@ -46,6 +46,14 @@
                                        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_env_t **env,
+                                axis2_svc_t *svc, 
+                                axis2_msg_ctx_t * msg_ctx);
+
 
 axis2_disp_t* AXIS2_CALL axis2_disp_create(axis2_env_t **env, axis2_qname_t *qname) 
 {
@@ -122,6 +130,8 @@
     disp_impl->disp.ops->get_qname = axis2_disp_get_qname;
     disp_impl->disp.ops->set_qname = axis2_disp_set_qname;
     disp_impl->disp.ops->free = axis2_disp_free;
+    disp_impl->disp.ops->find_svc = axis2_disp_find_svc;
+    disp_impl->disp.ops->find_operation = axis2_disp_find_operation;
 
     return &(disp_impl->disp);
 }
@@ -257,26 +267,37 @@
     return AXIS2_SUCCESS;    
 }
     
-/** The following two interface methods found in AbstractDispatcher of Java
-    implementation has been moved to msg_ctx in C implementation as that seemed 
-    a more appropriate home for those. The struct that inherits from this struct
-    should implement those methods and assing the respective function pointers.
+/** The struct that inherits from this struct
+    should implement the find_service and find_operation methods and assing the 
+    respective function pointers in the base struct.
+    Here we have only the dummy implementation to gauard against erros due to 
+    the failure to provide an impl version by mistake.
  */
+    
 /**
- * Give the diaptacher turn to find the Service
+ * finds the service
  *
  * @param messageContext
  * @return
  */
-/*axis2_svc_t* findService(
-        axis2_msg_ctx_t *msg_ctx) */
+axis2_svc_t* AXIS2_CALL axis2_disp_find_svc(struct axis2_disp *disp, 
+                    axis2_env_t **env,
+                    axis2_msg_ctx_t *msg_ctx) 
+{
+    return NULL;
+}
 
 /**
- * Give the diaptacher turn to find the Operation
+ * finds the operation
  *
  * @param service
  * @param msg_ctx
  * @return
  */
-/*axis2_operation* find_operation(
-        axis2_svc_t *service, axis2_msg_ctx_t * msg_ctx)*/
+axis2_operation* AXIS2_CALL axis2_disp_find_operation(struct axis2_disp *disp, 
+                                axis2_env_t **env,
+                                axis2_svc_t *svc, 
+                                axis2_msg_ctx_t * msg_ctx)
+{
+    return NULL;
+}