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/06/16 07:18:43 UTC

svn commit: r414738 - in /webservices/axis2/trunk/c/woden: include/ src/builder/ src/schema/ src/util/ src/wsdl20/ src/wsdl20/xml/

Author: damitha
Date: Thu Jun 15 22:18:42 2006
New Revision: 414738

URL: http://svn.apache.org/viewvc?rev=414738&view=rev
Log:
More bug fixes

Modified:
    webservices/axis2/trunk/c/woden/include/woden_imported_schema.h
    webservices/axis2/trunk/c/woden/include/woden_inlined_schema.h
    webservices/axis2/trunk/c/woden/include/woden_interface_fault.h
    webservices/axis2/trunk/c/woden/include/woden_nested_configurable.h
    webservices/axis2/trunk/c/woden/include/woden_schema.h
    webservices/axis2/trunk/c/woden/src/builder/reader.c
    webservices/axis2/trunk/c/woden/src/schema/imported_schema.c
    webservices/axis2/trunk/c/woden/src/schema/inlined_schema.c
    webservices/axis2/trunk/c/woden/src/schema/schema.c
    webservices/axis2/trunk/c/woden/src/util/woden_om_util.c
    webservices/axis2/trunk/c/woden/src/wsdl20/binding_op.c
    webservices/axis2/trunk/c/woden/src/wsdl20/desc.c
    webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c
    webservices/axis2/trunk/c/woden/src/wsdl20/interface_msg_ref.c
    webservices/axis2/trunk/c/woden/src/wsdl20/interface_op.c
    webservices/axis2/trunk/c/woden/src/wsdl20/nested_configurable.c
    webservices/axis2/trunk/c/woden/src/wsdl20/xml/interface_fault_element.c

Modified: webservices/axis2/trunk/c/woden/include/woden_imported_schema.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_imported_schema.h?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_imported_schema.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_imported_schema.h Thu Jun 15 22:18:42 2006
@@ -97,6 +97,7 @@
 woden_imported_schema_resolve_methods(
         woden_imported_schema_t *schema,
         const axis2_env_t *env,
+        woden_imported_schema_t *schema_impl,
         axis2_hash_t *methods);
 /************************End of Woden C Internal Methods***********************/
 

Modified: webservices/axis2/trunk/c/woden/include/woden_inlined_schema.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_inlined_schema.h?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_inlined_schema.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_inlined_schema.h Thu Jun 15 22:18:42 2006
@@ -97,6 +97,7 @@
 woden_inlined_schema_resolve_methods(
         woden_inlined_schema_t *schema,
         const axis2_env_t *env,
+        woden_inlined_schema_t *schema_impl,
         axis2_hash_t *methods);
 /************************End of Woden C Internal Methods***********************/
 

Modified: webservices/axis2/trunk/c/woden/include/woden_interface_fault.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_interface_fault.h?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_interface_fault.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_interface_fault.h Thu Jun 15 22:18:42 2006
@@ -132,11 +132,6 @@
         const axis2_env_t *env);
 
 AXIS2_EXTERN woden_interface_fault_t * AXIS2_CALL
-woden_interface_fault_to_nested_element(
-        void *interface_fault,
-        const axis2_env_t *env);
-
-AXIS2_EXTERN woden_interface_fault_t * AXIS2_CALL
 woden_interface_fault_to_configurable_element(
         void *interface_fault,
         const axis2_env_t *env);

Modified: webservices/axis2/trunk/c/woden/include/woden_nested_configurable.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_nested_configurable.h?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_nested_configurable.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_nested_configurable.h Thu Jun 15 22:18:42 2006
@@ -95,6 +95,11 @@
         const axis2_env_t *env);
 
 /************************Woden C Internal Methods******************************/
+AXIS2_EXTERN woden_nested_configurable_t * AXIS2_CALL
+woden_nested_configurable_to_nested_element(
+        void *nested_configurable,
+        const axis2_env_t *env);
+
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 woden_nested_configurable_resolve_methods(
         woden_nested_configurable_t *nested_configurable,

Modified: webservices/axis2/trunk/c/woden/include/woden_schema.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_schema.h?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_schema.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_schema.h Thu Jun 15 22:18:42 2006
@@ -133,6 +133,7 @@
 woden_schema_resolve_methods(
         woden_schema_t *schema,
         const axis2_env_t *env,
+        woden_schema_t *schema_impl,
         axis2_hash_t *methods);
 /************************End of Woden C Internal Methods***********************/
 

Modified: webservices/axis2/trunk/c/woden/src/builder/reader.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/builder/reader.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/builder/reader.c (original)
+++ webservices/axis2/trunk/c/woden/src/builder/reader.c Thu Jun 15 22:18:42 2006
@@ -1185,6 +1185,9 @@
     AXIS2_PARAM_CHECK(env->error, desc, AXIS2_FAILURE);
     reader_impl = INTF_TO_IMPL(reader);
 
+    schema = woden_imported_schema_create(env);
+    if(!schema)
+        return NULL;
     import_el = AXIOM_NODE_GET_DATA_ELEMENT(import_el_node, env);
     ns = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(import_el, env, 
             WODEN_ATTR_NAMESPACE);
@@ -1467,12 +1470,14 @@
     axiom_element_t *temp_el = NULL;
     axiom_node_t *temp_el_node = NULL;
     void *types = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     fault = WODEN_DESC_ELEMENT_CREATE_INTERFACE_FAULT_ELEMENT(desc, env);
-    fault = woden_interface_fault_to_nested_element(fault, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(fault, env, parent); 
+    nested_configurable = WODEN_INTERFACE_FAULT_GET_BASE_IMPL(fault, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
     types = WODEN_DESC_ELEMENT_GET_TYPES_ELEMENT(desc, env);
     WODEN_INTERFACE_FAULT_SET_TYPES(fault, env, types);
 
@@ -1499,6 +1504,7 @@
     if(NULL != element)
     {
         axis2_qname_t *qname = NULL;
+
         qname = woden_om_util_get_qname(env, fault_el_node, element, desc);
         fault = woden_interface_fault_to_interface_fault_element(fault, env);
         WODEN_INTERFACE_FAULT_ELEMENT_SET_QNAME(fault, env, qname);
@@ -1587,12 +1593,15 @@
     axiom_element_t *op_el = NULL;
     axiom_element_t *temp_el = NULL;
     axiom_node_t *temp_el_node = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     op = WODEN_DESC_ELEMENT_CREATE_INTERFACE_OP_ELEMENT(desc, env);
-    op = woden_interface_op_to_nested_element(op, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(op, env, parent); 
+    nested_configurable = WODEN_INTERFACE_OP_GET_BASE_IMPL(op, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
 
     op_el = AXIOM_NODE_GET_DATA_ELEMENT(op_el_node, env);
     name = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(op_el, env, WODEN_ATTR_NAME);
@@ -1776,13 +1785,16 @@
     axiom_element_t *temp_el = NULL;
     axiom_node_t *temp_el_node = NULL;
     axis2_qname_t *attr_ref = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     fault_ref = WODEN_DESC_ELEMENT_CREATE_INTERFACE_FAULT_REF_ELEMENT(desc, 
             env);
-    fault_ref = woden_interface_op_to_nested_element(fault_ref, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(fault_ref, env, parent); 
+    nested_configurable = WODEN_INTERFACE_FAULT_REF_GET_BASE_IMPL(fault_ref, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
 
     fault_ref_el = AXIOM_NODE_GET_DATA_ELEMENT(fault_ref_el_node, env);
     localname = AXIOM_ELEMENT_GET_LOCALNAME(fault_ref_el, env);
@@ -1798,6 +1810,8 @@
         woden_direction_t *direction_out = NULL;
         
         direction_out = woden_direction_get_direction_out(env);
+        fault_ref = woden_interface_fault_ref_to_interface_fault_ref_element(
+                fault_ref, env);
         WODEN_INTERFACE_FAULT_REF_ELEMENT_SET_DIRECTION(fault_ref, env, direction_out);
     }
     
@@ -1941,13 +1955,16 @@
     axiom_element_t *temp_el;
     axiom_node_t *temp_el_node;
     void *types = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     msg_ref = WODEN_DESC_ELEMENT_CREATE_INTERFACE_MSG_REF_ELEMENT(desc, 
             env);
-    msg_ref = woden_interface_op_to_nested_element(msg_ref, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(msg_ref, env, parent); 
+    nested_configurable = WODEN_INTERFACE_MSG_REF_GET_BASE_IMPL(msg_ref, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
     desc = woden_desc_to_desc_element(desc, env);
     types = WODEN_DESC_ELEMENT_GET_TYPES_ELEMENT(desc, env);
     WODEN_INTERFACE_MSG_REF_SET_TYPES(msg_ref, env, types);
@@ -2347,12 +2364,15 @@
     axiom_node_t *temp_el_node;
     axis2_qname_t *attr_ref = NULL;
     axis2_qname_t *int_flt_qn = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     fault = WODEN_DESC_ELEMENT_CREATE_BINDING_FAULT_ELEMENT(desc, env);
-    fault = woden_binding_fault_to_nested_element(fault, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(fault, env, parent); 
+    nested_configurable = WODEN_BINDING_FAULT_GET_BASE_IMPL(fault, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
 
     attr_ref = axis2_qname_create_from_string(env, WODEN_ATTR_NAME);
     fault_el = AXIOM_NODE_GET_DATA_ELEMENT(fault_el_node, env);
@@ -2388,8 +2408,13 @@
                
                 intface_flt = AXIS2_ARRAY_LIST_GET(int_faults, env, i);
                 if(intface_flt)
+                {
+                    intface_flt = 
+                        woden_interface_fault_to_interface_fault_element(
+                                intface_flt, env);
                     qname = WODEN_INTERFACE_FAULT_ELEMENT_GET_QNAME(
                         intface_flt, env);
+                }
                 if(AXIS2_TRUE == AXIS2_QNAME_EQUALS(int_flt_qn, env, qname))
                 {
                     WODEN_BINDING_FAULT_SET_INTERFACE_FAULT_ELEMENT(fault, 
@@ -2480,12 +2505,15 @@
     axiom_node_t *temp_el_node;
     axis2_qname_t *attr_ref = NULL;
     axis2_qname_t *ref_qn = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     op = WODEN_DESC_ELEMENT_CREATE_BINDING_OP_ELEMENT(desc, env);
-    op = woden_binding_op_to_nested_element(op, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(op, env, parent); 
+    nested_configurable = WODEN_BINDING_OP_GET_BASE_IMPL(op, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
 
     attr_ref = axis2_qname_create_from_string(env, WODEN_ATTR_REF);
     op_el = AXIOM_NODE_GET_DATA_ELEMENT(op_el_node, env);
@@ -2667,12 +2695,15 @@
     woden_msg_label_t *msg_label = NULL;
     woden_msg_label_t *msg_label_in = NULL;
     woden_msg_label_t *msg_label_out = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     fault_ref = WODEN_DESC_ELEMENT_CREATE_BINDING_FAULT_REF_ELEMENT(desc, env);
-    fault_ref = woden_binding_op_to_nested_element(fault_ref, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(fault_ref, env, parent); 
+    nested_configurable = WODEN_BINDING_FAULT_REF_GET_BASE_IMPL(fault_ref, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
 
     fault_ref_el = AXIOM_NODE_GET_DATA_ELEMENT(fault_ref_el_node, env);
     attr_ref = axis2_qname_create_from_string(env, WODEN_ATTR_REF);
@@ -2873,12 +2904,15 @@
     woden_msg_label_t *msg_label = NULL;
     woden_msg_label_t *msg_label_in = NULL;
     woden_msg_label_t *msg_label_out = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     desc = woden_desc_to_desc_element(desc, env);
     msg_ref = WODEN_DESC_ELEMENT_CREATE_BINDING_MSG_REF_ELEMENT(desc, env);
-    msg_ref = woden_binding_op_to_nested_element(msg_ref, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(msg_ref, env, parent); 
+    nested_configurable = WODEN_BINDING_MSG_REF_GET_BASE_IMPL(msg_ref, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
 
     msg_ref_el = AXIOM_NODE_GET_DATA_ELEMENT(msg_ref_el_node, env);
     localname = AXIOM_ELEMENT_GET_LOCALNAME(msg_ref_el, env);
@@ -3153,7 +3187,8 @@
         
         desc = woden_desc_to_desc_element(desc, env);
         interfaces = WODEN_DESC_ELEMENT_GET_INTERFACE_ELEMENTS(desc, env);
-        size = AXIS2_ARRAY_LIST_SIZE(interfaces, env);
+        if(interfaces)
+            size = AXIS2_ARRAY_LIST_SIZE(interfaces, env);
         for(i = 0; i < size; i++)
         {
             void *intface = NULL;
@@ -3271,12 +3306,15 @@
     axiom_element_t *endpoint_el = NULL;
     axiom_element_t *temp_el = NULL;
     axiom_node_t *temp_el_node = NULL;
+    void *nested_configurable = NULL;
     axis2_status_t status = AXIS2_FAILURE;
     
     desc = woden_desc_to_desc_element(desc, env);
     endpoint = WODEN_DESC_ELEMENT_CREATE_ENDPOINT_ELEMENT(desc, env);
-    endpoint = woden_endpoint_to_nested_element(endpoint, env);
-    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(endpoint, env, parent); 
+    nested_configurable = WODEN_ENDPOINT_GET_BASE_IMPL(endpoint, env);
+    nested_configurable = woden_nested_configurable_to_nested_element(
+            nested_configurable, env);
+    WODEN_NESTED_ELEMENT_SET_PARENT_ELEMENT(nested_configurable, env, parent); 
 
 
     endpoint_el = AXIOM_NODE_GET_DATA_ELEMENT(endpoint_el_node, env);
@@ -3305,7 +3343,8 @@
         
         desc = woden_desc_to_desc_element(desc, env);
         bindings = WODEN_DESC_ELEMENT_GET_BINDING_ELEMENTS(desc, env);
-        size = AXIS2_ARRAY_LIST_SIZE(bindings, env);
+        if(bindings)
+            size = AXIS2_ARRAY_LIST_SIZE(bindings, env);
         for(i = 0; i < size; i++)
         {
             void *binding = NULL;

Modified: webservices/axis2/trunk/c/woden/src/schema/imported_schema.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/schema/imported_schema.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/schema/imported_schema.c (original)
+++ webservices/axis2/trunk/c/woden/src/schema/imported_schema.c Thu Jun 15 22:18:42 2006
@@ -129,10 +129,9 @@
     woden_imported_schema_free_ops(schema, env);
             
     schema_impl->imported_schema.schema.ops = 
-            AXIS2_MALLOC(env->allocator, 
-            sizeof(woden_schema_ops_t));
+            AXIS2_MALLOC(env->allocator, sizeof(woden_schema_ops_t));
     woden_schema_resolve_methods(&(schema_impl->imported_schema.schema), 
-            env, schema_impl->methods);
+            env, schema_impl->schema, schema_impl->methods);
 
     return schema;
 }
@@ -310,20 +309,31 @@
 woden_imported_schema_resolve_methods(
         woden_imported_schema_t *schema,
         const axis2_env_t *env,
+        woden_imported_schema_t *schema_impl,
         axis2_hash_t *methods)
 {
+    woden_imported_schema_impl_t *schema_impl_l = NULL;
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    schema_impl_l = INTF_TO_IMPL(schema_impl);
     
     schema->ops->free = 
                 axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
     schema->ops->type = 
                 axis2_hash_get(methods, "type", AXIS2_HASH_KEY_STRING);
 
-    schema->ops->set_location = axis2_hash_get(methods, "set_location", 
-            AXIS2_HASH_KEY_STRING);
-    schema->ops->get_location = axis2_hash_get(methods, "get_location", 
-            AXIS2_HASH_KEY_STRING);;
+    schema->ops->set_location = axis2_hash_get(methods, 
+            "set_location", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_location && schema_impl_l)
+            schema->ops->set_location = 
+            schema_impl_l->imported_schema.ops->set_location;
+    
+    schema->ops->get_location = axis2_hash_get(methods, 
+            "get_location", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_location && schema_impl_l)
+            schema->ops->get_location = 
+            schema_impl_l->imported_schema.ops->get_location;
     
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/woden/src/schema/inlined_schema.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/schema/inlined_schema.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/schema/inlined_schema.c (original)
+++ webservices/axis2/trunk/c/woden/src/schema/inlined_schema.c Thu Jun 15 22:18:42 2006
@@ -132,7 +132,7 @@
             AXIS2_MALLOC(env->allocator, 
             sizeof(woden_schema_ops_t));
     woden_schema_resolve_methods(&(schema_impl->inlined_schema.schema), 
-            env, schema_impl->methods);
+            env, schema_impl->schema, schema_impl->methods);
 
     return schema;
 }
@@ -311,10 +311,14 @@
 woden_inlined_schema_resolve_methods(
         woden_inlined_schema_t *schema,
         const axis2_env_t *env,
+        woden_inlined_schema_t *schema_impl,
         axis2_hash_t *methods)
 {
+    woden_inlined_schema_impl_t *schema_impl_l = NULL;
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    schema_impl_l = INTF_TO_IMPL(schema_impl);
     
     schema->ops->free = 
                 axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
@@ -326,6 +330,17 @@
     schema->ops->get_id = axis2_hash_get(methods, "get_id", 
             AXIS2_HASH_KEY_STRING);;
     
+    schema->ops->set_id = axis2_hash_get(methods, 
+            "set_id", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_id && schema_impl_l)
+            schema->ops->set_id = 
+            schema_impl_l->inlined_schema.ops->set_id;
+    
+    schema->ops->get_id = axis2_hash_get(methods, 
+            "get_id", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_id && schema_impl_l)
+            schema->ops->get_id = 
+            schema_impl_l->inlined_schema.ops->get_id;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/woden/src/schema/schema.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/schema/schema.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/schema/schema.c (original)
+++ webservices/axis2/trunk/c/woden/src/schema/schema.c Thu Jun 15 22:18:42 2006
@@ -148,26 +148,58 @@
 woden_schema_resolve_methods(
         woden_schema_t *schema,
         const axis2_env_t *env,
+        woden_schema_t *schema_impl,
         axis2_hash_t *methods)
 {
+    woden_schema_impl_t *schema_impl_l = NULL;
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    schema_impl_l = INTF_TO_IMPL(schema_impl);
     
     schema->ops->free = axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
-    schema->ops->set_namespace = axis2_hash_get(methods, "set_namespace", 
-            AXIS2_HASH_KEY_STRING);
+
+    schema->ops->set_namespace = axis2_hash_get(methods, 
+            "set_namespace", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_namespace && schema_impl_l)
+            schema->ops->set_namespace = 
+            schema_impl_l->schema.ops->set_namespace;
+    
     schema->ops->get_namespace = axis2_hash_get(methods, 
             "get_namespace", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_namespace && schema_impl_l)
+            schema->ops->get_namespace = 
+            schema_impl_l->schema.ops->get_namespace;
+    
     schema->ops->set_schema_def = axis2_hash_get(methods, 
             "set_schema_def", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_schema_def && schema_impl_l)
+            schema->ops->set_schema_def = 
+            schema_impl_l->schema.ops->set_schema_def;
+    
     schema->ops->get_schema_def = axis2_hash_get(methods, 
             "get_schema_def", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_schema_def && schema_impl_l)
+            schema->ops->get_schema_def = 
+            schema_impl_l->schema.ops->get_schema_def;
+    
     schema->ops->set_referenceable = axis2_hash_get(methods, 
             "set_referenceable", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_referenceable && schema_impl_l)
+            schema->ops->set_referenceable = 
+            schema_impl_l->schema.ops->set_referenceable;
+    
     schema->ops->is_referenceable = axis2_hash_get(methods, 
             "is_referenceable", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->is_referenceable && schema_impl_l)
+            schema->ops->is_referenceable = 
+            schema_impl_l->schema.ops->is_referenceable;
+    
     schema->ops->get_namespace_as_string = axis2_hash_get(methods, 
             "get_namespace_as_string", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_namespace_as_string && schema_impl_l)
+            schema->ops->get_namespace_as_string = 
+            schema_impl_l->schema.ops->get_namespace_as_string;
 
     return AXIS2_SUCCESS;    
 }

Modified: webservices/axis2/trunk/c/woden/src/util/woden_om_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/util/woden_om_util.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/util/woden_om_util.c (original)
+++ webservices/axis2/trunk/c/woden/src/util/woden_om_util.c Thu Jun 15 22:18:42 2006
@@ -66,7 +66,8 @@
 
     desc = woden_desc_to_desc_element(desc, env);
     ns_uri = WODEN_DESC_ELEMENT_GET_NAMESPACE(desc, env, prefix);
-    ns_uri_str = AXIS2_URI_TO_STRING(ns_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
+    if(ns_uri)
+        ns_uri_str = AXIS2_URI_TO_STRING(ns_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
     if(NULL != ns_uri_str && 0 == AXIS2_STRCMP(ns_uri_str, namespc_uri_str))
     {
         /* Namespace already registerd */

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/binding_op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/binding_op.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/binding_op.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/binding_op.c Thu Jun 15 22:18:42 2006
@@ -960,7 +960,7 @@
     binding_op_impl = INTF_TO_IMPL(axis2_hash_get(super, 
                 "WODEN_BINDING_OP", AXIS2_HASH_KEY_STRING));
 
-    if(!binding_op_impl->f_ref)
+    if(binding_op_impl->f_ref)
     {
         AXIS2_QNAME_FREE(binding_op_impl->f_ref, env);
         binding_op_impl->f_ref = NULL;
@@ -1158,7 +1158,7 @@
     binding_op_impl = INTF_TO_IMPL(axis2_hash_get(super, 
                 "WODEN_BINDING_OP", AXIS2_HASH_KEY_STRING));
 
-    if(!binding_op_impl->f_interface_op)
+    if(binding_op_impl->f_interface_op)
     {
         /* TODO */
     }

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/desc.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/desc.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/desc.c Thu Jun 15 22:18:42 2006
@@ -666,7 +666,25 @@
     desc_impl->desc.ops->get_type_defs = woden_desc_get_type_defs;
     desc_impl->desc.ops->get_type_def = woden_desc_get_type_def;
     desc_impl->desc.ops->to_element = woden_desc_to_element;
- 
+
+    desc_impl->f_namespcs = axis2_hash_make(env);
+    if(!desc_impl->f_namespcs) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    desc_impl->f_binding_elements = axis2_array_list_create(env, 0);
+    desc_impl->f_interface_elements = axis2_array_list_create(env, 0);
+    desc_impl->f_svc_elements = axis2_array_list_create(env, 0);
+    if(!desc_impl->f_interface_elements ||
+            !desc_impl->f_svc_elements || 
+            !desc_impl->f_binding_elements) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
     desc_impl->methods = axis2_hash_make(env);
     if(!desc_impl->methods) 
     {

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c Thu Jun 15 22:18:42 2006
@@ -214,31 +214,6 @@
 }
 
 AXIS2_EXTERN woden_interface_fault_t * AXIS2_CALL
-woden_interface_fault_to_nested_element(
-        void *interface_fault,
-        const axis2_env_t *env)
-{
-    woden_interface_fault_impl_t *interface_fault_impl = NULL;
-   
-    AXIS2_ENV_CHECK(env, NULL);
-    if(!interface_fault)
-    {
-        interface_fault_impl = (woden_interface_fault_impl_t *) create(env);
-    }
-    else
-        interface_fault_impl = (woden_interface_fault_impl_t *) interface_fault;
-
-    woden_interface_fault_free_ops(interface_fault, env);
-
-    interface_fault_impl->interface_fault.base.interface_fault_element.base.nested_element.ops = 
-        AXIS2_MALLOC(env->allocator, 
-                sizeof(woden_nested_element_ops_t));
-    woden_nested_element_resolve_methods(&(interface_fault_impl->interface_fault.base.
-            interface_fault_element.base.nested_element), env, interface_fault_impl->methods);
-    return interface_fault;
-}
-
-AXIS2_EXTERN woden_interface_fault_t * AXIS2_CALL
 woden_interface_fault_to_configurable_element(
         void *interface_fault,
         const axis2_env_t *env)
@@ -393,8 +368,6 @@
     interface_fault_impl->interface_fault.base.nested_configurable.base.configurable.ops = 
             NULL;
     interface_fault_impl->interface_fault.base.interface_fault_element.base.
-        nested_element.ops = NULL;
-    interface_fault_impl->interface_fault.base.interface_fault_element.base.
         configurable_element.ops = NULL;
     interface_fault_impl->interface_fault.base.interface_fault_element.base.
         documentable_element.ops = NULL;
@@ -423,6 +396,9 @@
     interface_fault_impl->interface_fault.ops->set_types = 
         woden_interface_fault_set_types;
  
+    interface_fault_impl->nested_configurable = 
+        woden_nested_configurable_create(env);
+
     interface_fault_impl->methods = axis2_hash_make(env);
     if(!interface_fault_impl->methods) 
     {
@@ -476,7 +452,6 @@
     AXIS2_ENV_CHECK(env, NULL);
     interface_fault_impl = (woden_interface_fault_impl_t *) create(env);
 
-    interface_fault_impl->nested_configurable = woden_nested_configurable_create(env);
 
     interface_fault_impl->super = axis2_hash_make(env);
     if(!interface_fault_impl->super) 
@@ -533,15 +508,6 @@
             NULL;
     }
 
-    if(interface_fault_impl->interface_fault.base.interface_fault_element.base.
-            nested_element.ops)
-    {
-        AXIS2_FREE(env->allocator, interface_fault_impl->interface_fault.base.
-                interface_fault_element.base.nested_element.ops);
-        interface_fault_impl->interface_fault.base.interface_fault_element.base.
-            nested_element.ops = NULL;
-    }
- 
     if(interface_fault_impl->interface_fault.base.interface_fault_element.base.
             configurable_element.ops)
     {

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/interface_msg_ref.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/interface_msg_ref.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/interface_msg_ref.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/interface_msg_ref.c Thu Jun 15 22:18:42 2006
@@ -419,6 +419,7 @@
     interface_msg_ref_impl->f_msg_content_model = NULL;
     interface_msg_ref_impl->f_element_decl = NULL;
     interface_msg_ref_impl->f_types = NULL;
+    interface_msg_ref_impl->f_element_qname = NULL;
     
     interface_msg_ref_impl->interface_msg_ref.base.interface_msg_ref_element.ops = NULL;
     interface_msg_ref_impl->interface_msg_ref.base.nested_configurable.ops = NULL;

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/interface_op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/interface_op.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/interface_op.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/interface_op.c Thu Jun 15 22:18:42 2006
@@ -992,7 +992,7 @@
     interface_op_impl = INTF_TO_IMPL(axis2_hash_get(super, 
                 "WODEN_INTERFACE_OP", AXIS2_HASH_KEY_STRING));
 
-    if(!interface_op_impl->f_qname)
+    if(interface_op_impl->f_qname)
     {
         AXIS2_QNAME_FREE(interface_op_impl->f_qname, env);
         interface_op_impl->f_qname = NULL;

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/nested_configurable.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/nested_configurable.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/nested_configurable.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/nested_configurable.c Thu Jun 15 22:18:42 2006
@@ -28,6 +28,7 @@
 {
     woden_nested_configurable_t nested_configurable;
     woden_configurable_t *configurable;
+    axis2_hash_t *methods;
     axis2_hash_t *super;
     axis2_array_list_t *f_parent;
 };
@@ -67,6 +68,41 @@
 
 static woden_nested_configurable_t *
 create(
+        const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_nested_configurable_free_ops(
+        void *nested_configurable,
+        const axis2_env_t *env);
+
+AXIS2_EXTERN woden_nested_configurable_t * AXIS2_CALL
+woden_nested_configurable_to_nested_element(
+        void *nested_configurable,
+        const axis2_env_t *env)
+{
+    woden_nested_configurable_impl_t *nested_configurable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!nested_configurable)
+    {
+        nested_configurable_impl = (woden_nested_configurable_impl_t *) create(env);
+    }
+    else
+        nested_configurable_impl = (woden_nested_configurable_impl_t *) nested_configurable;
+
+    woden_nested_configurable_free_ops(nested_configurable, env);
+
+    nested_configurable_impl->nested_configurable.base.nested_element.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_nested_element_ops_t));
+    woden_nested_element_resolve_methods(&(nested_configurable_impl->nested_configurable.base.
+            nested_element), env, nested_configurable_impl->methods);
+    return nested_configurable;
+}
+
+
+static woden_nested_configurable_t *
+create(
         const axis2_env_t *env)
 {
     woden_nested_configurable_impl_t *nested_configurable_impl = NULL;
@@ -76,11 +112,24 @@
                     sizeof(woden_nested_configurable_impl_t));
 
     nested_configurable_impl->super = NULL;
+    nested_configurable_impl->methods = NULL;
     nested_configurable_impl->f_parent = NULL;
     
+    nested_configurable_impl->nested_configurable.base.nested_element.ops = NULL;
+    
     nested_configurable_impl->nested_configurable.ops = 
             AXIS2_MALLOC(env->allocator, 
             sizeof(woden_nested_configurable_ops_t));
+    
+    nested_configurable_impl->super = axis2_hash_make(env);
+    if(!nested_configurable_impl->super) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(nested_configurable_impl->super, "WODEN_CONFIGURABLE", 
+            AXIS2_HASH_KEY_STRING, 
+            &(nested_configurable_impl->nested_configurable));
 
     nested_configurable_impl->nested_configurable.ops->free = 
         woden_nested_configurable_free;
@@ -89,6 +138,22 @@
     nested_configurable_impl->nested_configurable.ops->get_base_impl = 
         woden_nested_configurable_get_base_impl;
 
+    nested_configurable_impl->methods = axis2_hash_make(env);
+    if(!nested_configurable_impl->methods) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(nested_configurable_impl->methods, 
+            "get_parent", AXIS2_HASH_KEY_STRING, 
+            woden_nested_configurable_get_parent);
+    axis2_hash_set(nested_configurable_impl->methods, 
+            "set_parent_element", AXIS2_HASH_KEY_STRING, 
+            woden_nested_configurable_set_parent_element);
+    axis2_hash_set(nested_configurable_impl->methods, 
+            "get_parent_element", AXIS2_HASH_KEY_STRING, 
+            woden_nested_configurable_get_parent_element);
+
     return &(nested_configurable_impl->nested_configurable);
 }
 
@@ -123,6 +188,28 @@
 }
 
 axis2_status_t AXIS2_CALL
+woden_nested_configurable_free_ops(
+        void *nested_configurable,
+        const axis2_env_t *env)
+{
+    woden_nested_configurable_impl_t *nested_configurable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    nested_configurable_impl = INTF_TO_IMPL(nested_configurable);
+
+    if(nested_configurable_impl->nested_configurable.base.nested_element.ops)
+    {
+        AXIS2_FREE(env->allocator, nested_configurable_impl->nested_configurable.
+                base.nested_element.ops);
+        nested_configurable_impl->nested_configurable.base.nested_element.ops = 
+            NULL;
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
 woden_nested_configurable_free(
         void *nested_configurable,
         const axis2_env_t *env)
@@ -151,6 +238,8 @@
         nested_configurable_impl->super = NULL;
     }
     
+    woden_nested_configurable_free_ops(nested_configurable, env);
+    
     if(nested_configurable_impl->nested_configurable.ops)
     {
         AXIS2_FREE(env->allocator, nested_configurable_impl->nested_configurable.ops);
@@ -243,6 +332,7 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, parent, AXIS2_FAILURE);
+
     super = WODEN_NESTED_CONFIGURABLE_SUPER_OBJS(nested_configurable, env);
     nested_configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
                 "WODEN_NESTED_CONFIGURABLE", AXIS2_HASH_KEY_STRING));

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/xml/interface_fault_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/xml/interface_fault_element.c?rev=414738&r1=414737&r2=414738&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/xml/interface_fault_element.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/xml/interface_fault_element.c Thu Jun 15 22:18:42 2006
@@ -20,6 +20,7 @@
 woden_interface_fault_element_resolve_methods(
         woden_interface_fault_element_t *interface_fault_element,
         const axis2_env_t *env,
+
         axis2_hash_t *methods)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org