axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r414753 - in /webservices/axis2/trunk/c/woden: include/woden_svc.h samples/test_wsdl2.c src/util/component_model_builder.c
Date Fri, 16 Jun 2006 06:43:44 GMT
Author: samisa
Date: Thu Jun 15 23:43:44 2006
New Revision: 414753

URL: http://svn.apache.org/viewvc?rev=414753&view=rev
Log:
Fixed some bugs

Modified:
    webservices/axis2/trunk/c/woden/include/woden_svc.h
    webservices/axis2/trunk/c/woden/samples/test_wsdl2.c
    webservices/axis2/trunk/c/woden/src/util/component_model_builder.c

Modified: webservices/axis2/trunk/c/woden/include/woden_svc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_svc.h?rev=414753&r1=414752&r2=414753&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_svc.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_svc.h Thu Jun 15 23:43:44 2006
@@ -190,11 +190,11 @@
       (((woden_svc_t *) svc)->ops->get_base_impl(svc, env))
 
 #define WODEN_SVC_GET_QNAME(svc, env) \
-      (((woden_svc_t *) svc)->\
+      (((woden_svc_t *) svc)->ops->\
          get_qname(svc, env))
 
 #define WODEN_SVC_GET_INTERFACE(svc, env) \
-      (((woden_svc_t *) svc)->\
+      (((woden_svc_t *) svc)->ops->\
          get_interface(svc, env))
 
 #define WODEN_SVC_GET_ENDPOINTS(svc, env) \

Modified: webservices/axis2/trunk/c/woden/samples/test_wsdl2.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/test_wsdl2.c?rev=414753&r1=414752&r2=414753&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/samples/test_wsdl2.c (original)
+++ webservices/axis2/trunk/c/woden/samples/test_wsdl2.c Thu Jun 15 23:43:44 2006
@@ -23,6 +23,7 @@
 #include <woden_reader.h>
 #include <woden_desc.h>
 #include <woden_interface.h>
+#include <woden_svc.h>
 
 #include <axiom.h>
 
@@ -43,6 +44,7 @@
     axis2_array_list_t *intfaces = NULL;
     axis2_qname_t *intface_qname = NULL;
     axis2_char_t *filename = NULL;
+    axis2_array_list_t *svc_list = NULL;
     
     if(argc > 1)
     {
@@ -66,6 +68,21 @@
     intfaces = WODEN_DESC_GET_INTERFACES(desc, env);
     intface = AXIS2_ARRAY_LIST_GET(intfaces, env, 0);
     intface_qname = WODEN_INTERFACE_GET_QNAME(intface, env);
+    printf("Interface qname is %s\n", AXIS2_QNAME_TO_STRING(intface_qname, env));
+    svc_list = WODEN_DESC_ELEMENT_GET_SVC_ELEMENTS(desc, env);
+    if (svc_list)
+    {
+        void *svc = NULL;
+        svc = AXIS2_ARRAY_LIST_GET(svc_list, env, 0);
+        if (svc)
+        {
+            axis2_qname_t *svc_qname = WODEN_SVC_GET_QNAME(svc, env);
+            if (svc_qname)
+            {
+                printf("First service qname is %s\n", AXIS2_QNAME_TO_STRING(svc_qname, env));
+            }
+        }
+    }
     return 0;
 }
 

Modified: webservices/axis2/trunk/c/woden/src/util/component_model_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/util/component_model_builder.c?rev=414753&r1=414752&r2=414753&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/util/component_model_builder.c (original)
+++ webservices/axis2/trunk/c/woden/src/util/component_model_builder.c Thu Jun 15 23:43:44
2006
@@ -337,34 +337,41 @@
     
     desc = woden_desc_to_desc_element(desc, env);
     includes = WODEN_DESC_ELEMENT_GET_INCLUDE_ELEMENTS(desc, env);
-    size = AXIS2_ARRAY_LIST_SIZE(includes, env);
-    for(i = 0; i < size; i++)
+    if (includes)
     {
-        void *incl_desc = NULL;
-        void *incl_el = NULL;
-
-        incl_el = AXIS2_ARRAY_LIST_GET(includes, env, i);
-        incl_desc = WODEN_INCLUDE_ELEMENT_GET_DESC_ELEMENT(incl_el, env);
-        if(NULL != incl_desc)
+        size = AXIS2_ARRAY_LIST_SIZE(includes, env);
+        for(i = 0; i < size; i++)
         {
-            init_components(builder, env, incl_desc);
+            void *incl_desc = NULL;
+            void *incl_el = NULL;
+
+            incl_el = AXIS2_ARRAY_LIST_GET(includes, env, i);
+            incl_desc = WODEN_INCLUDE_ELEMENT_GET_DESC_ELEMENT(incl_el, env);
+            if(NULL != incl_desc)
+            {
+                init_components(builder, env, incl_desc);
+            }
         }
     }
      
     imports = WODEN_DESC_ELEMENT_GET_IMPORT_ELEMENTS(desc, env);
-    size = AXIS2_ARRAY_LIST_SIZE(imports, env);
-    for(i = 0; i < size; i++)
+    if (imports)
     {
-        void *imp_desc = NULL;
-        void *imp_el = NULL;
-
-        imp_el = AXIS2_ARRAY_LIST_GET(imports, env, i);
-        imp_desc = WODEN_IMPORT_ELEMENT_GET_DESC_ELEMENT(imp_el, env);
-        if(NULL != imp_desc)
+        size = AXIS2_ARRAY_LIST_SIZE(imports, env);
+        for(i = 0; i < size; i++)
         {
-            init_components(builder, env, imp_desc);
+            void *imp_desc = NULL;
+            void *imp_el = NULL;
+
+            imp_el = AXIS2_ARRAY_LIST_GET(imports, env, i);
+            imp_desc = WODEN_IMPORT_ELEMENT_GET_DESC_ELEMENT(imp_el, env);
+            if(NULL != imp_desc)
+            {
+                init_components(builder, env, imp_desc);
+            }
         }
     }
+    
     return AXIS2_SUCCESS;
 }
 
@@ -1426,8 +1433,9 @@
         void *svc = NULL;
 
         svc = AXIS2_ARRAY_LIST_GET(svcs, env, i);
-        if(AXIS2_TRUE != AXIS2_ARRAY_LIST_CONTAINS(builder_impl->f_svcs_done, 
-                    env, svc))
+        if( builder_impl->f_svcs_done && 
+            (AXIS2_TRUE != AXIS2_ARRAY_LIST_CONTAINS(builder_impl->f_svcs_done, 
+                    env, svc)))
         {
             WODEN_DESC_ADD_TO_ALL_SVCS(builder_impl->f_desc, env, svc);
             if(!builder_impl->f_svcs_done)



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


Mime
View raw message