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 sa...@apache.org on 2006/09/14 15:40:29 UTC

svn commit: r443351 [1/4] - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/template/ adb-codegen/src/org/apache/axis2/schema/writer/ codegen/src/org/apache/axis2/wsdl/codegen/emitter/ codegen/src/org/apache/axis2/wsdl...

Author: samisa
Date: Thu Sep 14 06:40:28 2006
New Revision: 443351

URL: http://svn.apache.org/viewvc?view=rev&rev=443351
Log:
Adding patches by Dimuthu to fix compilation problems

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateHeader.xsl
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CTypeInfo.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateHeader.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateHeader.xsl?view=diff&rev=443351&r1=443350&r2=443351
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateHeader.xsl (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateHeader.xsl Thu Sep 14 06:40:28 2006
@@ -2,7 +2,7 @@
     <xsl:output method="text"/>
 
      <!-- cater for the multiple classes - wrappped mode -->
-    <xsl:template match="/beans">
+    <xsl:template match="/classs">
         <xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
         <xsl:variable name="axis2_name">axi2_<xsl:value-of select="@name"/></xsl:variable>
         <xsl:variable name="caps_axis2_name">AXIS2_<xsl:value-of select="@caps-name"/></xsl:variable>
@@ -36,7 +36,7 @@
         #define AXIS2_DEFAULT_DIGIT_LIMIT 128
 
         /**
-        *  <xsl:value-of select="$axis2_name"/> wrapped bean classes ( structure for C )
+        *  <xsl:value-of select="$axis2_name"/> wrapped class classes ( structure for C )
         */
 
         <xsl:apply-templates/>
@@ -55,7 +55,7 @@
     </xsl:template>
 
 
-    <xsl:template match="bean">
+    <xsl:template match="class">
         <xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
         <xsl:variable name="axis2_name">axis2_<xsl:value-of select="@name"/></xsl:variable>
         <xsl:variable name="caps_axis2_name">AXIS2_<xsl:value-of select="@caps-name"/></xsl:variable>
@@ -76,6 +76,13 @@
           #include "<xsl:value-of select="$propertyType"/>.h"
           </xsl:if>
         </xsl:for-each>
+        <!--include special headers-->
+        <xsl:if test="property/@type='axis2_date_time_t*'">
+          #include &lt;axis2_date_time.h&gt;
+        </xsl:if>
+        <xsl:if test="property/@type='axis2_base64_binary_t*'">
+          #include &lt;axis2_base64_binary.h&gt;
+        </xsl:if>
 
         #include &lt;stdio.h&gt;
         #include &lt;axiom.h&gt;
@@ -90,7 +97,7 @@
 
         #define AXIS2_DEFAULT_DIGIT_LIMIT 64
         /**
-        *  <xsl:value-of select="$axis2_name"/> bean class
+        *  <xsl:value-of select="$axis2_name"/> class class
         */
         typedef struct <xsl:value-of select="$axis2_name"/><xsl:text> </xsl:text><xsl:value-of select="$axis2_name"/>_t;
         typedef struct <xsl:value-of select="$axis2_name"/>_ops<xsl:text> </xsl:text><xsl:value-of select="$axis2_name"/>_ops_t;
@@ -102,46 +109,54 @@
                 <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of select="$name"/>,
                 const axis2_env_t *env);
 
-            axis2_qname_t* (AXIS2_CALL*
-            get_qname )(
-                <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of select="$name"/>,
-                const axis2_env_t *env);
+            <xsl:if test="not(@type)">
+              axis2_qname_t* (AXIS2_CALL*
+              get_qname )(
+                  <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of select="$name"/>,
+                  const axis2_env_t *env);
+            </xsl:if>
 
-            axis2_status_t (AXIS2_CALL*
+            axiom_node_t* (AXIS2_CALL*
             parse_om )(
                 <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of select="$name"/>,
                 const axis2_env_t *env,
                 axiom_node_t* <xsl:value-of select="$name"/>_om_node);
 
-            axiom_node_t* (AXIS2_CALL*
+            axis2_status_t (AXIS2_CALL*
             build_om )(
                 <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of select="$name"/>,
-                const axis2_env_t *env, axiom_node_t* parent,
-                axiom_namespace_t* xsi, axiom_namespace_t* xsd);
+                const axis2_env_t *env, axiom_node_t* parent);
 
             <xsl:for-each select="property">
-                <xsl:variable name="propertyType"><xsl:if test="@ours">axis2_</xsl:if><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:value-of select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if><xsl:if test="@isarray">*</xsl:if> </xsl:variable>
+                <xsl:variable name="propertyType">
+                   <xsl:choose>
+                     <xsl:when test="@isarray">axis2_array_list_t*</xsl:when>
+                     <xsl:when test="not(@type)">axiom_node_t*</xsl:when> <!-- these are anonymous -->
+                     <xsl:when test="@ours">axis2_<xsl:value-of select="@type"/>_t*</xsl:when>
+                     <xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
+                   </xsl:choose>
+                </xsl:variable>
                 <xsl:variable name="propertyName"><xsl:value-of select="@name"></xsl:value-of></xsl:variable>
-                <xsl:variable name="javaName"><xsl:value-of select="@javaname"></xsl:value-of></xsl:variable>
+                <xsl:variable name="CName"><xsl:value-of select="@cname"></xsl:value-of></xsl:variable>
 
-                /**
+               /**
                 * Auto generated getter method
                 * @return <xsl:value-of select="$propertyName"/>
                 */
                 <xsl:value-of select="$propertyType"/> (AXIS2_CALL*
-                get_<xsl:value-of select="$propertyName"/>)(
+                get_<xsl:value-of select="$CName"/>)(
                         <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of select="$name"/>,
-                        const axis2_env_t *env<xsl:if test="@isarray">, int* length</xsl:if>);
+                        const axis2_env_t *env);
 
-                /**
+               /**
                 * Auto generated setter method
                 * @param param <xsl:value-of select="$propertyName"/>
                 */
                 axis2_status_t (AXIS2_CALL*
-                set_<xsl:value-of select="$propertyName"/>)(
+                set_<xsl:value-of select="$CName"/>)(
                         <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of select="$name"/>,
                         const axis2_env_t *env,
-                        <xsl:value-of select="$propertyType"/> param<xsl:if test="@isarray">, int length</xsl:if>);
+                        <xsl:value-of select="$propertyType"/><xsl:text> </xsl:text> param_<xsl:value-of select="$CName"/>);
 
 
             </xsl:for-each>
@@ -158,24 +173,27 @@
 
         #define <xsl:value-of select="$caps_axis2_name"/>_FREE(<xsl:value-of select="$name"/>, env) \
              ((<xsl:value-of select="$name"/>)->ops->free(<xsl:value-of select="$name"/>, env))
-        #define <xsl:value-of select="$caps_axis2_name"/>_GET_QNAME(<xsl:value-of select="$name"/>, env) \
-             ((<xsl:value-of select="$name"/>)->ops->get_qname(<xsl:value-of select="$name"/>, env))
+        <xsl:if test="not(@type)">
+          #define <xsl:value-of select="$caps_axis2_name"/>_GET_QNAME(<xsl:value-of select="$name"/>, env) \
+               ((<xsl:value-of select="$name"/>)->ops->get_qname(<xsl:value-of select="$name"/>, env))
+        </xsl:if>
         #define <xsl:value-of select="$caps_axis2_name"/>_PARSE_OM(<xsl:value-of select="$name"/>, env, node) \
              ((<xsl:value-of select="$name"/>)->ops->parse_om(<xsl:value-of select="$name"/>, env, node))
-        #define <xsl:value-of select="$caps_axis2_name"/>_BUILD_OM(<xsl:value-of select="$name"/>, env, parent, xsi, xsd) \
-             ((<xsl:value-of select="$name"/>)->ops->build_om(<xsl:value-of select="$name"/>, env, parent, xsi, xsd))
+        #define <xsl:value-of select="$caps_axis2_name"/>_BUILD_OM(<xsl:value-of select="$name"/>, env, parent) \
+             ((<xsl:value-of select="$name"/>)->ops->build_om(<xsl:value-of select="$name"/>, env, parent))
 
         <xsl:for-each select="property">
             <xsl:variable name="propertyType"><xsl:value-of select="@type"></xsl:value-of></xsl:variable>
             <xsl:variable name="propertyName"><xsl:value-of select="@name"></xsl:value-of></xsl:variable>
             <xsl:variable name="capspropertyName"><xsl:value-of select="@caps-name"></xsl:value-of></xsl:variable>
-            <xsl:variable name="javaName"><xsl:value-of select="@javaname"></xsl:value-of></xsl:variable>
+            <xsl:variable name="CName"><xsl:value-of select="@cname"></xsl:value-of></xsl:variable>
+            <xsl:variable name="capsCName"><xsl:value-of select="@caps-cname"></xsl:value-of></xsl:variable>
 
-            #define <xsl:value-of select="$caps_axis2_name"/>_GET_<xsl:value-of select="$capspropertyName"/>(<xsl:value-of select="$name"/>, env<xsl:if test="@isarray">, length</xsl:if>) \
-                 ((<xsl:value-of select="$name"/>)->ops->get_<xsl:value-of select="$propertyName"/>(<xsl:value-of select="$name"/>, env<xsl:if test="@isarray">, length</xsl:if>))
+            #define <xsl:value-of select="$caps_axis2_name"/>_GET_<xsl:value-of select="$capsCName"/>(<xsl:value-of select="$name"/>, env) \
+                 ((<xsl:value-of select="$name"/>)->ops->get_<xsl:value-of select="$CName"/>(<xsl:value-of select="$name"/>, env))
 
-            #define <xsl:value-of select="$caps_axis2_name"/>_SET_<xsl:value-of select="$capspropertyName"/>(<xsl:value-of select="$name"/>, env, param<xsl:if test="@isarray">, length</xsl:if>) \
-                 ((<xsl:value-of select="$name"/>)->ops->set_<xsl:value-of select="$propertyName"/>(<xsl:value-of select="$name"/>, env, param<xsl:if test="@isarray">, length</xsl:if>))
+            #define <xsl:value-of select="$caps_axis2_name"/>_SET_<xsl:value-of select="$capsCName"/>(<xsl:value-of select="$name"/>, env, param) \
+                 ((<xsl:value-of select="$name"/>)->ops->set_<xsl:value-of select="$CName"/>(<xsl:value-of select="$name"/>, env, param))
 
         </xsl:for-each>
      #ifdef __cplusplus



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