ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r399097 - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c: ArrayParamHeaderWriter.java ParmHeaderFileWriter.java literal/ClientStubHeaderWriter.java
Date Wed, 03 May 2006 00:15:23 GMT
Author: nadiramra
Date: Tue May  2 17:15:20 2006
New Revision: 399097

URL: http://svn.apache.org/viewcvs?rev=399097&view=rev
Log:
C support fixes/enhancements. Beautify generated header files.

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java?rev=399097&r1=399096&r2=399097&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
Tue May  2 17:15:20 2006
@@ -121,21 +121,21 @@
         try
         {
             writer.write("\n");
-            writer.write("/* ************************************************************
*/\n");
-            writer.write("/* --- Array type                                           ---
*/\n");
-            writer.write("/* ************************************************************
*/\n");
+            writer.write("/* *********************************************************************
*/\n");
+            writer.write("/* --- Array type                                             
      --- */\n");
+            writer.write("/* *********************************************************************
*/\n");
             writer.write("\n");                
             
             writer.write("typedef struct " + classname + "Tag {\n"
-                       + "   struct " + attribs[0].getTypeName() + "Tag **   m_Array;\n"
-                       + "   int   m_Size;\n"
-                       + "   AXISC_XSDTYPE   m_Type;\n"
+                       + "\tstruct " + attribs[0].getTypeName() + "Tag **   m_Array;\n"
+                       + "\tint   m_Size;\n"
+                       + "\tAXISC_XSDTYPE   m_Type;\n"
                        + "} " + classname + ";\n"); 
             
             writer.write("\n");
-            writer.write("/* ************************************************************
*/\n");
-            writer.write("/* --- Functions to create/delete array type                ---
*/\n");
-            writer.write("/* ************************************************************
*/\n");
+            writer.write("/* *********************************************************************
*/\n");
+            writer.write("/* --- Functions to create/delete array type                  
      --- */\n");
+            writer.write("/* *********************************************************************
*/\n");
             writer.write("\n");                
 
             this.writeConstructors();

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java?rev=399097&r1=399096&r2=399097&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
Tue May  2 17:15:20 2006
@@ -77,9 +77,9 @@
                 this.writer.write("\n#ifdef __cplusplus\n extern \"C\" {\n#endif\n\n");
 
                 writer.write("\n");
-                writer.write("/* ************************************************************
*/\n");
-                writer.write("/* --- Custom type                                        
 --- */\n");
-                writer.write("/* ************************************************************
*/\n");
+                writer.write("/* *********************************************************************
*/\n");
+                writer.write("/* --- Custom type                                        
          --- */\n");
+                writer.write("/* *********************************************************************
*/\n");
                 writer.write("\n");                
                 
                 this.writer.write("typedef struct " + classname + "Tag {\n");
@@ -115,17 +115,22 @@
         try
         {
             writer.write("#include <axis/AxisUserAPI.h>\n");
-            writer.write("\n");
 
             Vector restrictionData = type.getEnumerationdata();
             if (restrictionData == null)
-                return;
-
+                return;            
+            
             TypeEntry baseEType = (TypeEntry) restrictionData.firstElement();
             QName baseType = baseEType.getQName();
             if (!CUtils.isSimpleType(baseType))
                 return;
-
+            
+            writer.write("\n");
+            writer.write("/* *********************************************************************
*/\n");
+            writer.write("/* --- Simple types and enumerations                          
      --- */\n");
+            writer.write("/* *********************************************************************
*/\n");
+            writer.write("\n");                
+            
             String langTypeName = CUtils.getclass4qname(baseType);
             writer.write("typedef ");
             if (CUtils.isPointerType(CUtils.getclass4qname(baseType)) 
@@ -134,6 +139,7 @@
             {
                 writer.write(langTypeName + " " + classname + ";\n");
                 writer.write("typedef " + langTypeName + "_Array " + classname + "_Array;\n");
+                writer.write("\n");
                 
                 for (int i = 1; i < restrictionData.size(); i++)
                 {
@@ -209,6 +215,7 @@
             else
             {
                 writer.write(langTypeName + " " + classname + ";\n");
+                writer.write("\n");
                 for (int i = 1; i < restrictionData.size(); i++)
                 {
                     QName value = (QName) restrictionData.elementAt(i);
@@ -389,10 +396,9 @@
             if (itr.hasNext())
             {
                 writer.write("\n");
-                writer.write("/* ************************************************************
*/\n");
-                writer.write("/* --- Functions to create/delete, serialize/deserialize  
 --- */\n");
-                writer.write("/* --- custom type                                        
 --- */\n");
-                writer.write("/* ************************************************************
*/\n");
+                writer.write("/* *********************************************************************
*/\n");
+                writer.write("/* --- Functions to create/delete, serialize/deserialize custom
type --- */\n");
+                writer.write("/* *********************************************************************
*/\n");
                 writer.write("\n");                
             }
             
@@ -447,6 +453,9 @@
             }
             
             Iterator itr = typeSet.iterator();
+            if (itr.hasNext())
+                writer.write("\n");    
+            
             while (itr.hasNext())
             {
                 // Do not want to include the header file we are generating!

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java?rev=399097&r1=399096&r2=399097&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubHeaderWriter.java
Tue May  2 17:15:20 2006
@@ -54,18 +54,18 @@
         try
         {
             writer.write("\n");
-            writer.write("/* ************************************************************
*/\n");
-            writer.write("/* --- Functions relating to web service client proxy       ---
*/\n");
-            writer.write("/* ************************************************************
*/\n");
+            writer.write("/* *********************************************************************
*/\n");
+            writer.write("/* --- Functions relating to web service client proxy         
      --- */\n");
+            writer.write("/* *********************************************************************
*/\n");
             writer.write("\n");
             writer.write("extern AXISCHANDLE get_" + classname + "_stub(const char* pchEndPointUri);\n");
             writer.write("extern void destroy_" + classname + "_stub(AXISCHANDLE pStub);\n");
             writer.write("extern int get_" + classname + "_Status(AXISCHANDLE pStub);\n");
 
             writer.write("\n");
-            writer.write("/* ************************************************************
*/\n");
-            writer.write("/* --- Functions relating to web service methods            ---
*/\n");
-            writer.write("/* ************************************************************
*/\n");
+            writer.write("/* *********************************************************************
*/\n");
+            writer.write("/* --- Functions relating to web service methods              
      --- */\n");
+            writer.write("/* *********************************************************************
*/\n");
             writer.write("\n");
 
             for (int i = 0; i < methods.size(); i++)



Mime
View raw message