axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r428236 - in /webservices/axis2/trunk/c/woden/samples: test_wsdl2.c wsdl10/test_wsdl1.c
Date Thu, 03 Aug 2006 04:50:44 GMT
Author: damitha
Date: Wed Aug  2 21:50:44 2006
New Revision: 428236

URL: http://svn.apache.org/viewvc?rev=428236&view=rev
Log:
Improvements done on wsdl2 sample

Modified:
    webservices/axis2/trunk/c/woden/samples/test_wsdl2.c
    webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c

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=428236&r1=428235&r2=428236&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/samples/test_wsdl2.c (original)
+++ webservices/axis2/trunk/c/woden/samples/test_wsdl2.c Wed Aug  2 21:50:44 2006
@@ -25,6 +25,8 @@
 #include <woden_interface.h>
 #include <woden_endpoint.h>
 #include <woden_svc.h>
+#include <woden_binding.h>
+#include <woden_element_decl.h>
 
 #include <axiom.h>
 
@@ -47,6 +49,10 @@
     axis2_qname_t *intface_qname = NULL;
     axis2_char_t *filename = NULL;
     axis2_array_list_t *svc_list = NULL;
+    axis2_array_list_t *binding_list = NULL;
+    axis2_array_list_t *ed_list = NULL;
+    void *ed = NULL;
+    axis2_qname_t *ed_qname = NULL;
     
     if(argc > 1)
     {
@@ -67,10 +73,15 @@
     resolver = woden_resolver_create(env);
     
     desc = WODEN_RESOLVER_READ(resolver, env, om_doc, doc_base_uri);
+    AXIS2_FREE(env->allocator, doc_base_uri);
+    WODEN_RESOLVER_FREE(resolver, env);
     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));
+    if(intface)
+        intface_qname = WODEN_INTERFACE_GET_QNAME(intface, env);
+    if(intface_qname)
+        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)
     {
@@ -84,7 +95,8 @@
             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));
+                printf("First service qname is %s\n", AXIS2_QNAME_TO_STRING(
+                            svc_qname, env));
             }
             endpoints = WODEN_SVC_GET_ENDPOINTS(svc, env);
             if(endpoints)
@@ -111,6 +123,56 @@
                     printf("ep_ncname:%s\n", ep_ncname); 
                 }
             }
+        }
+    }
+    binding_list = WODEN_DESC_ELEMENT_GET_BINDING_ELEMENTS(desc, env);
+    if (binding_list)
+    {
+        void *binding = NULL;
+        binding = AXIS2_ARRAY_LIST_GET(binding_list, env, 0);
+        if (binding)
+        {
+            axis2_qname_t *binding_qname = WODEN_BINDING_GET_QNAME(binding, env);
+            if (binding_qname)
+            {
+                printf("First binding qname is %s\n", AXIS2_QNAME_TO_STRING(
+                            binding_qname, env));
+            }
+        }
+    }
+
+    ed_list = WODEN_DESC_GET_ELEMENT_DECLS(desc, env);
+    if (ed_list)
+    {
+        
+        ed = AXIS2_ARRAY_LIST_GET(ed_list, env, 0);
+        if (ed)
+            ed_qname = WODEN_ELEMENT_DECL_GET_QNAME(ed, env);
+    }
+    ed = WODEN_DESC_GET_ELEMENT_DECL(desc, env, ed_qname);
+    if (ed)
+    {
+        axis2_char_t *content_model = NULL;
+        axis2_generic_obj_t *obj = NULL;
+        
+        axis2_qname_t *ed_qname = WODEN_ELEMENT_DECL_GET_QNAME(ed, env);
+        if (ed_qname)
+        {
+            printf("Element declaration qname is %s\n", AXIS2_QNAME_TO_STRING(
+                        ed_qname, env));
+        }
+        content_model = WODEN_ELEMENT_DECL_GET_CONTENT_MODEL(ed, env);
+        if (content_model)
+        {
+            printf("Content model is %s\n", content_model);
+        }
+        obj = WODEN_ELEMENT_DECL_GET_CONTENT(ed, env);
+        if (obj)
+        {
+            void *value = NULL;
+
+            value = AXIS2_GENERIC_OBJ_GET_VALUE(obj, env);
+            printf("Content is:\n");
         }
     }
     om_builder = AXIOM_DOCUMENT_GET_BUILDER(om_doc, env);

Modified: webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c?rev=428236&r1=428235&r2=428236&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c (original)
+++ webservices/axis2/trunk/c/woden/samples/wsdl10/test_wsdl1.c Wed Aug  2 21:50:44 2006
@@ -82,7 +82,8 @@
         intface_qname = WODEN_INTERFACE_GET_QNAME(intface, env);
     }
     if (intface_qname) 
-        printf("Interface qname is %s\n", AXIS2_QNAME_TO_STRING(intface_qname, env));
+        printf("Interface qname is %s\n", AXIS2_QNAME_TO_STRING(intface_qname, 
+                    env));
     svc_list = WODEN_WSDL10_DESC_ELEMENT_GET_SVC_ELEMENTS(desc, env);
     if (svc_list)
     {
@@ -95,7 +96,8 @@
             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));
+                printf("First service qname is %s\n", AXIS2_QNAME_TO_STRING(
+                            svc_qname, env));
             }
             endpoints = WODEN_SVC_GET_ENDPOINTS(svc, env);
             if(endpoints)
@@ -134,7 +136,8 @@
             axis2_qname_t *binding_qname = WODEN_BINDING_GET_QNAME(binding, env);
             if (binding_qname)
             {
-                printf("First binding qname is %s\n", AXIS2_QNAME_TO_STRING(binding_qname,
env));
+                printf("First binding qname is %s\n", AXIS2_QNAME_TO_STRING(
+                            binding_qname, env));
             }
         }
     }



---------------------------------------------------------------------
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