axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r414447 - in /webservices/axis2/trunk/c/woden: ./ include/ samples/ src/builder/ src/wsdl20/ src/wsdl20/enumeration/
Date Thu, 15 Jun 2006 03:43:08 GMT
Author: damitha
Date: Wed Jun 14 20:43:07 2006
New Revision: 414447

URL: http://svn.apache.org/viewvc?rev=414447&view=rev
Log:
All the link errors are solved and a sampe is added to test with

Added:
    webservices/axis2/trunk/c/woden/samples/
    webservices/axis2/trunk/c/woden/samples/Makefile.am
    webservices/axis2/trunk/c/woden/samples/primer-hotelReservationService.wsdl
    webservices/axis2/trunk/c/woden/samples/test_wsdl2.c
Modified:
    webservices/axis2/trunk/c/woden/configure.ac
    webservices/axis2/trunk/c/woden/include/woden_interface_fault.h
    webservices/axis2/trunk/c/woden/include/woden_interface_fault_ref.h
    webservices/axis2/trunk/c/woden/src/builder/reader.c
    webservices/axis2/trunk/c/woden/src/wsdl20/enumeration/soap_fault_subcodes.c
    webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c

Modified: webservices/axis2/trunk/c/woden/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/configure.ac?rev=414447&r1=414446&r2=414447&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/configure.ac (original)
+++ webservices/axis2/trunk/c/woden/configure.ac Wed Jun 14 20:43:07 2006
@@ -128,6 +128,7 @@
     src/wsdl20/extensions/Makefile \
     src/wsdl20/extensions/soap/Makefile \
     src/builder/Makefile \
+    samples/Makefile \
     test/Makefile
     ])
     

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=414447&r1=414446&r2=414447&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_interface_fault.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_interface_fault.h Wed Jun 14 20:43:07 2006
@@ -76,7 +76,7 @@
             const axis2_env_t *env);
 
     void *(AXIS2_CALL *
-    get_element_declaration) (
+    get_element_decl) (
             void *interface_fault,
             const axis2_env_t *env);
 
@@ -86,7 +86,7 @@
             const axis2_env_t *env);
 
     axis2_status_t (AXIS2_CALL *
-    set_element_declaration) (
+    set_element_decl) (
             void *interface_fault,
             const axis2_env_t *env,
             void *element_decl);
@@ -96,8 +96,6 @@
             void *interface_fault,
             const axis2_env_t *env,
             void *types);
-
-
 };
 
 union woden_interface_fault_base
@@ -197,7 +195,7 @@
 
 #define WODEN_INTERFACE_FAULT_SET_ELEMENT_DECL(interface_fault, env, element_decl) \
       (((woden_interface_fault_t *) interface_fault)->ops->\
-        set_element_declaration (interface_fault, env, element_decl))
+        set_element_decl (interface_fault, env, element_decl))
 
 #define WODEN_INTERFACE_FAULT_SET_TYPES(interface_fault, env, types) \
       (((woden_interface_fault_t *) interface_fault)->ops->\

Modified: webservices/axis2/trunk/c/woden/include/woden_interface_fault_ref.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden_interface_fault_ref.h?rev=414447&r1=414446&r2=414447&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden_interface_fault_ref.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden_interface_fault_ref.h Wed Jun 14 20:43:07
2006
@@ -91,6 +91,15 @@
             void *interface_fault_ref,
             const axis2_env_t *env);
 
+    /* ************************************************************
+     *  Non-API implementation methods
+     * ************************************************************/
+    axis2_status_t (AXIS2_CALL *
+    set_interface_fault) (
+        void *interface_fault_ref,
+        const axis2_env_t *env,
+        void *fault);
+
 };
 
 union woden_interface_fault_ref_base
@@ -192,6 +201,10 @@
 #define WODEN_INTERFACE_FAULT_REF_TO_ELEMENT(interface_fault_ref, env) \
       (((woden_interface_fault_ref_t *) interface_fault_ref)->ops->\
          to_element(interface_fault_ref, env))
+
+#define WODEN_INTERFACE_FAULT_REF_SET_INTERFACE_FAULT(interface_fault_ref, env, fault) \
+      (((woden_interface_fault_ref_t *) interface_fault_ref)->ops->\
+         set_interface_fault(interface_fault_ref, env, fault))
 
 /** @} */
 #ifdef __cplusplus

Added: webservices/axis2/trunk/c/woden/samples/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/Makefile.am?rev=414447&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/samples/Makefile.am (added)
+++ webservices/axis2/trunk/c/woden/samples/Makefile.am Wed Jun 14 20:43:07 2006
@@ -0,0 +1,17 @@
+prgbindir=$(prefix)/bin/samples
+prgbin_PROGRAMS = test_wsdl2
+check_PROGRAMS = test_wsdl2
+test_wsdl2_SOURCES = test_wsdl2.c
+test_wsdl2_LDADD   =  \
+                   	-laxis2_util \
+					-laxis2_axiom \
+					-laxis2_xml_schema \
+                    -laxis2_parser \
+					-lwoden_wsdl20 \
+                    $(GUTHTHILA_LIBS) \
+                    $(LIBXML2_LIBS)
+
+INCLUDES = -I$(top_builddir)/include \
+			@AXIOMINC@ \
+			@UTILINC@ \
+			@XMLSCHEMAINC@

Added: webservices/axis2/trunk/c/woden/samples/primer-hotelReservationService.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/samples/primer-hotelReservationService.wsdl?rev=414447&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/samples/primer-hotelReservationService.wsdl (added)
+++ webservices/axis2/trunk/c/woden/samples/primer-hotelReservationService.wsdl Wed Jun 14
20:43:07 2006
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<description 
+    xmlns="http://www.w3.org/2006/01/wsdl"
+    targetNamespace= "http://greath.example.com/2004/wsdl/resSvc" 
+    xmlns:tns= "http://greath.example.com/2004/wsdl/resSvc"
+    xmlns:ghns = "http://greath.example.com/2004/schemas/resSvc"
+    xmlns:wsoap= "http://www.w3.org/2004/08/wsdl/soap12"
+    xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+
+  <documentation>
+    This document describes the GreatH Web service.  Additional 
+    application-level requirements for use of this service -- 
+    beyond what WSDL 2.0 is able to describe -- are available 
+    at http://greath.example.com/2004/reservation-documentation.html
+  </documentation>
+
+  <types>
+    <xs:schema 
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        targetNamespace="http://greath.example.com/2004/schemas/resSvc"
+        xmlns="http://greath.example.com/2004/schemas/resSvc">
+
+      <xs:element name="checkAvailability" type="tCheckAvailability"/>    
+      <xs:complexType name="tCheckAvailability">     
+        <xs:sequence>      
+          <xs:element  name="checkInDate" type="xs:date"/>      
+          <xs:element  name="checkOutDate" type="xs:date"/>      
+          <xs:element  name="roomType" type="xs:string"/>      
+        </xs:sequence>     
+      </xs:complexType>   
+            
+      <xs:element name="checkAvailabilityResponse" type="xs:double"/>    
+    
+      <xs:element name="invalidDataError" type="xs:string"/>    
+
+    </xs:schema>    
+  </types>
+  
+  <interface  name = "reservationInterface" >
+
+    <fault name = "invalidDataFault"
+            element = "ghns:invalidDataError"/> 
+   
+    <operation name="opCheckAvailability" 
+            pattern="http://www.w3.org/2004/03/wsdl/in-out" >
+        <input messageLabel="In" 
+              element="ghns:checkAvailability" />
+        <output messageLabel="Out" 
+              element="ghns:checkAvailabilityResponse" />
+        <outfault ref="tns:invalidDataFault" messageLabel="Out"/>
+    </operation>
+
+  </interface>
+
+  <binding name="reservationSOAPBinding" 
+	  interface="tns:reservationInterface"
+	  type="http://www.w3.org/2004/08/wsdl/soap12"
+	  wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP">
+
+    <operation ref="tns:opCheckAvailability" 
+      wsoap:mep="http://www.w3.org/2003/05/soap/mep/request-response"/>
+  
+    <fault ref="tns:invalidDataFault" 
+      wsoap:code="soap:Sender"/>
+
+  </binding>
+
+  <service name="reservationService" 
+       interface="tns:reservationInterface">
+
+     <endpoint name="reservationEndpoint" 
+               binding="tns:reservationSOAPBinding"
+               address ="http://greath.example.com/2004/reservation"/>
+        
+  </service>
+
+</description>

Added: 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=414447&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/samples/test_wsdl2.c (added)
+++ webservices/axis2/trunk/c/woden/samples/test_wsdl2.c Wed Jun 14 20:43:07 2006
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <axiom.h>
+#include <axis2_xml_reader.h>
+#include <axis2_env.h>
+#include <axis2_utils.h>
+#include <platforms/axis2_platform_auto_sense.h>
+#include <woden_reader.h>
+#include <woden_desc.h>
+#include <woden_interface.h>
+
+#include <axiom.h>
+
+static axiom_document_t* 
+get_root_element_from_filename(
+        const axis2_env_t *env, 
+        axis2_char_t *filename);
+
+int main(int argc, char *argv[])
+{
+    axis2_env_t *env = NULL;
+    axiom_document_t *om_doc = NULL;
+    axis2_char_t *doc_base_uri = NULL;
+    axis2_char_t *axis2c_home = NULL;
+    woden_reader_t *reader = NULL;
+    void *desc = NULL;
+    void *intface = NULL;
+    axis2_array_list_t *intfaces = NULL;
+    axis2_qname_t *intface_qname = NULL;
+    axis2_char_t *filename = NULL;
+    
+    if(argc > 1)
+    {
+        filename = argv[1];
+        printf("filename:%s\n", filename);
+    }
+    else
+    {
+        printf("Give a wsdl2 file name and continue\n");
+        return 0;        
+    }
+    
+    env = axis2_env_create_all("test.log", 1);
+    
+    om_doc = get_root_element_from_filename(env, filename);
+    axis2c_home = AXIS2_GETENV("AXIS2C_HOME");
+    doc_base_uri = AXIS2_STRACAT (axis2c_home, "/woden", env);
+    reader = woden_reader_create(env);
+    
+    desc = (void *)WODEN_READER_READ_WSDL(reader, env, om_doc, doc_base_uri);
+    intfaces = WODEN_DESC_GET_INTERFACES(desc, env);
+    intface = AXIS2_ARRAY_LIST_GET(intfaces, env, 0);
+    intface_qname = WODEN_INTERFACE_GET_QNAME(intface, env);
+    return 0;
+}
+
+static axiom_document_t* 
+get_root_element_from_filename(
+        const axis2_env_t *env, 
+        axis2_char_t *filename)
+{
+    axis2_xml_reader_t *reader = NULL;
+    axiom_stax_builder_t *om_builder = NULL;
+    axiom_document_t *doc   = NULL;
+
+    reader = axis2_xml_reader_create_for_file(env, filename, NULL);
+    om_builder = axiom_stax_builder_create(env, reader);
+    doc = axiom_document_create(env, NULL, om_builder); 
+    AXIOM_DOCUMENT_BUILD_ALL(doc, env);
+
+    return doc;    
+}
+

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=414447&r1=414446&r2=414447&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/builder/reader.c (original)
+++ webservices/axis2/trunk/c/woden/src/builder/reader.c Wed Jun 14 20:43:07 2006
@@ -461,7 +461,7 @@
                     sizeof(woden_reader_ops_t));
     
     reader_impl->f_imported_schemas = axis2_hash_make(env);
-    if(reader_impl->f_imported_schemas)
+    if(!reader_impl->f_imported_schemas)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -481,7 +481,7 @@
 {
     woden_reader_impl_t *reader_impl = NULL;
    
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, NULL);
     reader_impl = (woden_reader_impl_t *) create(env);
 
     return &(reader_impl->reader);

Modified: webservices/axis2/trunk/c/woden/src/wsdl20/enumeration/soap_fault_subcodes.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/enumeration/soap_fault_subcodes.c?rev=414447&r1=414446&r2=414447&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/enumeration/soap_fault_subcodes.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/enumeration/soap_fault_subcodes.c Wed Jun 14
20:43:07 2006
@@ -167,7 +167,7 @@
 }
 
 axis2_bool_t AXIS2_CALL
-woden_soap_fault_subcodes_get_soap_fault_subcodes_is_qnames(
+woden_soap_fault_subcodes_is_qnames(
         void *soap_fault_subcodes,
         const axis2_env_t *env)
 {

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=414447&r1=414446&r2=414447&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/interface_fault.c Wed Jun 14 20:43:07 2006
@@ -75,7 +75,7 @@
         const axis2_env_t *env);
 
 void *AXIS2_CALL
-woden_interface_fault_get_element_declaration(
+woden_interface_fault_get_element_decl(
         void *interface_fault,
         const axis2_env_t *env);
 
@@ -114,7 +114,7 @@
  * ******************************************************************/
 
 axis2_status_t AXIS2_CALL
-woden_interface_fault_set_element_declaration(
+woden_interface_fault_set_element_decl(
         void *interface_fault,
         const axis2_env_t *env,
         void *element_decl);
@@ -414,12 +414,12 @@
     interface_fault_impl->interface_fault.ops->get_base_impl = woden_interface_fault_get_base_impl;
     
     interface_fault_impl->interface_fault.ops->get_qname = woden_interface_fault_get_qname;
-    interface_fault_impl->interface_fault.ops->get_element_declaration = 
-        woden_interface_fault_get_element_declaration;
+    interface_fault_impl->interface_fault.ops->get_element_decl = 
+        woden_interface_fault_get_element_decl;
     interface_fault_impl->interface_fault.ops->to_element = 
         woden_interface_fault_to_element;
-    interface_fault_impl->interface_fault.ops->set_element_declaration = 
-        woden_interface_fault_set_element_declaration;
+    interface_fault_impl->interface_fault.ops->set_element_decl = 
+        woden_interface_fault_set_element_decl;
     interface_fault_impl->interface_fault.ops->set_types = 
         woden_interface_fault_set_types;
  
@@ -439,9 +439,9 @@
     axis2_hash_set(interface_fault_impl->methods, "get_qname", 
             AXIS2_HASH_KEY_STRING, 
             woden_interface_fault_get_qname);
-    axis2_hash_set(interface_fault_impl->methods, "get_element_declaration", 
+    axis2_hash_set(interface_fault_impl->methods, "get_element_decl", 
             AXIS2_HASH_KEY_STRING, 
-            woden_interface_fault_get_element_declaration);
+            woden_interface_fault_get_element_decl);
     axis2_hash_set(interface_fault_impl->methods, "to_element", 
             AXIS2_HASH_KEY_STRING, 
             woden_interface_fault_to_element);
@@ -457,9 +457,9 @@
     axis2_hash_set(interface_fault_impl->methods, "get_element", 
             AXIS2_HASH_KEY_STRING, 
             woden_interface_fault_get_element);
-    axis2_hash_set(interface_fault_impl->methods, "set_element_declaration", 
+    axis2_hash_set(interface_fault_impl->methods, "set_element_decl", 
             AXIS2_HASH_KEY_STRING, 
-            woden_interface_fault_set_element_declaration);
+            woden_interface_fault_set_element_decl);
     axis2_hash_set(interface_fault_impl->methods, "set_types", 
             AXIS2_HASH_KEY_STRING, 
             woden_interface_fault_set_types);
@@ -722,11 +722,11 @@
             interface_fault->ops->get_qname = 
             interface_fault_impl_l->interface_fault.ops->get_qname;
     
-    interface_fault->ops->get_element_declaration = axis2_hash_get(methods, 
-            "get_element_declaration", AXIS2_HASH_KEY_STRING);
-    if(!interface_fault->ops->get_element_declaration && interface_fault_impl_l)
-            interface_fault->ops->get_element_declaration = 
-            interface_fault_impl_l->interface_fault.ops->get_element_declaration;
+    interface_fault->ops->get_element_decl = axis2_hash_get(methods, 
+            "get_element_decl", AXIS2_HASH_KEY_STRING);
+    if(!interface_fault->ops->get_element_decl && interface_fault_impl_l)
+            interface_fault->ops->get_element_decl = 
+            interface_fault_impl_l->interface_fault.ops->get_element_decl;
     
     interface_fault->ops->to_element = axis2_hash_get(methods, 
             "to_element", AXIS2_HASH_KEY_STRING);
@@ -734,11 +734,11 @@
             interface_fault->ops->to_element = 
             interface_fault_impl_l->interface_fault.ops->to_element;
     
-    interface_fault->ops->set_element_declaration = axis2_hash_get(methods, 
-            "set_element_declaration", AXIS2_HASH_KEY_STRING);
-    if(!interface_fault->ops->set_element_declaration && interface_fault_impl_l)
-            interface_fault->ops->set_element_declaration = 
-            interface_fault_impl_l->interface_fault.ops->set_element_declaration;
+    interface_fault->ops->set_element_decl = axis2_hash_get(methods, 
+            "set_element_decl", AXIS2_HASH_KEY_STRING);
+    if(!interface_fault->ops->set_element_decl && interface_fault_impl_l)
+            interface_fault->ops->set_element_decl = 
+            interface_fault_impl_l->interface_fault.ops->set_element_decl;
     
     interface_fault->ops->set_types = axis2_hash_get(methods, 
             "set_types", AXIS2_HASH_KEY_STRING);
@@ -769,7 +769,7 @@
 }
 
 void *AXIS2_CALL
-woden_interface_fault_get_element_declaration(
+woden_interface_fault_get_element_decl(
         void *interface_fault,
         const axis2_env_t *env)
 {
@@ -890,7 +890,7 @@
 }
 
 axis2_status_t AXIS2_CALL
-woden_interface_fault_set_element_declaration(
+woden_interface_fault_set_element_decl(
         void *interface_fault,
         const axis2_env_t *env,
         void *element_decl)



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