axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal ClientStubWriter.java
Date Tue, 01 Mar 2005 07:01:51 GMT
samisa      2005/02/28 23:01:51

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp
                        ClientStubWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        ClientStubWriter.java
  Log:
  Changes to make sure local variables that are to be returned are initialized.
  AXISCPP-442
  Submitted by:	Chinthana
  Reviewed by:	Samisa
  
  Revision  Changes    Path
  1.73      +3 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- ClientStubWriter.java	21 Feb 2005 06:19:21 -0000	1.72
  +++ ClientStubWriter.java	1 Mar 2005 07:01:51 -0000	1.73
  @@ -352,6 +352,7 @@
   			else if (outparamTypeName.equals("xsd__string"))
   			{
                   		writer.write(outparamTypeName + " Ret;\n");
  +						writer.write("\tmemset(&Ret,0,sizeof(" + outparamTypeName + "));\n");
   			}
                   	else
                   	{
  @@ -366,14 +367,14 @@
   	                        if (outparamTypeName.equals("xsd__base64Binary")
   	                            || outparamTypeName.equals("xsd__hexBinary"))
   	                        {
  -	                            writer.write(outparamTypeName + "* Ret;\n");
  +	                            writer.write(outparamTypeName + "* Ret=NULL;\n");
   	                            //writer.write("\tRet->__ptr = NULL;\n");
   	                            //writer.write("\tRet->__size = 0;\n");
   	                        }
   	
   	                        else
   	                        {
  -	                            writer.write(outparamTypeName + "* Ret;\n");
  +	                            writer.write(outparamTypeName + "* Ret=NULL;\n");
   	                        }
   	                    }
   	                    //TODO initialize return parameter appropriately.
  
  
  
  1.74      +13 -3     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- ClientStubWriter.java	24 Feb 2005 15:13:08 -0000	1.73
  +++ ClientStubWriter.java	1 Mar 2005 07:01:51 -0000	1.74
  @@ -413,9 +413,19 @@
   	                            writer.write("\tRet.__size = 0;\n");
   	                        }
   	                        else
  -	                        {
  -	                            writer.write(outparamType + " Ret;\n");
  -	                        }
  +		                    {
  +	                           	if (outparamType.equals("xsd__dateTime")
  +		                            || outparamType.equals("xsd__date")
  +									|| outparamType.equals("xsd__time"))
  +		                        {
  +		                        	writer.write(outparamType + " Ret;\n");
  +		                        	writer.write("\tmemset(&Ret,0,sizeof(" + outparamType +
"));\n");
  +		                        }
  +	                           	else
  +	                           	{
  +	                           		writer.write(outparamType + " Ret;\n");
  +	                           	}
  +		                    }
   	                    }
                   	}
                   }
  
  
  

Mime
View raw message