axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From baud...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c ParmHeaderFileWriter.java
Date Mon, 05 Apr 2004 11:57:01 GMT
baudyjy     2004/04/05 04:57:01

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c
                        ParmHeaderFileWriter.java
  Log:
  Fix complex schemas compilation (include cycle).
  
  Revision  Changes    Path
  1.10      +6 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
  
  Index: ParmHeaderFileWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ParmHeaderFileWriter.java	29 Mar 2004 04:20:31 -0000	1.9
  +++ ParmHeaderFileWriter.java	5 Apr 2004 11:57:01 -0000	1.10
  @@ -85,7 +85,7 @@
   			this.writer.write("#if !defined(__"+classname.toUpperCase()+"_H__INCLUDED_)\n");
   			this.writer.write("#define __"+classname.toUpperCase()+"_H__INCLUDED_\n\n");
   			writePreprocssorStatements();
  -			this.writer.write("typedef struct {\n");
  +			this.writer.write("typedef struct "+classname+ "Tag {\n");
   			writeAttributes();
   			this.writer.write("} "+classname+";\n\n");
   			this.writer.write("#endif /* !defined(__"+classname.toUpperCase()+"_H__INCLUDED_)*/\n");
  @@ -101,9 +101,13 @@
   	protected void writeAttributes()throws WrapperFault{
   		  if(type.isArray()) return;
   		  try{
  +		  	  if ( attribs.length == 0 ) {
  +				  /* TODO : needed for Aix xlc */
  +				  writer.write("\t int emptyStruct;\n");
  +			  }			  	
   			  for(int i=0;i<attribs.length;i++){
   				  //if((t = wscontext.getTypemap().getType(new QName(attribs[i][2],attribs[i][3])))!=
null && t.isArray()) continue;
  -				  writer.write("\t"+getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])+"
"+attribs[i].getParamName()+";\n");
  +		  	 	writer.write("\t"+getCHeaderFileCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])+"
"+attribs[i].getParamName()+";\n");
   			  }    
   		  } catch (IOException e) {
   			   throw new WrapperFault(e);
  
  
  

Mime
View raw message