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 BeanParamWriter.java ParmHeaderFileWriter.java
Date Tue, 12 Oct 2004 06:45:55 GMT
samisa      2004/10/11 23:45:55

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp
                        BeanParamWriter.java ParmHeaderFileWriter.java
  Log:
  Added any support code to cpp/rpc code generation to resolve AXISCPP-198.
  
  Revision  Changes    Path
  1.24      +8 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
  
  Index: BeanParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- BeanParamWriter.java	8 Sep 2004 06:41:14 -0000	1.23
  +++ BeanParamWriter.java	12 Oct 2004 06:45:55 -0000	1.24
  @@ -109,7 +109,10 @@
   
   		String arrayType;
   		for(int i = 0; i< attribs.length;i++){
  -			if(attribs[i].isArray()){
  +			if(attribs[i].isAnyType()){
  +				writer.write("\tpSZ->serializeAnyObject(param->any);\n");
  +			}
  +			else if(attribs[i].isArray()){
   				//if Array
   				if (attribs[i].isSimpleType()){
   					writer.write("\tpSZ->serializeBasicArray((Axis_Array*)(&param->"+attribs[i].getParamName()+"),"+CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+",
\""+attribs[i].getParamName()+"\");\n"); 
  @@ -158,7 +161,10 @@
   		 }
   		String arrayType = null;
   		for(int i = 0; i< attribs.length;i++){
  -			if(attribs[i].isArray()){
  +			if(attribs[i].isAnyType()){
  +                                writer.write("\tparam->any = pIWSDZ->getAnyObject();\n");
  +                        }
  +                        else if(attribs[i].isArray()){
   				//if Array
   				if (attribs[i].isSimpleType()){
   					writer.write("\tparam->"+attribs[i].getParamName()+" = ("+CUtils.getBasicArrayNameforType(attribs[i].getTypeName())+"&)pIWSDZ->getBasicArray("+CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+
", \""+attribs[i].getParamName()+"\",0);\n");
  
  
  
  1.19      +8 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
  
  Index: ParmHeaderFileWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ParmHeaderFileWriter.java	8 Sep 2004 06:41:15 -0000	1.18
  +++ ParmHeaderFileWriter.java	12 Oct 2004 06:45:55 -0000	1.19
  @@ -69,6 +69,9 @@
   		  try{
   			writer.write("public:\n");
   			  for(int i=0;i<attribs.length;i++){
  +                                  //chek if attrib name is same as class name and if so
change
  +                                  if (classname.equals(attribs[i].getParamName()))
  +                                      attribs[i].setParamName("m_" + attribs[i].getParamName());
   				  writer.write("\t"+getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])+"
"+attribs[i].getParamName()+";\n");
   			  }    
   		  } catch (IOException e) {
  @@ -132,8 +135,10 @@
   		{
   			if ((attribs[i].isArray()) && (!attribs[i].isSimpleType()))
   				typeSet.add(attribs[i].getTypeName()+"_Array");
  -			if (!attribs[i].isSimpleType())
  +			//if (!attribs[i].isSimpleType())
  +                        if (!(attribs[i].isSimpleType() || attribs[i].isAnyType()))
   				typeSet.add(attribs[i].getTypeName());
  +
   		}
   		Iterator itr = typeSet.iterator();
   		while(itr.hasNext())
  @@ -150,7 +155,8 @@
   		typeSet =  new HashSet();
   		for (int i=0;i<attribs.length; i++)
   		{
  -			if (!attribs[i].isArray() && !attribs[i].isSimpleType())
  +			//if (!attribs[i].isArray() && !attribs[i].isSimpleType())
  +			if (!attribs[i].isArray() && !attribs[i].isSimpleType() && !attribs[i].isAnyType())
   				typeSet.add(attribs[i].getTypeName());
   		}		
   		itr = typeSet.iterator();
  
  
  

Mime
View raw message