axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r373486 - in /webservices/axis2/trunk/c: include/ modules/core/clientapi/ modules/core/context/ modules/core/deployment/ modules/core/phaseresolver/ modules/util/
Date Mon, 30 Jan 2006 10:10:26 GMT
Author: damitha
Date: Mon Jan 30 02:10:05 2006
New Revision: 373486

URL: http://svn.apache.org/viewcvs?rev=373486&view=rev
Log:
Wrote stub.*

Modified:
    webservices/axis2/trunk/c/include/axis2_call.h
    webservices/axis2/trunk/c/include/axis2_error.h
    webservices/axis2/trunk/c/include/axis2_om_element.h
    webservices/axis2/trunk/c/include/axis2_stub.h
    webservices/axis2/trunk/c/include/axis2_transport_out_desc.h
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/clientapi/stub.c
    webservices/axis2/trunk/c/modules/core/context/conf_ctx.c
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c
    webservices/axis2/trunk/c/modules/util/error.c

Modified: webservices/axis2/trunk/c/include/axis2_call.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_call.h?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_call.h (original)
+++ webservices/axis2/trunk/c/include/axis2_call.h Mon Jan 30 02:10:05 2006
@@ -73,31 +73,6 @@
      */
     
     /**
-     * This invocation done via this method blocks till the result arrives, 
-     * using this method does not indicate
-     * anyhting about the transport used or the nature of the transport.
-     * e.g. invocation done with this method might
-     * <ol>
-     * <li>send request via http and recevie the response via the return path of the same http connection</li>
-     * <li>send request via http and recevie the response different http connection</li>
-     * <li>send request via an email smtp and recevie the response via an email</li>
-     * </ol>
-     */
-    
-    axis2_msg_ctx_t* (AXIS2_CALL *invoke_blocking)(struct axis2_call *call, 
-                                        axis2_env_t **env,
-                                        axis2_op_t *op,
-                                        axis2_msg_ctx_t *msg_ctx);
-    /**
-     * This invocation done via this method blocks till the result arrives, using this method does not indicate
-     * anyhting about the transport used or the nature of the transport.
-     */
-    axis2_status_t (AXIS2_CALL *invoke_non_blocking)(struct axis2_call *call, 
-                                        axis2_env_t **env,
-                                        axis2_op_t *op,
-                                        axis2_msg_ctx_t *msg_ctx,
-                                        axis2_callback_t *callback);
-    /**
      * @param to
      */
     axis2_status_t (AXIS2_CALL *set_to)(struct axis2_call *call, 
@@ -211,6 +186,17 @@
      */
     axis2_msg_ctx_t* (AXIS2_CALL *get_last_res_msg_ctx)(struct axis2_call *call, 
         axis2_env_t **env);
+    
+    /**
+     * @param key
+     * @param value
+     */
+    axis2_status_t (AXIS2_CALL *
+    set)(axis2_call_t *call,
+                    axis2_env_t **env,
+                    axis2_char_t *key,
+                    void *value);
+    
     axis2_status_t (AXIS2_CALL *free)(struct axis2_call *call, 
                                        axis2_env_t **env);
 };
@@ -229,19 +215,19 @@
     
 /************************** Start of function macros **************************/
 
-#define AXIS2_CALL_INVOKE_BLOCKING(call, env, op, msg_ctx) ((call)->ops->invoke_blocking(call, env, op, msg_ctx))
-#define AXIS2_CALL_INVOKE_NON_BLOCKING(call, env, op, msg_ctx, callback) ((call)->ops->invoke_non_blocking(call, env, op, msg_ctx, callback))
 #define AXIS2_CALL_SET_TO(call, env, to) ((call)->ops->set_to(call, env, to))
 #define AXIS2_CALL_SET_TRANSPORT_INFO(call, env, sender_transport, listener_transport, use_separate_listener) ((call)->ops->set_transport_info(call, env, sender_transport, listener_transport, use_separate_listener))
 #define AXIS2_CALL_CHECK_TRANSPORT(call, env, msg_ctx) ((call)->ops->check_transport(call, env, msg_ctx))
 #define AXIS2_CALL_CLOSE(call, env) ((call)->ops->close(call, env))
 #define AXIS2_CALL_SET_TIME(call, env, time_out_ms) ((call)->ops->set_time(call, env, time_out_ms))
-#define AXIS2_CALL_INVOKE_BLOCKING_WITH_OM ((call)->ops->invoke_blocking_with_om(call, env, op_name, om_node_to_send))
+#define AXIS2_CALL_INVOKE_BLOCKING_WITH_OM(call, env, op_name, om_node_to_send) ((call)->ops->invoke_blocking_with_om(call, env, op_name, om_node_to_send))
 #define AXIS2_CALL_INVOKE_BLOCKING_WITH_SOAP(call, env, op_name, envelope) ((call)->ops->invoke_blocking_with_soap(call, env, op_name, envelope))
 #define AXIS2_CALL_INVOKE_NON_BLOCKING_WITH_OM(call, env, op_name, om_node_to_send, callback) ((call)->ops->invoke_non_blocking_with_om(call, env, op_name, om_node_to_send, callback))
 #define AXIS2_CALL_INVOKE_NON_BLOCKING_WITH_SOAP(call, env, op_name, envelope, callback) ((call)->ops->invoke_non_blocking_with_soap(call, env, op_name, envelope, callback))
 #define AXIS2_CALL_CREATE_OP_FILL_FLOW(call, env, op_name) ((call)->ops->create_op_fill_flow(call, env, op_name))
 #define AXIS2_CALL_GET_LAST_RES_MSG_CTX(call, env) ((call)->ops->get_last_res_msg_ctx(call, env))
+#define AXIS2_CALL_SET(call, env, key, value) \
+        ((call)->ops->set(call, env, key, value))
 #define AXIS2_CALL_FREE(call, env) ((call)->ops->free(call, env))
 
 /************************** End of function macros ****************************/    

Modified: webservices/axis2/trunk/c/include/axis2_error.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_error.h?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/include/axis2_error.h Mon Jan 30 02:10:05 2006
@@ -455,6 +455,7 @@
         AXIS2_ERROR_FILE_NAME_NOT_SET,
         AXIS2_ERROR_REPOS_LISTENER_INIT_FAILED,
         AXIS2_ERROR_INVALID_STATE_DLL_DESC,
+        AXIS2_ERROR_UNSUPPORTED_TYPE,
         /* Null soap envelope in msg_ctx */
         AXIS2_ERROR_NULL_SOAP_ENVELOPE_IN_MSG_CTX,
         /* Generation of platform dependent uuid failed */

Modified: webservices/axis2/trunk/c/include/axis2_om_element.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_element.h?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_element.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_element.h Mon Jan 30 02:10:05 2006
@@ -297,7 +297,8 @@
          * @return the contanated text of all text childrens text values
          *         return null if no text children is avilable or on error
          */                                              
-        axis2_char_t* (AXIS2_CALL *get_text)(axis2_om_element_t *om_element,
+        axis2_char_t* (AXIS2_CALL *
+        get_text)(axis2_om_element_t *om_element,
                                              axis2_env_t **env,
                                              axis2_om_node_t *element_node);
         
@@ -306,19 +307,20 @@
          * @param element_node the container node of this om_element
          * @return om_element if one is availble otherwise return NULL
          */
-        axis2_om_element_t* (AXIS2_CALL *get_first_element)
-                                (axis2_om_element_t *om_element,
-                                 axis2_env_t **env,
-                                 axis2_om_node_t *element_node,
-                                 axis2_om_node_t **first_element_node);  
+        axis2_om_element_t* (AXIS2_CALL *
+        get_first_element)(axis2_om_element_t *om_element,
+                             axis2_env_t **env,
+                             axis2_om_node_t *element_node,
+                             axis2_om_node_t **first_element_node);  
         /**
          * returns the serilized text of this element and its children
          * @param element_node the container node this on element is contained 
          * @return a char array of xml , returns NULL on error
          */
-        axis2_char_t* (AXIS2_CALL *to_string)(axis2_om_element_t *om_element,
-                                              axis2_env_t **env,
-                                              axis2_om_node_t *element_node);
+        axis2_char_t* (AXIS2_CALL *
+        to_string)(axis2_om_element_t *om_element,
+                      axis2_env_t **env,
+                      axis2_om_node_t *element_node);
         /**
          * returns an iterator with child elements of type AXIS2_OM_ELEMENT
          * iterator must be freed by user
@@ -327,7 +329,8 @@
          * @param env enviroment must not be null
          * @returns axis2_om_child_element_iterator_t , NULL on error                                             
          */
-         axis2_om_child_element_iterator_t* (AXIS2_CALL *get_child_elements)
+         axis2_om_child_element_iterator_t* (AXIS2_CALL *
+         get_child_elements)
                         (axis2_om_element_t *om_element,
                          axis2_env_t **env,
                          axis2_om_node_t *element_node);                                                                     

Modified: webservices/axis2/trunk/c/include/axis2_stub.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_stub.h?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_stub.h (original)
+++ webservices/axis2/trunk/c/include/axis2_stub.h Mon Jan 30 02:10:05 2006
@@ -19,6 +19,8 @@
 
 #include <axis2_endpoint_ref.h>
 #include <axis2_call.h>
+#include <axis2_xml_reader.h>
+
 
 #ifdef __cplusplus
 extern "C"
@@ -38,7 +40,10 @@
 
 typedef struct axis2_stub_ops axis2_stub_ops_t;   
 typedef struct axis2_stub axis2_stub_t;
-  
+ 
+#define AXIS2_SOAP_11 0
+#define AXIS2_SOAP_12 1
+
 AXIS2_DECLARE_DATA struct axis2_stub_ops
 {
     axis2_status_t (AXIS2_CALL * 
@@ -55,79 +60,103 @@
                         axis2_env_t **env,
                         axis2_char_t *endpoint_uri);
     
-    axis2_status_t (AXIS2_CALL *
-    invoke_blocking) (axis2_stub_t *stub,
-                        axis2_env_t **env,
-                        axis2_msg_ctx_t *msg_ctx);
     
+    /**
+     *
+     * @param sender_transport
+     * @param listener_transport
+     * @param use_separate_transport
+     */
     axis2_status_t (AXIS2_CALL *
-    invoke_non_blocking) (axis2_stub_t *stub,
+    set_transport_info)(axis2_stub_t *stub,
                         axis2_env_t **env,
-                        axis2_msg_ctx_t *msg_ctx,
-                        axis2_callback_t *callback);
-                        
+                        axis2_char_t *sender_transport,
+                        axis2_char_t *listener_transport,
+                        axis2_bool_t use_separate_listener);
+    
     /**
-     * Invoke the blocking/Synchronous call
      *
-     * @param op - this will be used to identify the operation in the client 
-     *              side, without dispatching
-     * @param toSend - This should be OM Element (payload)
-     * @return
+     * @param key
+     * @param value
      */
-    axis2_om_node_t* (AXIS2_CALL *
-    invoke_blocking_with_om)(struct axis2_stub *stub, 
-                                axis2_env_t **env,
-                                axis2_char_t *op_name, 
-                                axis2_om_node_t *om_node_to_send);
+    axis2_status_t (AXIS2_CALL *
+    put)(axis2_stub_t *stub,
+            axis2_env_t **env,
+            axis2_char_t *key,
+            void *value);
+    
     /**
-     * Invoke the blocking/Synchronous call
      *
-     * @param op_name - this will be used to identify the operation in the client
-     *                      side, without dispatching
-     * @param envelope - This should be SOAPEnvelope
-     * @return
+     * @param key
+     * @return the object
      */
-    axis2_soap_envelope_t* (AXIS2_CALL *
-    invoke_blocking_with_soap)(struct axis2_stub *stub, 
-                                axis2_env_t **env,
-                                axis2_char_t *op_name, 
-                                axis2_soap_envelope_t *envelope);
+    void *(AXIS2_CALL *
+    get)(axis2_stub_t *stub,
+                    axis2_env_t **env,
+                    axis2_char_t *key);
+    
+    axis2_status_t (AXIS2_CALL *
+    engage_module)(axis2_stub_t *stub,
+                    axis2_env_t **env,
+                    axis2_char_t *module_name);
     
     /**
-     * Invoke the nonblocking/Asynchronous call
-     *
-     * @param op_name
-     * @param om_node_to_send   -  This should be OM Element (payload)
-     *                 invocation behaves accordingly
-     * @param callback
+     * Set the soap version
+     * @param soap_version
      */
     axis2_status_t (AXIS2_CALL *
-    invoke_non_blocking_with_om)(struct axis2_stub *stub, 
-                                    axis2_env_t **env,
-                                    axis2_char_t *op_name,
-                                    axis2_om_node_t *om_node_to_send,
-                                    axis2_callback_t *callback);
+    set_soap_version)(axis2_stub_t *stub,
+                        axis2_env_t **env,
+                        int soap_version);
+    
+    axis2_char_t *(AXIS2_CALL *
+    get_svc_ctx_id)(axis2_stub_t *stub,
+                    axis2_env_t **env);
+    
+    
+    axis2_om_node_t *(AXIS2_CALL *
+    get_element_from_reader)(axis2_stub_t *stub,
+                                axis2_env_t **env,
+                                axis2_xml_reader_t *reader);
+
+
+    axis2_status_t (AXIS2_CALL *
+    set_value_doc)(axis2_stub_t *stub,
+                    axis2_env_t **env,
+                    axis2_soap_envelope_t *envelope,
+                    axis2_om_node_t *value,
+                    axis2_bool_t is_header);
+
     /**
-     * Invoke the nonblocking/Asynchronous call
-     *
-     * @param op_name
-     * @param envelope   -  This should be a SOAP Envelope
-     *                 invocation behaves accordingly
-     * @param callback
+     * Extract the correct element - A util method
+     * @param env
+     * @param type
+     * @return the relevant element to be databound
      */
+    axis2_om_node_t *(AXIS2_CALL *
+    get_element)(axis2_stub_t *stub,
+                    axis2_env_t **env,
+                    axis2_soap_envelope_t *envelope,
+                    axis2_char_t *type);
     
     axis2_status_t (AXIS2_CALL *
-    invoke_non_blocking_with_soap)(struct axis2_stub *call, 
-                                    axis2_env_t **env,
-                                    axis2_char_t *op_name,
-                                    axis2_soap_envelope_t *envelope,
-                                    axis2_callback_t * callback);
+    populate_properties)(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            axis2_call_t *call);
+        
+    axis2_status_t (AXIS2_CALL *
+    populate_modules)(axis2_stub_t *stub,
+                        axis2_env_t **env,
+                        axis2_call_t *call); 
+
+    axis2_call_t *(AXIS2_CALL *
+    get_call_obj)(axis2_stub_t *stub,
+                            axis2_env_t **env);
 } ;
 
 AXIS2_DECLARE_DATA struct axis2_stub 
 {
-    axis2_stub_ops_t *ops; 
-    axis2_array_list_t *func_array;
+    axis2_stub_ops_t *ops;
 };
 
 /**
@@ -159,23 +188,44 @@
 #define AXIS2_STUB_SET_ENDPOINT_URI(stub, env, endpoint_uri) \
 		((stub)->ops->set_endpoint_uri (stub, env, endpoint_uri))
         
-#define AXIS2_STUB_INVOKE_BLOCKING(stub, env, msg_ctx) \
-		((stub)->ops->invoke_blocking (stub, env, msg_ctx))  
+#define AXIS2_STUB_SET_TRANSPORT_INFO(stub, env, sender_transport, listener_transport, \
+        use_separate_listener) \
+		((stub)->ops->set_transport_info (stub, env, sender_transport, \
+        listener_transport, use_separate_listener))  
 
-#define AXIS2_STUB_INVOKE_NON_BLOCKING(stub, env, msg_ctx, callback) \
-		((stub)->ops->invoke_non_blocking (stub, env, msg_ctx, callback))
+#define AXIS2_STUB_PUT(stub, env, key, value) \
+		((stub)->ops->put (stub, env, key, value))
+        
+#define AXIS2_STUB_GET(stub, env, key) \
+		((stub)->ops->get (stub, env, key))
 
-#define AXIS2_STUB_INVOKE_BLOCKING_WITH_OM(stub, env, op_name, om_node_to_send) \
-		((stub)->ops->invoke_blocking_with_om (stub, env, op_name, om_node_to_send))  
+#define AXIS2_STUB_ENGAGE_MODULE(stub, env, module_name) \
+		((stub)->ops->engage_module (stub, env, module_name))
+        
+#define AXIS2_STUB_SET_SOAP_VERSION(stub, env, soap_version) \
+		((stub)->ops->set_soap_version (stub, env, soap_version))
 
-#define AXIS2_STUB_INVOKE_NON_BLOCKING_WITH_OM(stub, env, op_name, om_node_to_send, callback) \
-		((stub)->ops->invoke_non_blocking_with_om (stub, env, op_name, om_node_to_send, callback))
+#define AXIS2_STUB_GET_SVC_CTX_ID(stub, env) \
+		((stub)->ops->get_svc_ctx_id (stub, env))
         
-#define AXIS2_STUB_INVOKE_BLOCKING_WITH_SOAP(stub, env, op_name, envelope) \
-		((stub)->ops->invoke_blocking_with_soap (stub, env, op_name, envelope))  
+#define AXIS2_STUB_GET_ELEMENT_FROM_READER(stub, env, reader) \
+		((stub)->ops->get_element_from_reader (stub, env, reader))
 
-#define AXIS2_STUB_INVOKE_NON_BLOCKING_WITH_SOAP(stub, env, op_name, envelope, callback) \
-		((stub)->ops->invoke_non_blocking_with_soap (stub, env, op_name, envelope, callback))
+#define AXIS2_STUB_SET_VALUE_DOC(stub, env, envelope, value, is_header) \
+		((stub)->ops->set_value_doc (stub, env, envelope, value, is_header))
+        
+#define AXIS2_STUB_GET_ELEMENT(stub, env, envelope, type) \
+		((stub)->ops->get_element (stub, env, envelope, type))
+
+#define AXIS2_STUB_POPULATE_PROPERTIES(stub, env, call) \
+		((stub)->ops->populate_properties (stub, env, call))
+        
+#define AXIS2_STUB_POPULATE_MODULES(stub, env, call) \
+		((stub)->ops->populate_modules (stub, env, call))
+
+#define AXIS2_STUB_GET_CALL_OBJ(stub, env) \
+		((stub)->ops->get_call_obj (stub, env))
+        
         
 /** @} */
 

Modified: webservices/axis2/trunk/c/include/axis2_transport_out_desc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_transport_out_desc.h?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_transport_out_desc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_transport_out_desc.h Mon Jan 30 02:10:05 2006
@@ -68,66 +68,66 @@
      */
     axis2_qname_t *(AXIS2_CALL *
     get_qname) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env);
+                axis2_env_t **env);
     
     /**
      * @param name
      */
     axis2_status_t (AXIS2_CALL *
     set_qname) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env,
-                                            axis2_qname_t *qname);
+                axis2_env_t **env,
+                axis2_qname_t *qname);
     
     struct axis2_flow *(AXIS2_CALL *
     get_outflow) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env);
+                    axis2_env_t **env);
     
     axis2_status_t (AXIS2_CALL *
     set_outflow) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env,
-                                            struct axis2_flow *outflow);
+                    axis2_env_t **env,
+                    struct axis2_flow *outflow);
     
     struct axis2_flow *(AXIS2_CALL *
     get_faultflow) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env);
+                    axis2_env_t **env);
     
     axis2_status_t (AXIS2_CALL *
     set_faultflow) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env,
-                                            struct axis2_flow *faultflow);
+                    axis2_env_t **env,
+                    struct axis2_flow *faultflow);
     
     /**
      * @return
      */
     struct axis2_transport_sender * (AXIS2_CALL *
     get_sender) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env);
+                    axis2_env_t **env);
     
     /**
      * @param receiver
      */
     axis2_status_t (AXIS2_CALL *
     set_sender) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env,
-                                            struct axis2_transport_sender *sender);
+                    axis2_env_t **env,
+                    struct axis2_transport_sender *sender);
     
     struct axis2_phase * (AXIS2_CALL *
     get_out_phase) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env);
+                    axis2_env_t **env);
     
     axis2_status_t (AXIS2_CALL *
     set_out_phase) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env,
-                                            struct axis2_phase *out_phase);
+                    axis2_env_t **env,
+                    struct axis2_phase *out_phase);
     
     struct axis2_phase *(AXIS2_CALL *
     get_faultphase) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env);
+                        axis2_env_t **env);
     
     axis2_status_t (AXIS2_CALL *
     set_faultphase) (struct axis2_transport_out_desc *transport_out,
-                                            axis2_env_t **env,
-                                            struct axis2_phase *faultphase);
+                        axis2_env_t **env,
+                        struct axis2_phase *faultphase);
         
 
 };

Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Mon Jan 30 02:10:05 2006
@@ -64,52 +64,86 @@
 /** Interface to implementation conversion macro */
 #define AXIS2_INTF_TO_IMPL(call) ((axis2_call_impl_t *)call)
 
-axis2_msg_ctx_t* AXIS2_CALL axis2_call_invoke_blocking(struct axis2_call *call, 
+axis2_msg_ctx_t* AXIS2_CALL 
+axis2_call_invoke_blocking(struct axis2_call *call, 
                                     axis2_env_t **env,
                                     axis2_op_t *op,
                                     axis2_msg_ctx_t *msg_ctx);
-axis2_status_t AXIS2_CALL axis2_call_invoke_non_blocking(struct axis2_call *call, 
+
+axis2_status_t AXIS2_CALL 
+axis2_call_invoke_non_blocking(struct axis2_call *call, 
                                     axis2_env_t **env,
                                     axis2_op_t *op,
                                     axis2_msg_ctx_t *msg_ctx,
                                     axis2_callback_t *callback);
-axis2_status_t AXIS2_CALL axis2_call_set_to(struct axis2_call *call, 
-    axis2_env_t **env,
-    axis2_endpoint_ref_t *to);
-axis2_status_t AXIS2_CALL axis2_call_set_transport_info(struct axis2_call *call, 
+
+axis2_status_t AXIS2_CALL 
+axis2_call_set_to(struct axis2_call *call, 
+                    axis2_env_t **env,
+                    axis2_endpoint_ref_t *to);
+
+axis2_status_t AXIS2_CALL 
+axis2_call_set_transport_info(struct axis2_call *call, 
                             axis2_env_t **env,
                             axis2_char_t *sender_transport,
                              axis2_char_t *listener_transport,
                              axis2_bool_t use_separate_listener);
-axis2_status_t AXIS2_CALL axis2_call_check_transport(struct axis2_call *call, 
-    axis2_env_t **env,
-    axis2_msg_ctx_t *msg_ctx);
-axis2_status_t AXIS2_CALL axis2_call_close(struct axis2_call *call, 
-    axis2_env_t **env);
-axis2_status_t AXIS2_CALL axis2_call_set_time(struct axis2_call *call, 
-    axis2_env_t **env,
-    long timeout_ms);
-axis2_om_node_t* AXIS2_CALL axis2_call_invoke_blocking_with_om(struct axis2_call *call, 
-    axis2_env_t **env,
-    axis2_char_t *op_name, axis2_om_node_t *om_node_to_send);
-axis2_soap_envelope_t* AXIS2_CALL axis2_call_invoke_blocking_with_soap(struct axis2_call *call, 
-    axis2_env_t **env,
-    axis2_char_t *op_name, axis2_soap_envelope_t *envelope);
-axis2_status_t AXIS2_CALL axis2_call_invoke_non_blocking_with_om(struct axis2_call *call, 
-    axis2_env_t **env,
-    axis2_char_t *op_name,
-    axis2_om_node_t *om_node_to_send,
-    axis2_callback_t *callback);
-axis2_status_t AXIS2_CALL axis2_call_invoke_non_blocking_with_soap(struct axis2_call *call, 
-    axis2_env_t **env,
-    axis2_char_t *op_name,
-    axis2_soap_envelope_t *envelope,
-    axis2_callback_t * callback);
-axis2_op_t* AXIS2_CALL axis2_call_create_op_fill_flow(struct axis2_call *call, 
-    axis2_env_t **env,
-    axis2_char_t *op_name);
-axis2_msg_ctx_t* AXIS2_CALL axis2_call_get_last_res_msg_ctx(struct axis2_call *call, 
-    axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_call_check_transport(struct axis2_call *call, 
+                            axis2_env_t **env,
+                            axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL 
+axis2_call_close(struct axis2_call *call, 
+                    axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_call_set_time(struct axis2_call *call, 
+                    axis2_env_t **env,
+                    long timeout_ms);
+
+axis2_om_node_t* AXIS2_CALL 
+axis2_call_invoke_blocking_with_om(struct axis2_call *call, 
+                                    axis2_env_t **env,
+                                    axis2_char_t *op_name, 
+                                    axis2_om_node_t *om_node_to_send);
+
+axis2_soap_envelope_t* AXIS2_CALL 
+axis2_call_invoke_blocking_with_soap(struct axis2_call *call, 
+                                        axis2_env_t **env,
+                                        axis2_char_t *op_name, 
+                                        axis2_soap_envelope_t *envelope);
+
+axis2_status_t AXIS2_CALL 
+axis2_call_invoke_non_blocking_with_om(struct axis2_call *call, 
+                                        axis2_env_t **env,
+                                        axis2_char_t *op_name,
+                                        axis2_om_node_t *om_node_to_send,
+                                        axis2_callback_t *callback);
+
+axis2_status_t AXIS2_CALL 
+axis2_call_invoke_non_blocking_with_soap(struct axis2_call *call, 
+                                            axis2_env_t **env,
+                                            axis2_char_t *op_name,
+                                            axis2_soap_envelope_t *envelope,
+                                            axis2_callback_t * callback);
+
+axis2_op_t* AXIS2_CALL 
+axis2_call_create_op_fill_flow(struct axis2_call *call, 
+                                axis2_env_t **env,
+                                axis2_char_t *op_name);
+
+axis2_msg_ctx_t* AXIS2_CALL 
+axis2_call_get_last_res_msg_ctx(struct axis2_call *call, 
+                                    axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_call_set(axis2_call_t *call,
+                axis2_env_t **env,
+                axis2_char_t *key,
+                void *value);
+
 axis2_status_t AXIS2_CALL axis2_call_free(struct axis2_call *call, 
                                    axis2_env_t **env);
 
@@ -139,9 +173,12 @@
     call_impl->listener_manager = NULL;
     call_impl->op_template = NULL;
     call_impl->last_res_msg_ctx = NULL;
+    call_impl->svc_ctx = NULL;
     
-    if (svc_ctx)
+    if(svc_ctx)
+    {
         call_impl->svc_ctx = svc_ctx;
+    }
     
     call_impl->base = axis2_mep_client_create(env, svc_ctx, AXIS2_MEP_URI_OUT_IN);
     if (!(call_impl->base))
@@ -165,9 +202,6 @@
         axis2_call_free(&(call_impl->call), env);
         return NULL;        
     }
-
-    call_impl->call.ops->invoke_blocking = axis2_call_invoke_blocking;
-    call_impl->call.ops->invoke_non_blocking = axis2_call_invoke_non_blocking;
     call_impl->call.ops->set_to = axis2_call_set_to;
     call_impl->call.ops->set_transport_info = axis2_call_set_transport_info;
     call_impl->call.ops->check_transport = axis2_call_check_transport;
@@ -179,6 +213,7 @@
     call_impl->call.ops->invoke_non_blocking_with_soap = axis2_call_invoke_non_blocking_with_soap;
     call_impl->call.ops->create_op_fill_flow = axis2_call_create_op_fill_flow;
     call_impl->call.ops->get_last_res_msg_ctx = axis2_call_get_last_res_msg_ctx;    
+    call_impl->call.ops->set = axis2_call_set;
     call_impl->call.ops->free = axis2_call_free;
 
     return &(call_impl->call);
@@ -263,10 +298,12 @@
     axis2_call_impl_t *call_impl = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
     axis2_svc_ctx_t *svc_ctx = NULL;
+    axis2_svc_t *svc = NULL;
     
     AXIS2_FUNC_PARAM_CHECK(call, env, AXIS2_FAILURE);
     
     call_impl = AXIS2_INTF_TO_IMPL(call);
+    svc = AXIS2_SVC_CTX_GET_SVC(call_impl->svc_ctx, env);
     
     status = AXIS2_MEP_CLIENT_PREPARE_INVOCATION(call_impl->base, env, op, msg_ctx);
     if (status != AXIS2_SUCCESS)
@@ -1018,6 +1055,10 @@
         axis2_svc_t *svc = NULL;
         
         op = axis2_op_create_with_qname(env, op_qname);
+        if(!op)
+        {
+            return AXIS2_FAILURE;   
+        }
         AXIS2_OP_SET_REMAINING_PHASES_INFLOW(op, env, 
             AXIS2_OP_GET_REMAINING_PHASES_INFLOW(call_impl->op_template, env));
         AXIS2_OP_SET_PHASES_OUTFLOW(op, env, 
@@ -1037,6 +1078,36 @@
     }
         
     return op;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_call_set(axis2_call_t *call,
+                axis2_env_t **env,
+                axis2_char_t *key,
+                void *value)
+{
+    axis2_call_impl_t *call_impl = NULL;
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_ctx_t *conf_ctx_base = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, key, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, value, AXIS2_FAILURE);
+    call_impl = AXIS2_INTF_TO_IMPL(call);
+    
+    conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(call_impl->svc_ctx, env);
+    if(!conf_ctx)
+    {
+        return AXIS2_FAILURE;
+    }
+    conf_ctx_base = AXIS2_CONF_CTX_GET_BASE(conf_ctx, env);
+    if(!conf_ctx_base)
+    {
+        return AXIS2_FAILURE;
+    }
+    status = AXIS2_CTX_SET_PROPERTY(conf_ctx_base, env, key, value, AXIS2_FALSE);
+    return status;
 }
 
 /**

Modified: webservices/axis2/trunk/c/modules/core/clientapi/stub.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/stub.c?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Mon Jan 30 02:10:05 2006
@@ -15,7 +15,11 @@
  */
  
 #include <axis2_stub.h>
-#include <string.h>
+#include <axis2_http_transport.h>
+#include <axis2_wsdl_svc.h>
+#include <axis2_om_stax_builder.h>
+#include <axis2_soap_header.h>
+#include <axis2_soap_body.h>
 
 /** 
  * @brief
@@ -25,6 +29,26 @@
 	axis2_stub_t stub;
     
     axis2_call_t *call;
+    
+    axis2_conf_ctx_t *conf_ctx;
+    axis2_svc_t *svc;
+    axis2_svc_ctx_t *svc_ctx;
+    axis2_endpoint_ref_t *to_epr;
+    axis2_bool_t do_rest;
+    axis2_char_t *sender_transport;
+    axis2_char_t *listener_transport;
+    axis2_bool_t use_separate_listener;
+    /*Default SOAP version is 11 */
+    int soap_version;
+    axis2_hash_t *property_map;
+    axis2_array_list_t *modules;
+    /**
+     * If _maintainSession is set to True all the calls will use the same
+     * ServiceContext and the user can Share information through that
+     * ServiceContext across operations.
+     */
+    axis2_bool_t maintain_session;
+    axis2_char_t *current_session_id;
     	
 } axis2_stub_impl_t;
 
@@ -46,7 +70,101 @@
 axis2_stub_set_endpoint_uri (axis2_stub_t *stub,
                                 axis2_env_t **env,
                                 axis2_char_t *endpoint_uri);
+                        
+/**
+ *
+ * @param sender_transport
+ * @param listener_transport
+ * @param use_separate_transport
+ */
+axis2_status_t AXIS2_CALL
+axis2_stub_set_transport_info(axis2_stub_t *stub,
+                                axis2_env_t **env,
+                                axis2_char_t *sender_transport,
+                                axis2_char_t *listener_transport,
+                                axis2_bool_t use_separate_listener);
+
+/**
+ *
+ * @param key
+ * @param value
+ */
+axis2_status_t AXIS2_CALL
+axis2_stub_put(axis2_stub_t *stub,
+                axis2_env_t **env,
+                axis2_char_t *key,
+                void *value);
+
+/**
+ *
+ * @param key
+ * @return the object
+ */
+void *AXIS2_CALL
+axis2_stub_get(axis2_stub_t *stub,
+                axis2_env_t **env,
+                axis2_char_t *key);
+
+axis2_status_t AXIS2_CALL
+axis2_stub_engage_module(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            axis2_char_t *module_name);
+
+/**
+ * Set the soap version
+ * @param soap_version
+ */
+axis2_status_t AXIS2_CALL
+axis2_stub_set_soap_version(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            int soap_version);
 
+axis2_char_t *AXIS2_CALL
+axis2_stub_get_svc_ctx_id(axis2_stub_t *stub,
+                            axis2_env_t **env);
+
+axis2_char_t *
+axis2_stub_get_id(axis2_stub_t *stub,
+                        axis2_env_t **env);
+
+axis2_om_node_t *AXIS2_CALL
+axis2_stub_get_element_from_reader(axis2_stub_t *stub,
+                                    axis2_env_t **env,
+                                    axis2_xml_reader_t *reader);
+
+
+axis2_status_t AXIS2_CALL
+axis2_stub_set_value_doc(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            axis2_soap_envelope_t *envelope,
+                            axis2_om_node_t *value,
+                            axis2_bool_t is_header);
+
+/**
+ * Extract the correct element - A util method
+ * @param env
+ * @param type
+ * @return the relevant element to be databound
+ */
+axis2_om_node_t *AXIS2_CALL
+axis2_stub_get_element(axis2_stub_t *stub,
+                        axis2_env_t **env,
+                        axis2_soap_envelope_t *envelope,
+                        axis2_char_t *type);
+
+axis2_status_t AXIS2_CALL
+axis2_stub_populate_properties(axis2_stub_t *stub,
+                                axis2_env_t **env,
+                                axis2_call_t *call);
+
+axis2_status_t AXIS2_CALL
+axis2_stub_populate_modules(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            axis2_call_t *call);
+
+axis2_call_t *AXIS2_CALL
+axis2_stub_get_call_obj(axis2_stub_t *stub,
+                        axis2_env_t **env);
 
 /************************** End of function prototypes ************************/
 
@@ -67,8 +185,49 @@
     }
     
     stub_impl->call = NULL;
+    stub_impl->conf_ctx = NULL;
+    stub_impl->svc = NULL;
+    stub_impl->svc_ctx = NULL;
+    stub_impl->to_epr = NULL;
+    stub_impl->do_rest = AXIS2_FALSE;
+    stub_impl->sender_transport = NULL;
+    stub_impl->listener_transport = NULL;
+    stub_impl->use_separate_listener = AXIS2_FALSE;
+    /* Default SOAP version is 11 */
+    stub_impl->soap_version = AXIS2_SOAP_11;
+    stub_impl->property_map = NULL;
+    stub_impl->modules = NULL;
+    stub_impl->maintain_session = AXIS2_FALSE;
+    stub_impl->current_session_id = NULL;
     stub_impl->stub.ops = NULL;
     
+    stub_impl->sender_transport = AXIS2_STRDUP(AXIS2_TRANSPORT_HTTP, env);
+    if(!stub_impl->sender_transport)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    } 
+    stub_impl->listener_transport = AXIS2_STRDUP(AXIS2_TRANSPORT_HTTP, env);
+    if(!stub_impl->sender_transport)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    stub_impl->property_map = axis2_hash_make(env);
+    if(!stub_impl->property_map)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    stub_impl->modules = axis2_array_list_create(env, 0);
+    if(!stub_impl->modules)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
 	stub_impl->stub.ops = 
 		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_stub_ops_t));
 	if(NULL == stub_impl->stub.ops)
@@ -81,7 +240,19 @@
 	stub_impl->stub.ops->free = axis2_stub_free;
     stub_impl->stub.ops->set_endpoint_ref = axis2_stub_set_endpoint_ref;
     stub_impl->stub.ops->set_endpoint_uri = axis2_stub_set_endpoint_uri;
-	
+    stub_impl->stub.ops->set_transport_info = axis2_stub_set_transport_info;
+    stub_impl->stub.ops->put = axis2_stub_put;
+    stub_impl->stub.ops->get = axis2_stub_get;
+    stub_impl->stub.ops->engage_module = axis2_stub_engage_module;
+    stub_impl->stub.ops->set_soap_version = axis2_stub_set_soap_version;
+    stub_impl->stub.ops->get_svc_ctx_id = axis2_stub_get_svc_ctx_id;
+    stub_impl->stub.ops->get_element_from_reader = 
+            axis2_stub_get_element_from_reader;
+    stub_impl->stub.ops->set_value_doc = axis2_stub_set_value_doc;
+    stub_impl->stub.ops->get_element = axis2_stub_get_element;
+    stub_impl->stub.ops->populate_properties = axis2_stub_populate_properties;
+    stub_impl->stub.ops->populate_modules = axis2_stub_populate_modules;
+	stub_impl->stub.ops->get_call_obj = axis2_stub_get_call_obj;
 	return &(stub_impl->stub);
 }
 
@@ -150,7 +321,7 @@
 {
     axis2_stub_impl_t *stub_impl = NULL;
     
-    AXIS2_FUNC_PARAM_CHECK(stub, env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
     stub_impl = AXIS2_INTF_TO_IMPL(stub);
     
@@ -182,7 +353,7 @@
 {
     axis2_stub_impl_t *stub_impl = NULL;
     
-    AXIS2_FUNC_PARAM_CHECK(stub,env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, endpoint_ref, AXIS2_FAILURE);
     stub_impl = AXIS2_INTF_TO_IMPL(stub);
     
@@ -197,7 +368,7 @@
     axis2_stub_impl_t *stub_impl = NULL;
     axis2_endpoint_ref_t *endpoint_ref = NULL;
     
-    AXIS2_FUNC_PARAM_CHECK(stub,env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, endpoint_uri, AXIS2_FAILURE);
     stub_impl = AXIS2_INTF_TO_IMPL(stub);
     
@@ -208,3 +379,377 @@
     }
     return AXIS2_CALL_SET_TO(stub_impl->call, env, endpoint_ref);
 }
+
+/**
+ *
+ * @param sender_transport
+ * @param listener_transport
+ * @param use_separate_transport
+ */
+axis2_status_t AXIS2_CALL
+axis2_stub_set_transport_info(axis2_stub_t *stub,
+                                axis2_env_t **env,
+                                axis2_char_t *sender_transport,
+                                axis2_char_t *listener_transport,
+                                axis2_bool_t use_separate_listener)
+{
+    axis2_stub_impl_t *stub_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, sender_transport, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, listener_transport, AXIS2_FAILURE);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    if(stub_impl->sender_transport)
+    {
+        AXIS2_FREE((*env)->allocator, stub_impl->sender_transport);
+        stub_impl->sender_transport = NULL;
+    }
+    stub_impl->sender_transport = sender_transport;
+    
+    if(stub_impl->listener_transport)
+    {
+        AXIS2_FREE((*env)->allocator, stub_impl->listener_transport);
+        stub_impl->listener_transport = NULL;
+    }
+    stub_impl->listener_transport = listener_transport;
+    stub_impl->use_separate_listener = use_separate_listener;
+    return AXIS2_SUCCESS;
+}
+
+/**
+ *
+ * @param key
+ * @param value
+ */
+axis2_status_t AXIS2_CALL
+axis2_stub_put(axis2_stub_t *stub,
+                axis2_env_t **env,
+                axis2_char_t *key,
+                void *value)
+{
+    axis2_stub_impl_t *stub_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, key, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, value, AXIS2_FAILURE);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    axis2_hash_set(stub_impl->property_map, key, AXIS2_HASH_KEY_STRING, value);
+    return AXIS2_SUCCESS;
+}
+
+/**
+ *
+ * @param key
+ * @return the object
+ */
+void *AXIS2_CALL
+axis2_stub_get(axis2_stub_t *stub,
+                axis2_env_t **env,
+                axis2_char_t *key)
+{
+    axis2_stub_impl_t *stub_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, key, AXIS2_FAILURE);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    return axis2_hash_get(stub_impl->property_map, key, AXIS2_HASH_KEY_STRING);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_stub_engage_module(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            axis2_char_t *module_name)
+{
+    axis2_stub_impl_t *stub_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, module_name, AXIS2_FAILURE);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    return AXIS2_ARRAY_LIST_ADD(stub_impl->modules, env, module_name);
+}
+
+/**
+ * Set the soap version
+ * @param soap_version
+ */
+axis2_status_t AXIS2_CALL
+axis2_stub_set_soap_version(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            int soap_version)
+{
+    axis2_stub_impl_t *stub_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    stub_impl->soap_version = soap_version;
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_stub_get_svc_ctx_id(axis2_stub_t *stub,
+                            axis2_env_t **env)
+{
+    axis2_stub_impl_t *stub_impl = NULL;
+    axis2_char_t *svc_ctx_id = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    if(stub_impl->maintain_session)
+    {
+        svc_ctx_id = stub_impl->current_session_id;
+    }
+    else
+    {
+        svc_ctx_id = axis2_stub_get_id(stub, env);
+    }
+    return svc_ctx_id;
+}
+
+axis2_char_t *
+axis2_stub_get_id(axis2_stub_t *stub,
+                        axis2_env_t **env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+
+    /* TODO Get the UUID generator to generate values */
+    return "uuid";
+}
+
+axis2_om_node_t *AXIS2_CALL
+axis2_stub_get_element_from_reader(axis2_stub_t *stub,
+                                axis2_env_t **env,
+                                axis2_xml_reader_t *reader)
+{
+    axis2_om_stax_builder_t *builder = NULL;
+    axis2_om_document_t *document = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, reader, NULL);
+    
+    /** create axis2_om_stax_builder by parsing pull_parser struct */
+    builder = axis2_om_stax_builder_create (env, reader);
+    if(!builder)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
+            AXIS2_FAILURE)
+        return NULL;
+    }
+    document = AXIS2_OM_STAX_BUILDER_GET_DOCUMENT(builder, env);
+    return AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(document, env);
+    
+}
+ 
+axis2_status_t AXIS2_CALL
+axis2_stub_set_value_doc(axis2_stub_t *stub,
+                            axis2_env_t **env,
+                            axis2_soap_envelope_t *envelope,
+                            axis2_om_node_t *value,
+                            axis2_bool_t is_header)
+{
+    axis2_status_t status = AXIS2_FAILURE;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, envelope, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, value, AXIS2_FAILURE);
+    
+    if(is_header)
+    {
+        axis2_soap_header_t *soap_header = NULL;
+        
+        soap_header = AXIS2_SOAP_ENVELOPE_GET_HEADER(envelope, env);
+        if(!soap_header)
+        {
+            return AXIS2_FAILURE;
+        }
+        status = AXIS2_SOAP_HEADER_SET_BASE_NODE(soap_header, env, value);
+    }
+    else
+    {
+        axis2_soap_body_t *body = NULL;
+        
+        body = AXIS2_SOAP_ENVELOPE_GET_BODY(envelope, env);
+        if(!body)
+        {
+            return AXIS2_FAILURE;
+        }
+        status = AXIS2_SOAP_BODY_SET_BASE_NODE(body, env, value);
+    }
+    return status;
+}
+
+/**
+ * Extract the correct element - A util method
+ * @param env
+ * @param type
+ * @return the relevant element to be databound
+ */
+axis2_om_node_t *AXIS2_CALL
+axis2_stub_get_element(axis2_stub_t *stub,
+                        axis2_env_t **env,
+                        axis2_soap_envelope_t *envelope,
+                        axis2_char_t *type)
+{
+    axis2_soap_body_t *body = NULL;
+    axis2_om_node_t *node = NULL;
+    
+    body = AXIS2_SOAP_ENVELOPE_GET_BODY(envelope, env);
+    node = AXIS2_SOAP_BODY_GET_BASE_NODE(body, env);
+    if(0 == AXIS2_STRCMP(AXIS2_STYLE_RPC, type))
+    {
+        /* todo this needs to be fixed */
+        return AXIS2_OM_NODE_GET_FIRST_CHILD(node, env);
+    }
+    else if(0 == AXIS2_STRCMP(AXIS2_STYLE_DOC, type))
+    {
+        return node;
+    }
+    else
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_UNSUPPORTED_TYPE, 
+            AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+}
+
+axis2_status_t AXIS2_CALL
+axis2_stub_populate_properties(axis2_stub_t *stub,
+                    axis2_env_t **env,
+                    axis2_call_t *call)
+{
+    axis2_hash_index_t *index = NULL;
+    axis2_stub_impl_t *stub_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, call, AXIS2_FAILURE);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    for(index = axis2_hash_first(stub_impl->property_map, env); index; index = 
+        axis2_hash_next(env, index))
+    {
+        void *key = NULL;
+        void *val = NULL;
+        
+        axis2_hash_this(index, &key, NULL, &val);
+        AXIS2_CALL_SET(call, env, key, val);
+        
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_stub_populate_modules(axis2_stub_t *stub,
+                    axis2_env_t **env,
+                    axis2_call_t *call)
+{
+    axis2_stub_impl_t *stub_impl = NULL;
+    int i = 0;
+    int size = 0;
+    axis2_status_t status = AXIS2_FAILURE;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, call, AXIS2_FAILURE);
+    stub_impl = AXIS2_INTF_TO_IMPL(stub);
+    
+    size = AXIS2_ARRAY_LIST_SIZE(stub_impl->modules, env);
+    for (i = 0; i < size; i++)
+    {
+        axis2_qname_t *module_qname = NULL;
+        axis2_char_t *module_name = NULL;
+        
+        module_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(stub_impl->modules,
+            env, i);
+        module_qname = axis2_qname_create(env, module_name, NULL, NULL);
+        /* TODO uncomment this when method is available
+        status = AXIS2_CALL_ENGAGE_MODULE(stub_impl->call, env, modue_qname);
+        */
+        if(AXIS2_SUCCESS != status)
+        {
+            return status;
+        }
+        AXIS2_QNAME_FREE(module_qname, env);
+        module_qname = NULL;
+    }
+    return status;
+}
+
+axis2_call_t *AXIS2_CALL
+axis2_stub_get_call_obj(axis2_stub_t *stub,
+                        axis2_env_t **env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    return AXIS2_INTF_TO_IMPL(stub)->call;
+}
+
+/**
+ *
+ * @param doRest
+ */
+/*    public void setDoREST(boolean doRest) {
+        this.doRest = doRest;
+    }
+*/
+
+/*
+protected void setValueRPC(SOAPEnvelope env,
+                           String methodNamespaceURI,
+                           String methodName,
+                           String[] paramNames,
+                           Object[] values) {
+    SOAPBody body = env.getBody();
+    OMFactory fac = this.getFactory(this.soapVesrion);
+
+    OMNamespace methodNamespace = fac.createOMNamespace(methodNamespaceURI,
+            "ns1");
+    OMElement elt = fac.createOMElement(methodName, methodNamespace);
+    if (paramNames != null) {
+        //find the relevant object here, convert it and add it to the elt
+        for (int i = 0; i < paramNames.length; i++) {
+            String paramName = paramNames[i];
+            Object value = values[i];
+            elt.addChild(StubSupporter.createRPCMappedElement(paramName,
+                    fac.createOMNamespace("", null), //empty namespace
+                    value,
+                    fac));
+        }
+    }
+    body.addChild(elt);
+}
+*/
+
+/*
+public void _setSessionInfo(String key, Object value) throws java.lang.Exception {
+    if (!_maintainSession) {
+        //TODO Comeup with a Exception
+        throw new java.lang.Exception(
+                "Client is running the session OFF mode: Start session before saving to a session ");
+    }
+    _configurationContext.getServiceContext(_currentSessionId).setProperty(
+            key, value);
+}
+
+
+public Object _getSessionInfo(String key) throws java.lang.Exception {
+    if (!_maintainSession) {
+        //TODO Comeup with a Exception
+        throw new java.lang.Exception(
+                "Client is running the session OFF mode: Start session before saving to a session ");
+    }
+    return _configurationContext.getServiceContext(_currentSessionId)
+            .getProperty(key);
+}
+
+public void _startSession() {
+    _maintainSession = true;
+    _currentSessionId = getID();
+}
+
+public void _endSession() {
+    _maintainSession = false;
+}
+*/

Modified: webservices/axis2/trunk/c/modules/core/context/conf_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/conf_ctx.c?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/conf_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/conf_ctx.c Mon Jan 30 02:10:05 2006
@@ -551,4 +551,3 @@
     AXIS2_MSG_CTX_SET_SVC_GRP_CTX(msg_ctx, env, svc_grp_ctx);
     return svc_grp_ctx;
 }
-

Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Mon Jan 30 02:10:05 2006
@@ -246,11 +246,11 @@
 axis2_build_OM(axis2_desc_builder_t *desc_builder,
                 axis2_env_t **env) 
 {
-    struct axis2_desc_builder_impl *builder_impl = NULL;
-    struct axis2_om_stax_builder *builder = NULL;
-    struct axis2_xml_reader *reader = NULL;
-    struct axis2_om_document *document = NULL;
-    struct axis2_om_node *root = NULL;
+    axis2_desc_builder_impl_t *builder_impl = NULL;
+    axis2_om_stax_builder_t *builder = NULL;
+    axis2_xml_reader_t *reader = NULL;
+    axis2_om_document_t *document = NULL;
+    axis2_om_node_t *root = NULL;
     
     AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
     
@@ -299,14 +299,14 @@
     return root;
 }
 
-struct axis2_flow *AXIS2_CALL
+axis2_flow_t *AXIS2_CALL
 axis2_desc_builder_process_flow(axis2_desc_builder_t *desc_builder,
                                 axis2_env_t **env,
                                 axis2_om_element_t *flow_element,
                                 axis2_param_container_t *parent,
                                 axis2_om_node_t *flow_node)
 {
-    struct axis2_flow *flow = NULL;
+    axis2_flow_t *flow = NULL;
     axis2_om_children_qname_iterator_t *handlers = NULL;
     axis2_qname_t *child = NULL;
         
@@ -358,9 +358,9 @@
                                     struct axis2_param_container *parent)
 {
     axis2_handler_desc_t *handler = NULL;
-    struct axis2_om_attribute *name_attrib = NULL;
+    axis2_om_attribute_t *name_attrib = NULL;
     axis2_qname_t *attr_qname = NULL;
-    struct axis2_om_attribute *class_attrib = NULL;
+    axis2_om_attribute_t *class_attrib = NULL;
     axis2_qname_t *class_qname = NULL;
     axis2_status_t status = AXIS2_FAILURE;
     axis2_char_t *attrib_value = NULL;

Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c Mon Jan 30 02:10:05 2006
@@ -883,17 +883,17 @@
         axis2_qname_t *mod_name = NULL; 
 
         axis2_hash_this (index_i, NULL, NULL, &v);
-        svc_grp = (struct axis2_svc_grp *) v;
+        svc_grp = (axis2_svc_grp_t *) v;
         svcs = AXIS2_SVC_GRP_GET_SVCS(svc_grp, env);    
         
         index_j = axis2_hash_first (svcs, env);
         while(NULL != index_j)
         {
-            struct axis2_svc *svc = NULL;
+            axis2_svc_t *svc = NULL;
             void *w = NULL;
 
             axis2_hash_this (index_i, NULL, NULL, &w);
-            svc = (struct axis2_svc *) w;
+            svc = (axis2_svc_t *) w;
                 
             status = AXIS2_SVC_ADD_MODULE_OPS(svc, env, module, 
                 resolver_impl->axis2_config);

Modified: webservices/axis2/trunk/c/modules/util/error.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/error.c?rev=373486&r1=373485&r2=373486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/error.c (original)
+++ webservices/axis2/trunk/c/modules/util/error.c Mon Jan 30 02:10:05 2006
@@ -387,6 +387,8 @@
     axis2_error_messages[AXIS2_ERROR_INVALID_STATE_DLL_DESC] =
     "dll description has invalid state of not having valid dll create function, \
         of valid delete function or valid dll_handler";
+    axis2_error_messages[AXIS2_ERROR_UNSUPPORTED_TYPE] =
+    "type is not supported";
     axis2_error_messages[AXIS2_ERROR_NULL_SOAP_ENVELOPE_IN_MSG_CTX] =
     "Null soap envelope in msg_ctx";
     axis2_error_messages[AXIS2_ERROR_UUID_GEN_FAILED] = 



Mime
View raw message