axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1240222 - in /axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws: c/BeanParamWriter.java c/ParamCFileWriter.java c/ParmHeaderFileWriter.java cpp/BeanParamWriter.java cpp/ParamCPPFileWriter.java cpp/ParmHeaderFileWriter.java
Date Fri, 03 Feb 2012 15:50:02 GMT
Author: nadiramra
Date: Fri Feb  3 15:50:02 2012
New Revision: 1240222

URL: http://svn.apache.org/viewvc?rev=1240222&view=rev
Log:
AXISCPP-1086 base extension type with '.' in name is not sanitized so code does not compile

Modified:
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java?rev=1240222&r1=1240221&r2=1240222&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java Fri Feb
 3 15:50:02 2012
@@ -456,10 +456,10 @@ public class BeanParamWriter extends Par
                 c_writer.write("\t\tparam->" + extensionBaseAttrib.getParamNameAsMember()
+ " = ");
                 
                 if (CUtils.isPointerType(typeName))
-                    c_writer.write("(" + typeName + ") pCharDataAs;\n");
+                    c_writer.write("(" + CUtils.sanitizeString(typeName) + ") pCharDataAs;\n");
                 else
                 {
-                    c_writer.write(" *(" + typeName + "*) pCharDataAs;\n");
+                    c_writer.write(" *(" + CUtils.sanitizeString(typeName) + "*) pCharDataAs;\n");
                     c_writer.write("\t\taxiscAxisDelete(pCharDataAs, " + xsdType + ");\n");
                 }      
                 c_writer.write("\t}\n"); // ==== end scope

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java?rev=1240222&r1=1240221&r2=1240222&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java Fri Feb
 3 15:50:02 2012
@@ -57,6 +57,11 @@ public abstract class ParamCFileWriter e
      */
     public void writeSource() throws WrapperFault
     {
+        // TODO Makes no sense to write out restriction checking function that is incomplete
+        //      AND that we do not use.  So for now, do not write  out it out. 
+        if (type.isSimpleType())
+            return;
+        
         try
         {
             c_writer = new BufferedWriter(new FileWriter(getFilePath(false), false));

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java?rev=1240222&r1=1240221&r2=1240222&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java Fri
Feb  3 15:50:02 2012
@@ -296,7 +296,7 @@ public class ParmHeaderFileWriter extend
                 getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib) !=
null)
             {
                 c_writer.write("\t"
-                             + getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib)
+                             + CUtils.sanitizeString(getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib))
                              + "  "
                              + extensionBaseAttrib.getParamNameAsMember() + ";\n");
             }            
@@ -426,7 +426,7 @@ public class ParmHeaderFileWriter extend
                     extBaseType = extBaseType.substring(0, extBaseType.lastIndexOf("*"));
 
                 if (!CUtils.isPrimitiveType(extBaseType))
-                    typeSet.add(extBaseType);
+                    typeSet.add(CUtils.sanitizeString(extBaseType));
             }            
             
             Iterator itr = typeSet.iterator();

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?rev=1240222&r1=1240221&r2=1240222&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java Fri
Feb  3 15:50:02 2012
@@ -674,10 +674,10 @@ public class BeanParamWriter extends Par
                 c_writer.write("\tparam->" + extensionBaseAttrib.getParamNameAsMember()
+ " = ");
                 
                 if (CUtils.isPointerType(typeName))
-                    c_writer.write("(" + typeName + ") pCharDataAs;\n");
+                    c_writer.write("(" + CUtils.sanitizeString(typeName) + ") pCharDataAs;\n");
                 else
                 {
-                    c_writer.write(" *(" + typeName + "*) pCharDataAs;\n");
+                    c_writer.write(" *(" + CUtils.sanitizeString(typeName) + "*) pCharDataAs;\n");
                     c_writer.write("\tAxis::AxisDelete( pCharDataAs, " + xsdType + ");\n");
                 }    
             }

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java?rev=1240222&r1=1240221&r2=1240222&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java Fri
Feb  3 15:50:02 2012
@@ -52,6 +52,11 @@ public abstract class ParamCPPFileWriter
 
     public void writeSource() throws WrapperFault
     {
+        // TODO Makes no sense to write out restriction checking function that is incomplete
+        //      AND that we do not use.  So for now, do not write  out it out. 
+        if (type.isSimpleType())
+            return;
+
         try
         {
             c_writer = new BufferedWriter(new FileWriter(getFilePath(false), false));

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java?rev=1240222&r1=1240221&r2=1240222&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
Fri Feb  3 15:50:02 2012
@@ -346,7 +346,7 @@ public class ParmHeaderFileWriter extend
                 getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib) !=
null)
             {
                 c_writer.write("\t"
-                             + getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib)
+                             + CUtils.sanitizeString(getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib))
                              + " "
                              + extensionBaseAttrib.getParamNameAsMember() + ";\n");
             }
@@ -547,7 +547,7 @@ public class ParmHeaderFileWriter extend
                     extBaseType = extBaseType.substring(0, extBaseType.lastIndexOf("*"));
 
                 if (!CUtils.isPrimitiveType(extBaseType))
-                    typeSet.add(extBaseType);
+                    typeSet.add(CUtils.sanitizeString(extBaseType));
             }            
             
             Iterator itr = typeSet.iterator();



Mime
View raw message