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 da...@apache.org on 2006/05/16 12:54:35 UTC

svn commit: r406905 - in /webservices/axis2/trunk/c: ./ include/ modules/core/deployment/ modules/util/ modules/wsdl/ modules/wsdl/woden/include/woden/ modules/wsdl/woden/include/woden/wsdl20/ modules/wsdl/woden/src/wsdl20/ modules/wsdl/woden/src/wsdl2...

Author: damitha
Date: Tue May 16 03:54:30 2006
New Revision: 406905

URL: http://svn.apache.org/viewcvs?rev=406905&view=rev
Log:
Now attributes can be set into param as a hash table.

Modified:
    webservices/axis2/trunk/c/configure.ac
    webservices/axis2/trunk/c/include/Makefile.am
    webservices/axis2/trunk/c/include/axis2_param.h
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/modules/util/param.c
    webservices/axis2/trunk/c/modules/wsdl/Makefile.am
    webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/axis2_woden.h
    webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/wsdl20/axis2_woden_binding_fault_ref.h
    webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/Makefile.am
    webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am
    webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/interface_op_element.c
    webservices/axis2/trunk/c/modules/xml/Makefile.am

Modified: webservices/axis2/trunk/c/configure.ac
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/configure.ac?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/configure.ac (original)
+++ webservices/axis2/trunk/c/configure.ac Tue May 16 03:54:30 2006
@@ -253,7 +253,6 @@
     modules/xml/Makefile \
     modules/xml/parser/Makefile \
     modules/xml/parser/libxml2/Makefile \
-    modules/xml/xml_schema/Makefile \
     modules/xml/soap/Makefile \
     modules/xml/om/Makefile \
     modules/xml/attachments/Makefile \
@@ -261,7 +260,6 @@
     modules/util/minizip/Makefile \
     modules/platforms/unix/Makefile \
     modules/wsdl/Makefile \
-    modules/wsdl/woden/Makefile \
     modules/wsdl/builder/Makefile \
     modules/mod_addr/Makefile \
     test/Makefile \

Modified: webservices/axis2/trunk/c/include/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/Makefile.am?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/Makefile.am (original)
+++ webservices/axis2/trunk/c/include/Makefile.am Tue May 16 03:54:30 2006
@@ -1,3 +1,3 @@
 TESTS=
-nobase_include_HEADERS= platforms/axis2_platform_auto_sense.h platforms/unix/*.h platforms/windows/*.h
+nobase_include_HEADERS= platforms/axis2_platform_auto_sense.h platforms/unix/*.h platforms/windows/*.h xml_schema/*.h
 

Modified: webservices/axis2/trunk/c/include/axis2_param.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_param.h?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_param.h (original)
+++ webservices/axis2/trunk/c/include/axis2_param.h Tue May 16 03:54:30 2006
@@ -25,6 +25,7 @@
 #include <axis2_defines.h>
 #include <axis2_env.h>
 #include <axis2_om_node.h>
+#include <axis2_hash.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -150,7 +151,18 @@
      axis2_status_t (AXIS2_CALL *
 	 free)(struct axis2_param *param, 
 	 	   axis2_env_t **env);
-     
+
+    axis2_status_t (AXIS2_CALL *
+    set_attributes) (
+            struct axis2_param *param,
+            axis2_env_t **env,
+            axis2_hash_t *attrs);
+
+    axis2_hash_t* (AXIS2_CALL *
+    get_attributes) (
+            struct axis2_param *param,
+            axis2_env_t **env);
+         
     axis2_status_t (AXIS2_CALL *
     value_free) (void *param_value, 
                  axis2_env_t **env);
@@ -205,6 +217,12 @@
 
 #define AXIS2_PARAM_GET_ELEMENT(param, env) \
     ((param)->ops->get_param_element (param, env))
+    
+#define AXIS2_PARAM_SET_ATTRIBUTES(param, env, attrs) \
+    ((param)->ops->set_attributes (param , env, attrs))
+
+#define AXIS2_PARAM_GET_ATTRIBUTES(param, env) \
+    ((param)->ops->get_attributes (param, env))
 	
 /** @} */
     

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=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Tue May 16 03:54:30 2006
@@ -615,6 +615,7 @@
         axis2_qname_t *att_locked = NULL;
         axis2_qname_t *att_qname = NULL;
         axis2_char_t *pname = NULL;
+        axis2_hash_t *attrs = NULL;
         
         /* This is to check whether some one has locked the parmter at the top 
          * level
@@ -632,6 +633,11 @@
             AXIS2_PARAM_FREE(param, env);
             return status;
         }*/
+        
+        /* Setting attributes */
+        attrs = AXIS2_OM_ELEMENT_EXTRACT_ATTRIBUTES(param_element, env);
+        AXIS2_PARAM_SET_ATTRIBUTES(param, env, attrs);
+
         /* Setting paramter name */
         att_qname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
         para_name = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(param_element, env, 
@@ -727,6 +733,7 @@
                 AXIS2_PARAM_SET_LOCKED(param, env, AXIS2_FALSE);
             }
         }
+
         
         if(parent)
         {

Modified: webservices/axis2/trunk/c/modules/util/param.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/param.c?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/param.c (original)
+++ webservices/axis2/trunk/c/modules/util/param.c Tue May 16 03:54:30 2006
@@ -36,6 +36,7 @@
      * org.apache.axis2.sample.echo.EchoImpl</parameter>
      */
     axis2_om_node_t *param_element ;
+    axis2_hash_t *attrs;
 } axis2_param_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(param) ((axis2_param_impl_t *)param)
@@ -83,6 +84,18 @@
 axis2_om_node_t* AXIS2_CALL 
 axis2_param_get_param_element(axis2_param_t *param, 
 										axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_param_set_attributes(
+        axis2_param_t *param,
+        axis2_env_t **env,
+        axis2_hash_t *attrs);
+
+axis2_hash_t* AXIS2_CALL 
+axis2_param_get_attributes(
+        axis2_param_t *param,
+        axis2_env_t **env);
+
 axis2_status_t AXIS2_CALL 
 axis2_param_free(axis2_param_t *param, 
 						axis2_env_t **env);
@@ -109,6 +122,7 @@
     param_impl->locked = AXIS2_FALSE;
     param_impl->type = AXIS2_TEXT_PARAM;
     param_impl->param_element = NULL;
+    param_impl->attrs = NULL;
     
     param_impl->param.ops = 
 		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_param_ops_t));
@@ -134,6 +148,10 @@
 		axis2_param_set_param_element;
     param_impl->param.ops->get_param_element = 
 		axis2_param_get_param_element;
+    param_impl->param.ops->set_attributes = 
+        axis2_param_set_attributes;
+    param_impl->param.ops->get_attributes = 
+        axis2_param_get_attributes;
     param_impl->param.ops->free = axis2_param_free;
     
     return &(param_impl->param);
@@ -256,13 +274,58 @@
 }
 
 axis2_status_t AXIS2_CALL 
+axis2_param_set_attributes(
+        axis2_param_t *param,
+        axis2_env_t **env,
+        axis2_hash_t *attrs)
+{
+    axis2_param_impl_t *param_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, attrs, AXIS2_FAILURE);
+    param_impl = AXIS2_INTF_TO_IMPL(param);
+
+    if(param_impl->attrs)
+    {
+        axis2_hash_index_t *i = NULL;
+        void *v = NULL;
+
+        for (i = axis2_hash_first (param_impl->attrs, env); i; 
+                i = axis2_hash_next (env, i))
+        {
+            axis2_hash_this (i, NULL, NULL, &v);
+            AXIS2_OM_ATTRIBUTE_FREE(v, env);
+        }
+        axis2_hash_free(param_impl->attrs, env);
+    }
+    
+    param_impl->attrs = attrs;
+    return AXIS2_SUCCESS;
+
+
+}
+
+axis2_hash_t* AXIS2_CALL 
+axis2_param_get_attributes(
+        axis2_param_t *param,
+        axis2_env_t **env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(param)->attrs;
+}
+
+
+axis2_status_t AXIS2_CALL 
 axis2_param_free(axis2_param_t *param, 
 						axis2_env_t **env)
 {
+    axis2_param_impl_t *param_impl = NULL;
     void *param_value = NULL;
     axis2_char_t *param_name = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    param_impl = AXIS2_INTF_TO_IMPL(param);
     
     param_value = axis2_param_get_value(param, env);
     if(param_value)
@@ -276,9 +339,24 @@
             AXIS2_FREE((*env)->allocator, param_value);
         }
     }
+
+    if(param_impl->attrs)
+    {
+        axis2_hash_index_t *i = NULL;
+        void *v = NULL;
+
+        for (i = axis2_hash_first (param_impl->attrs, env); i; 
+                i = axis2_hash_next (env, i))
+        {
+            axis2_hash_this (i, NULL, NULL, &v);
+            AXIS2_OM_ATTRIBUTE_FREE(v, env);
+        }
+        axis2_hash_free(param_impl->attrs, env);
+    }
     param_name = axis2_param_get_name(param, env);
     AXIS2_FREE((*env)->allocator, param_name);
     AXIS2_FREE((*env)->allocator, param->ops);
     AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(param));    
     return AXIS2_SUCCESS;
 }
+

Modified: webservices/axis2/trunk/c/modules/wsdl/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/Makefile.am?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/wsdl/Makefile.am Tue May 16 03:54:30 2006
@@ -32,4 +32,3 @@
             -I$(top_builddir)/modules/util \
             -I$(top_builddir)/modules/platforms
 
-EXTRA_DIST=woden

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/axis2_woden.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/axis2_woden.h?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/axis2_woden.h (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/axis2_woden.h Tue May 16 03:54:30 2006
@@ -71,7 +71,9 @@
         AXIS2_WODEN_INTERFACE_OP,
         AXIS2_WODEN_BINDING,
         AXIS2_WODEN_BINDING_FAULT,
-        AXIS2_WODEN_BINDING_FAULT_REF
+        AXIS2_WODEN_BINDING_FAULT_REF,
+        AXIS2_WODEN_BINDING_MSG_REF,
+        AXIS2_WODEN_BINDING_OP
     } axis2_woden_obj_types_t;
 
 /** @} */

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/wsdl20/axis2_woden_binding_fault_ref.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/wsdl20/axis2_woden_binding_fault_ref.h?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/wsdl20/axis2_woden_binding_fault_ref.h (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/include/woden/wsdl20/axis2_woden_binding_fault_ref.h Tue May 16 03:54:30 2006
@@ -20,6 +20,9 @@
 /**
  * @file axis2_woden_binding_fault_ref.h
  * @brief Axis2 Binding Fault Reference Binding Fault Reference
+ * This class represents the Binding Fault Reference component of the
+ * WSDL 2.0 Component model and the &lt;infault&gt; or &lt;outfault&gt; 
+ * child element of a WSDL binding &lt;operation&gt;.
  * 
  */
 

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/Makefile.am?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/Makefile.am Tue May 16 03:54:30 2006
@@ -22,7 +22,9 @@
 							interface_op.c \
 							binding.c \
 							binding_fault.c \
-							binding_fault_ref.c
+							binding_fault_ref.c \
+							binding_msg_ref.c \
+							binding_op.c
 
 INCLUDES = -I$(top_builddir)/include \
             -I$(AXIS2C_HOME)/include

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am Tue May 16 03:54:30 2006
@@ -16,7 +16,11 @@
 							binding_element.c \
 							binding_fault_element.c \
 							binding_fault_ref_element.c \
-							binding_msg_ref_element.c
+							binding_msg_ref_element.c \
+							binding_op_element.c \
+							include_element.c \
+							import_element.c \
+							fault_ref_element.c
 
 INCLUDES = -I$(top_builddir)/include \
             -I$(AXIS2C_HOME)/include

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/interface_op_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/interface_op_element.c?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/interface_op_element.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/interface_op_element.c Tue May 16 03:54:30 2006
@@ -34,40 +34,40 @@
             AXIS2_HASH_KEY_STRING);
 
     interface_op_element->ops->set_qname = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "set_qname", 
             AXIS2_HASH_KEY_STRING);
 
     interface_op_element->ops->get_qname = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "get_qname", 
             AXIS2_HASH_KEY_STRING);
  
     interface_op_element->ops->set_pattern = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "set_pattern", 
             AXIS2_HASH_KEY_STRING);
 
     interface_op_element->ops->get_pattern = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "get_pattern", 
             AXIS2_HASH_KEY_STRING);
  
     interface_op_element->ops->add_style_uri = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "add_style_uri", 
             AXIS2_HASH_KEY_STRING);
 
     interface_op_element->ops->remove_style_uri = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "remove_style_uri", 
             AXIS2_HASH_KEY_STRING);
 
     interface_op_element->ops->get_style = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "get_style", 
             AXIS2_HASH_KEY_STRING);
 
    
     interface_op_element->ops->add_interface_msg_ref_element = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "add_interface_msg_ref_element", 
             AXIS2_HASH_KEY_STRING);
 
     interface_op_element->ops->remove_interface_msg_ref_element = 
-            axis2_hash_get(methods, "", 
+            axis2_hash_get(methods, "remove_interface_msg_ref_element", 
             AXIS2_HASH_KEY_STRING);
 
     interface_op_element->ops->get_interface_msg_ref_elements = 

Modified: webservices/axis2/trunk/c/modules/xml/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/Makefile.am?rev=406905&r1=406904&r2=406905&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/Makefile.am Tue May 16 03:54:30 2006
@@ -1,3 +1,2 @@
 TESTS =
 SUBDIRS = parser attachments om soap 
-EXTRA_DIST=xml_schema