axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r490095 - /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
Date Mon, 25 Dec 2006 01:21:52 GMT
Author: nadiramra
Date: Sun Dec 24 17:21:51 2006
New Revision: 490095

URL: http://svn.apache.org/viewvc?view=rev&rev=490095
Log:
AXISCPP-849 - Stub compilation problems when WSDL contains complexTypes and elements of the
same name

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?view=diff&rev=490095&r1=490094&r2=490095
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
Sun Dec 24 17:21:51 2006
@@ -229,17 +229,24 @@
 
                     if (attribs[i].getChoiceElement())
                         for (int j = 0; j < attribs.length; j++)
-                        {
                             if ((attribs[j].getChoiceElement()) && (j != i))
-                                writer.write("\t" + attribs[j].getParamNameWithoutSymbols()
+ " = NULL ; \n");
-                        }
+                            {
+                                // TODO simplify by doing all attributes before we get into
code gen
+                                String realName = attribs[j].getParamNameWithoutSymbols();
+                                if (CUtils.classExists(wscontext, realName))
+                                    realName += "_Ref";
+                                writer.write("\t" + realName + " = NULL ; \n");
+                            }
                     
                     if (attribs[i].getAllElement())
                         for (int j = 0; j < attribs.length; j++)
-                        {
                             if ((attribs[j].getAllElement()) && (j != i))
-                                writer.write("\t" + attribs[j].getParamNameWithoutSymbols()
+ " = NULL ; \n");
-                        }
+                            {
+                                String realName = attribs[j].getParamNameWithoutSymbols();
+                                if (CUtils.classExists(wscontext, realName))
+                                    realName += "_Ref";
+                                writer.write("\t" + realName + " = NULL ; \n");
+                            }
 
                     writer.write("}\n");
                 } 
@@ -346,10 +353,14 @@
 
                     if (attribs[i].getChoiceElement())
                         for (int j = 0; j < attribs.length; j++)
-                        {
                             if ((attribs[j].getChoiceElement()) && (j != i))
-                                writer.write("\t" + attribs[j].getParamNameWithoutSymbols()
+ " = NULL ; \n");
-                        }
+                            {
+                                String realName = attribs[j].getParamNameWithoutSymbols();
+                                if (CUtils.classExists(wscontext, realName))
+                                    realName += "_Ref";
+
+                                writer.write("\t" + realName + " = NULL ; \n");
+                            }
 
                     writer.write("}\n");
                 }



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