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/19 06:31:18 UTC

svn commit: r357640 - in /webservices/axis2/trunk/c: configure.ac include/axis2_async_result.h include/axis2_callback.h include/axis2_error.h include/axis2_msg_recv.h modules/core/Makefile.am

Author: samisa
Date: Sun Dec 18 21:31:02 2005
New Revision: 357640

URL: http://svn.apache.org/viewcvs?rev=357640&view=rev
Log:
Added the headers for client API

Added:
    webservices/axis2/trunk/c/include/axis2_async_result.h
    webservices/axis2/trunk/c/include/axis2_callback.h
Modified:
    webservices/axis2/trunk/c/configure.ac
    webservices/axis2/trunk/c/include/axis2_error.h
    webservices/axis2/trunk/c/include/axis2_msg_recv.h
    webservices/axis2/trunk/c/modules/core/Makefile.am

Modified: webservices/axis2/trunk/c/configure.ac
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/configure.ac?rev=357640&r1=357639&r2=357640&view=diff
==============================================================================
--- webservices/axis2/trunk/c/configure.ac (original)
+++ webservices/axis2/trunk/c/configure.ac Sun Dec 18 21:31:02 2005
@@ -102,6 +102,8 @@
     modules/core/transport/http/src/Makefile \
     modules/core/deployment/Makefile \
     modules/core/deployment/src/Makefile \
+    modules/core/clientapi/Makefile \
+    modules/core/clientapi/src/Makefile \
     modules/xml/Makefile \
     modules/xml/parser/Makefile \
     modules/xml/parser/guththila/Makefile \

Added: webservices/axis2/trunk/c/include/axis2_async_result.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_async_result.h?rev=357640&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_async_result.h (added)
+++ webservices/axis2/trunk/c/include/axis2_async_result.h Sun Dec 18 21:31:02 2005
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_ASYNC_RESULT_H
+#define AXIS2_ASYNC_RESULT_H
+
+
+/**
+  * @file axis2_async_result.h
+  * @brief axis2 Message Context interface
+  */
+
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_msg_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/** @defgroup axis2_async_result Message Context 
+ * @ingroup axis2_core_context
+ * @{
+ */
+    
+typedef struct axis2_async_result_ops axis2_async_result_ops_t;
+typedef struct axis2_async_result axis2_async_result_t; 
+
+    
+/** 
+ * @brief Message Context ops struct
+ * Encapsulator struct for ops of axis2_async_result
+ */  
+struct axis2_async_result_ops
+{
+    /*TODO axis2_soap_envelope_t* (AXIS2_CALL *get_envelope)(struct axis2_async_result *async_result, axis2_env_t **env);*/
+    axis2_msg_ctx_t* (AXIS2_CALL *get_result)(struct axis2_async_result *async_result, axis2_env_t **env);
+    axis2_status_t (AXIS2_CALL *free)(struct axis2_async_result *async_result, 
+                                       axis2_env_t **env);
+};
+
+/** 
+ * @brief Message Context struct
+  *	Axis2 Message Context
+ */
+struct axis2_async_result
+{
+    axis2_async_result_ops_t *ops;    
+};
+
+AXIS2_DECLARE(axis2_async_result_t*) axis2_async_result_create(axis2_env_t **env, axis2_msg_ctx_t *result); 
+    
+/************************** Start of function macros **************************/
+
+#define AXIS2_ASYNC_RESULT_GET_ENVELOPE(async_result, env) ((async_result)->ops->get_envelope(async_result, env))
+#define AXIS2_ASYNC_RESULT_GET_RESULT(async_result, env) ((async_result)->ops->get_result(async_result, env))
+#define AXIS2_ASYNC_RESULT_FREE(async_result, env) ((async_result)->ops->free (async_result, env))
+
+/************************** End of function macros ****************************/    
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_ASYNC_RESULT_H */

Added: webservices/axis2/trunk/c/include/axis2_callback.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_callback.h?rev=357640&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_callback.h (added)
+++ webservices/axis2/trunk/c/include/axis2_callback.h Sun Dec 18 21:31:02 2005
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_CALLBACK_H
+#define AXIS2_CALLBACK_H
+
+
+/**
+  * @file axis2_callback.h
+  * @brief axis2 Message Context interface
+  */
+
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_async_result.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/** @defgroup axis2_callback Message Context 
+ * @ingroup axis2_core_context
+ * @{
+ */
+    
+typedef struct axis2_callback_ops axis2_callback_ops_t;
+typedef struct axis2_callback axis2_callback_t; 
+
+    
+/** 
+ * @brief Message Context ops struct
+ * Encapsulator struct for ops of axis2_callback
+ */  
+struct axis2_callback_ops
+{
+    /**
+     * This Method is called by Axis2 once the Async Operation is sucessfully completed and the result returns
+     *
+     * @param result
+     */
+    axis2_status_t (AXIS2_CALL *invoke_on_complete)(struct axis2_callback *callback, axis2_env_t **env, axis2_async_result_t *result);
+    /**
+     * This Method is called by Axis2 once the Async Operation fails and the result returns
+     *
+     * @param e
+     */
+    axis2_status_t (AXIS2_CALL *report_error)(struct axis2_callback *callback, axis2_env_t **env, int exception);
+    /**
+     * This says has the Async Operation is completed or not. this could be useful for poleing 
+     * with a special callback written for poleing (checking repeatedly time to time).
+     * e.g.
+     * <code>
+     *      <pre>
+     *          while(!callback.isComplete()){
+     *             Thread.sleep(1000);
+     *          }
+     *          do whatever u need to do
+     *      </pre>
+     * </code>
+     *
+     * @return
+     */
+    axis2_bool_t (AXIS2_CALL *get_complete)(struct axis2_callback *callback, axis2_env_t **env);
+    /**
+     * Method setComplete
+     *
+     * @param complete
+     */
+    axis2_status_t (AXIS2_CALL *set_complete)(struct axis2_callback *callback, axis2_env_t **env, axis2_bool_t complete) ;
+    axis2_status_t (AXIS2_CALL *free)(struct axis2_callback *callback, 
+                                       axis2_env_t **env);
+};
+
+/** 
+ * @brief Message Context struct
+  *	Axis2 Message Context
+ */
+struct axis2_callback
+{
+    axis2_callback_ops_t *ops;    
+};
+
+AXIS2_DECLARE(axis2_callback_t*) axis2_callback_create(axis2_env_t **env);
+    
+/************************** Start of function macros **************************/
+
+#define AXIS2_CALLBACK_INVOKE_ON_COMPLETE(callback, env, result) ((callback)->ops->invoke_on_complete(callback, env, result))
+#define AXIS2_CALLBACK_INVOKE_REPORT_ERROR(callback, env, error) ((callback)->ops->report_error(callback, env, error))
+#define AXIS2_CALLBACK_INVOKE_GET_COMPLETE(callback, env) ((callback)->ops->get_complete(callback, env))
+#define AXIS2_CALLBACK_INVOKE_SET_COMPLETE(callback, env, complete) ((callback)->ops->set_complete(callback, env, complete))
+#define AXIS2_CALLBACK_FREE(callback, env) ((callback)->ops->free (callback, env))
+
+/************************** End of function macros ****************************/    
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_CALLBACK_H */

Modified: webservices/axis2/trunk/c/include/axis2_error.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_error.h?rev=357640&r1=357639&r2=357640&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/include/axis2_error.h Sun Dec 18 21:31:02 2005
@@ -264,7 +264,17 @@
         /* Invalid status line or invalid request line */
         AXIS2_ERROR_INVALID_HTTP_INVALID_HEADER_START_LINE,
         /* Cannot correlate message*/
-        AXIS2_ERROR_CANNOT_CORRELATE_MSG
+        AXIS2_ERROR_CANNOT_CORRELATE_MSG,
+        /* Operation cannot be NULL in MEP client */
+        AXIS2_ERROR_OPERATION_CANNOT_BE_NULL_IN_MEP_CLIENT,
+        /* MEP cannot be NULL in MEP client */
+        AXIS2_ERROR_MEP_CANNOT_BE_NULL_IN_MEP_CLIENT,
+        /* MEP Mismatch */
+        AXIS2_ERROR_MEP_MISMATCH_IN_MEP_CLIENT,
+        /** cannot infer transport from URL */
+        AXIS2_ERROR_CANNOT_INFER_TRANSPORTransport,
+        /** Invalid SOAP version */
+        AXIS2_ERROR_INVALID_SOAP_VERSION
         
     };
 

Modified: webservices/axis2/trunk/c/include/axis2_msg_recv.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_msg_recv.h?rev=357640&r1=357639&r2=357640&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_recv.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_recv.h Sun Dec 18 21:31:02 2005
@@ -30,6 +30,9 @@
 {
 #endif
 
+#define AXIS2_SERVICE_CLASS "ServiceClass"
+#define AXIS2_SCOPE "scope"
+    
 /** @defgroup axis2_msg_recv Message Receiver
   * @ingroup axis2_core_engine
   * @{
@@ -55,6 +58,16 @@
     axis2_status_t (AXIS2_CALL *receive) (axis2_msg_recv_t *msg_recv,
                                             axis2_env_t **env,
                                             struct axis2_msg_ctx *msg_ctx);
+    axis2_status_t (AXIS2_CALL *invoke_in_business_logic) (axis2_msg_recv_t *msg_recv,
+                                            axis2_env_t **env,
+                                            struct axis2_msg_ctx *in_msg_ctx);
+    axis2_status_t (AXIS2_CALL *invoke_in_out_business_logic) (axis2_msg_recv_t *msg_recv,
+                                            axis2_env_t **env,
+                                            struct axis2_msg_ctx *in_msg_ctx,
+                                            struct axis2_msg_ctx *out_msg_ctx);
+    axis2_status_t (AXIS2_CALL *set_in_only)(axis2_msg_recv_t *msg_recv,
+                                                axis2_env_t **env,
+                                                axis2_bool_t in_only);
 };
 
 /** 
@@ -71,10 +84,12 @@
 
 /************************** Start of function macros **************************/
 
-#define AXIS2_MSG_RECV_FREE(msg_recv, env) (msg_recv->ops->free (msg_recv, env));
-
+#define AXIS2_MSG_RECV_FREE(msg_recv, env) (msg_recv->ops->free (msg_recv, env))
 #define AXIS2_MSG_RECV_RECEIVE(msg_recv, env, msg_ctx) \
-		(msg_recv->ops->receive (msg_recv, env, msg_ctx));
+		(msg_recv->ops->receive (msg_recv, env, msg_ctx))
+#define AXIS2_MSG_RECV_SET_IN_ONLY(msg_recv, env, in_only) \
+		(msg_recv->ops->set_in_only(msg_recv, env, in_only))
+
 
 /************************** End of function macros ****************************/
     

Modified: webservices/axis2/trunk/c/modules/core/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/Makefile.am?rev=357640&r1=357639&r2=357640&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/Makefile.am Sun Dec 18 21:31:02 2005
@@ -1 +1 @@
-SUBDIRS = context engine handlers phaseresolver transport description deployment addr
+SUBDIRS = context engine handlers phaseresolver transport description deployment addr clientapi