axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From susan...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info Type.java
Date Fri, 17 Oct 2003 08:34:01 GMT
susantha    2003/10/17 01:34:01

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c CUtils.java
                        WrapWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp
                        ArrayParamWriter.java BeanParamWriter.java
                        CPPUtils.java ClientStubHeaderWriter.java
                        ClientStubWriter.java ServiceHeaderWriter.java
                        ServiceWriter.java WrapWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info Type.java
  Log:
  Fixed bugs found when generating stubs/wrappers etc for interoptest wsdls taken
  from www.whitemesa.com/interop.htm
  
  Revision  Changes    Path
  1.4       +33 -20    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/CUtils.java
  
  Index: CUtils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/CUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CUtils.java	13 Oct 2003 12:18:47 -0000	1.3
  +++ CUtils.java	17 Oct 2003 08:34:01 -0000	1.4
  @@ -85,24 +85,32 @@
   		 class2QNamemap.put("float", new QName(WrapperConstants.SCHEMA_NAMESPACE, "float"));
   		 class2QNamemap.put("long", new QName(WrapperConstants.SCHEMA_NAMESPACE, "long"));
   		 class2QNamemap.put("double", new QName(WrapperConstants.SCHEMA_NAMESPACE, "double"));
  -		 class2QNamemap.put("int", new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"));
   		 class2QNamemap.put("char", new QName(WrapperConstants.SCHEMA_NAMESPACE, "char"));
   		 class2QNamemap.put("short", new QName(WrapperConstants.SCHEMA_NAMESPACE, "short"));
   		 class2QNamemap.put("char*", new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"));
  -		 class2QNamemap.put("struct tm", new QName(WrapperConstants.SCHEMA_NAMESPACE, "datetime"));
  -		 class2QNamemap.put("char*", new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"));
  +		 class2QNamemap.put("Axis_DateTime", new QName(WrapperConstants.SCHEMA_NAMESPACE, "dateTime"));
  +		 class2QNamemap.put("Axis_Date", new QName(WrapperConstants.SCHEMA_NAMESPACE, "date"));
  +		 class2QNamemap.put("Axis_Time", new QName(WrapperConstants.SCHEMA_NAMESPACE, "time"));
  +		 class2QNamemap.put("Axis_Base64Binary", new QName(WrapperConstants.SCHEMA_NAMESPACE,
"base64Binary"));
  +		 class2QNamemap.put("Axis_HexBinary", new QName(WrapperConstants.SCHEMA_NAMESPACE, "hexBinary"));
  +		 class2QNamemap.put("Axis_Decimal", new QName(WrapperConstants.SCHEMA_NAMESPACE, "decimal"));
  +		 class2QNamemap.put("Axis_Boolean", new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"));
   
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "int"), "int");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "byte"), "unsigned char");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "float"), "float");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "long"), "long");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "double"), "double");
  -		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"), "int");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "char"), "char");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "short"), "short");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"), "char*");
  -		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "datetime"), "struct
tm");
  -		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"), "char*");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "dateTime"), "Axis_DateTime");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "date"), "Axis_Date");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "time"), "Axis_Time");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"), "Axis_Base64Binary");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "hexBinary"), "Axis_HexBinary");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "decimal"), "Axis_Decimal");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"), "Axis_Boolean");
   	}
   	public static boolean isSimpleType(String name){
   		if(class2QNamemap.containsKey(name))
  @@ -118,22 +126,27 @@
   
   	
   	public static String getParameterGetValueMethodName(String typeName){
  -		type2getValueMethodName.put("int","GetInt()");
  -		type2getValueMethodName.put("float","GetFloat()");
  -		type2getValueMethodName.put("string","GetString()");
  -		type2getValueMethodName.put("long","GetLong()");
  -		type2getValueMethodName.put("short","GetShort()");
  -		type2getValueMethodName.put("char","GetChar()");
  -		type2getValueMethodName.put("double","GetDouble()");
  -		type2getValueMethodName.put("bool","GetBool()");
  -		type2getValueMethodName.put("unsigned long","GetUnsignedLong()");
  -		type2getValueMethodName.put("unsigned int","GetUnsignedInt()");
  -		type2getValueMethodName.put("unsigned short","GetUnsignedShort()");
  -		type2getValueMethodName.put("unsigned char","GetUnsignedChar()");
  -		type2getValueMethodName.put("char*","GetString().c_str()");
  +		type2getValueMethodName.put("int","GetInt");
  +		type2getValueMethodName.put("float","GetFloat");
  +		type2getValueMethodName.put("long","GetLong");
  +		type2getValueMethodName.put("short","GetShort");
  +		type2getValueMethodName.put("char","GetChar");
  +		type2getValueMethodName.put("double","GetDouble");
  +		type2getValueMethodName.put("unsigned long","GetUnsignedLong");
  +		type2getValueMethodName.put("unsigned int","GetUnsignedInt");
  +		type2getValueMethodName.put("unsigned short","GetUnsignedShort");
  +		type2getValueMethodName.put("unsigned char","GetUnsignedChar");
  +		type2getValueMethodName.put("char*","GetString");
  +		type2getValueMethodName.put("Axis_DateTime","GetDateTime");
  +		type2getValueMethodName.put("Axis_Date","GetDate");
  +		type2getValueMethodName.put("Axis_Time","GetTime");
  +		type2getValueMethodName.put("Axis_Base64Binary","GetBase64String");
  +		type2getValueMethodName.put("Axis_HexBinary","GetHexString");
  +		type2getValueMethodName.put("Axis_Decimal","GetDecimal");
  +		type2getValueMethodName.put("Axis_Boolean","GetInt");
   		String methodname;
   		if((methodname = (String)type2getValueMethodName.get(typeName))!= null)
  -			return methodname;
  +			return methodname + "()";
   		return null;	
   	}
   	
  
  
  
  1.7       +49 -25    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java
  
  Index: WrapWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WrapWriter.java	14 Oct 2003 13:21:40 -0000	1.6
  +++ WrapWriter.java	17 Oct 2003 08:34:01 -0000	1.7
  @@ -66,6 +66,8 @@
   import java.util.Collection;
   import java.util.Iterator;
   
  +import javax.xml.namespace.QName;
  +
   import org.apache.axis.wsdl.wsdl2ws.WrapperFault;
   import org.apache.axis.wsdl.wsdl2ws.WrapperUtils;
   import org.apache.axis.wsdl.wsdl2ws.cpp.CPPUtils;
  @@ -207,25 +209,33 @@
   	 */
   
   	public void writeMethodInWrapper(String methodName, Collection params, ParameterInfo returntype)
throws WrapperFault,IOException {
  -		Type retType = wscontext.getTypemap().getType(returntype.getSchemaName());
  -		String outparamType;
  +		Type retType = null;
  +		String outparamType = null;
   		boolean returntypeissimple = false;
   		boolean returntypeisarray = false;
  -		if (retType != null){
  -			outparamType = retType.getLanguageSpecificName();
  -			returntypeisarray = retType.isArray();
  -		}
  -		else{
  -			outparamType = returntype.getLangName();
  +		if (returntype != null){
  +			retType = wscontext.getTypemap().getType(returntype.getSchemaName());
  +			if (retType != null){
  +				outparamType = retType.getLanguageSpecificName();
  +				returntypeisarray = retType.isArray();
  +			}
  +			else{
  +				outparamType = returntype.getLangName();
  +			}
  +			returntypeissimple = CPPUtils.isSimpleType(outparamType);
   		}
  -		returntypeissimple = CPPUtils.isSimpleType(outparamType);
   		String paraTypeName;
   		ArrayList paramsB = new ArrayList(params);
   		Type type;
   
   		writer.write("\n//forward declaration for the c method "+methodName+" \n");
   		//TODO forward declaration writing logic should be changed when arrays come into picture
  -		writer.write("extern \"C\" "+outparamType+((returntypeissimple||returntypeisarray)?"
":" *")+methodName+"(");
  +		if (returntype == null){
  +			writer.write("extern \"C\" void "+methodName+"(");
  +		}
  +		else{ 
  +			writer.write("extern \"C\" "+outparamType+((returntypeissimple||returntypeisarray)?"
":" *")+methodName+"(");
  +		}
   
   		for (int i = 0; i < paramsB.size(); i++) {
   			if (i>0) writer.write(",");
  @@ -259,10 +269,14 @@
   				//for simple types	
   				writer.write("\t"+paraTypeName+" v"+i+" = pIWSDZ->"+CPPUtils.getParameterGetValueMethodName(paraTypeName)+";\n");
   			}else if((type = this.wscontext.getTypemap().getType(((ParameterInfo)paramsB.get(i)).getSchemaName()))
!= null && type.isArray()){
  -				String containedType = type.getTypNameForAttribName("item").getLocalPart();
  -				if(CPPUtils.isSimpleType(containedType)){
  +				QName qname = type.getTypNameForAttribName("item");
  +				String containedType = null;
  +				if (CPPUtils.isSimpleType(qname)){
  +					containedType = CPPUtils.getclass4qname(qname);
   					writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetArray("+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
  -				}else{
  +				}
  +				else{
  +					containedType = qname.getLocalPart();
   					writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetArray((AXIS_DESERIALIZE_FUNCT)Axis_DeSerialize_"+containedType+

   						"\n\t\t, (AXIS_OBJECT_CREATE_FUNCT)Axis_Create_"+containedType+", (AXIS_OBJECT_DELETE_FUNCT)Axis_Delete_"+containedType+
   						"\n\t\t, (AXIS_OBJECT_SIZE_FUNCT)Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+",
Axis_URI_"+containedType+");\n");
  @@ -275,23 +289,28 @@
   			}
   		}
   		
  -		if(!(outparamType == null ||outparamType.equals("void"))){				
  +		if(returntype != null){
   			/* Invoke the service when return type not void */
   			writer.write("\t"+outparamType+((returntypeisarray || returntypeissimple)?" ":" *")+
"ret = "+methodName+"(");
  -			for (int i = 0; i <  paramsB.size() - 1; i++) {
  -				writer.write("v" + i + ",");
  +			if (0<paramsB.size()){
  +				for (int i = 0; i <  paramsB.size() - 1; i++) {
  +					writer.write("v" + i + ",");
  +				}
  +				writer.write("v" + ( paramsB.size() - 1));
   			}
  -			writer.write("v" + ( paramsB.size() - 1));
   			writer.write(");\n");
   			/* set the result */
   			if (returntypeissimple){
   				writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", ret);\n");
   			}else if(returntypeisarray){
  -				String containedType = retType.getTypNameForAttribName("item").getLocalPart();
  -				if (CPPUtils.isSimpleType(containedType)){ //array of basic types
  +				QName qname = retType.getTypNameForAttribName("item");
  +				String containedType = null;
  +				if (CPPUtils.isSimpleType(qname)){
  +					containedType = CPPUtils.getclass4qname(qname);
   					writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (Axis_Array*)(&ret),"+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
   				}
  -				else{ //array of complex types
  +				else{
  +					containedType = qname.getLocalPart();
   					writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (Axis_Array*)(&ret),"+

   					"(void*) Axis_Serialize_"+containedType+", (void*) Axis_Delete_"+containedType+",
(void*) Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
   				}
  @@ -302,11 +321,13 @@
   			}
   		}else{//method does not return anything
   			/* Invoke the service when return type is void */
  -			writer.write("\t pWs->" + methodName + "(");
  -			for (int i = 0; i <  paramsB.size() - 1; i++) {
  -				writer.write("v" + i + ",");
  +			writer.write("\tpWs->" + methodName + "(");
  +			if (0<paramsB.size()){
  +				for (int i = 0; i <  paramsB.size() - 1; i++) {
  +					writer.write("v" + i + ",");
  +				}
  +				writer.write("v" + ( paramsB.size() - 1));
   			}
  -			writer.write("v" + ( paramsB.size() - 1));
   			writer.write(")\n");
   			writer.write("\treturn SUCCESS;\n");
   		}
  @@ -320,9 +341,12 @@
   	protected void writeGlobalCodes() throws WrapperFault {
   		Iterator types = wscontext.getTypemap().getTypes().iterator();
   		String typeName;
  +		Type type;
   		try {
   			while(types.hasNext()){
  -				typeName = ((Type)types.next()).getLanguageSpecificName();
  +				type = (Type)types.next();
  +				if (type.isArray()) continue;
  +				typeName = type.getLanguageSpecificName();
   				writer.write("extern int Axis_DeSerialize_"+typeName+"("+typeName+"* param, IWrapperSoapDeSerializer
*pDZ);\n");
   				writer.write("extern void* Axis_Create_"+typeName+"(bool bArray = false, int nSize=0);\n");
   				writer.write("extern void Axis_Delete_"+typeName+"("+typeName+"* param, bool bArray
= false, int nSize=0);\n");
  
  
  
  1.3       +6 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java
  
  Index: ArrayParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ArrayParamWriter.java	10 Oct 2003 05:13:14 -0000	1.2
  +++ ArrayParamWriter.java	17 Oct 2003 08:34:01 -0000	1.3
  @@ -66,6 +66,8 @@
   import java.io.FileWriter;
   import java.io.IOException;
   
  +import javax.xml.namespace.QName;
  +
   import org.apache.axis.wsdl.wsdl2ws.WrapperFault;
   import org.apache.axis.wsdl.wsdl2ws.info.Type;
   import org.apache.axis.wsdl.wsdl2ws.info.WebServiceContext;
  @@ -86,7 +88,10 @@
   				throw new WrapperFault("Array type "+classname+" contain unexpected no of types");
   			}
   			//include header file for the contained type
  -			writer.write("#include \""+attribs[0][1]+".h\"\n\n");
  +			QName qname = type.getTypNameForAttribName("item");
  +			if (!CPPUtils.isSimpleType(qname)){
  +				writer.write("#include \""+attribs[0][1]+".h\"\n\n");
  +			}
   			writeArrayStruct();
   			this.writer.write("#endif // !defined(__"+classname.toUpperCase()+"_"+getFileType().toUpperCase()+"_H__INCLUDED_)\n");
   			writer.flush();
  
  
  
  1.7       +33 -16    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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BeanParamWriter.java	13 Oct 2003 05:03:14 -0000	1.6
  +++ BeanParamWriter.java	17 Oct 2003 08:34:01 -0000	1.7
  @@ -90,8 +90,9 @@
   			if(!CPPUtils.isSimpleType(attribs[i][1])){
   				Type memtype = wscontext.getTypemap().getType(type.getTypNameForAttribName(attribs[i][0]));
   				if (memtype.isArray()){
  -					typeName = memtype.getTypNameForAttribName("item").getLocalPart();
  -					if (CPPUtils.isSimpleType(typeName)) continue; //no wrapper methods for basic types
  +					QName qname = memtype.getTypNameForAttribName("item");
  +					if (CPPUtils.isSimpleType(qname)) continue; //no wrapper methods for basic types
  +					typeName = qname.getLocalPart();
   				}else{
   					typeName = attribs[i][1];
   				}	
  @@ -152,14 +153,18 @@
   				writer.write("\tpSZ << pSZ.SerializeBasicType(\""+attribs[i][0]+"\", param->"+attribs[i][0]+");\n");
   			}else if((t = wscontext.getTypemap().getType(new QName(attribs[i][2],attribs[i][3])))!=
null && t.isArray()){
   				//if Array
  -				String arrayType = t.getTypNameForAttribName("item").getLocalPart();
  -				if (CPPUtils.isSimpleType(arrayType)){
  +				QName qname = t.getTypNameForAttribName("item");
  +				String arrayType = null;
  +				if (CPPUtils.isSimpleType(qname)){
  +					arrayType = CPPUtils.getclass4qname(qname);
   					writer.write("\tpSZ.SerializeArray((Axis_Array*)(&param->"+attribs[i][0]+"),"+CPPUtils.getXSDTypeForBasicType(arrayType)+",
\""+attribs[i][0]+"\");\n"); 
  -				}else{
  +				}
  +				else{
  +					arrayType = qname.getLocalPart();
   					writer.write("\tpSZ.SerializeArray((Axis_Array*)(&param->"+attribs[i][0]+"),\n");

   					writer.write("\t\t(void*) Axis_Serialize_"+arrayType+", (void*) Axis_Delete_"+arrayType+",
(void*) Axis_GetSize_"+arrayType+",\n"); 
   					writer.write("\t\tAxis_TypeName_"+arrayType+", Axis_URI_"+arrayType+", \""+attribs[i][0]+"\");\n");
  -				}				
  +				}
   			}else{
   				//if complex type
   				writer.write("\tAxis_Serialize_"+attribs[i][1]+"(param->"+attribs[i][0]+", pSZ);\n");
  @@ -188,14 +193,18 @@
   				writer.write("\tparam->"+attribs[i][0]+" = pIWSDZ->"+CPPUtils.getParameterGetValueMethodName(attribs[i][1])+";\n");
   			}else if((t = wscontext.getTypemap().getType(new QName(attribs[i][2],attribs[i][3])))!=
null && t.isArray()){
   				//if Array
  -				String arrayType = t.getTypNameForAttribName("item").getLocalPart();
  -				if(CPPUtils.isSimpleType(arrayType)){
  +				QName qname = t.getTypNameForAttribName("item");
  +				String arrayType = null;
  +				if (CPPUtils.isSimpleType(qname)){
  +					arrayType = CPPUtils.getclass4qname(qname);
   					writer.write("\tparam->"+attribs[i][0]+" = ("+attribs[i][1]+"&)pIWSDZ->GetArray("+CPPUtils.getXSDTypeForBasicType(arrayType)+");\n");
  -				}else{
  +				}
  +				else{
  +					arrayType = qname.getLocalPart();
   					writer.write("\tparam->"+attribs[i][0]+" = ("+attribs[i][1]+"&)pIWSDZ->GetArray((AXIS_DESERIALIZE_FUNCT)Axis_DeSerialize_"+arrayType+

   						"\n\t\t, (AXIS_OBJECT_CREATE_FUNCT)Axis_Create_"+arrayType+", (AXIS_OBJECT_DELETE_FUNCT)Axis_Delete_"+arrayType+
   						"\n\t\t, (AXIS_OBJECT_SIZE_FUNCT)Axis_GetSize_"+arrayType+", Axis_TypeName_"+arrayType+",
Axis_URI_"+arrayType+");\n");
  -				}			
  +				}
   			}else{
   				//if complex type
   				writer.write("\tparam->"+attribs[i][0]+" = ("+attribs[i][1]+"*)pIWSDZ->GetObject((AXIS_DESERIALIZE_FUNCT)Axis_DeSerialize_"+attribs[i][1]+
  @@ -237,10 +246,14 @@
   				if(!CPPUtils.isSimpleType(attribs[i][1])){ //this can be either an array or complex
type
   					Type memtype = wscontext.getTypemap().getType(type.getTypNameForAttribName(attribs[i][0]));
   					if (memtype.isArray()){
  -						String containedType = memtype.getTypNameForAttribName("item").getLocalPart();
  -						if (CPPUtils.isSimpleType(containedType)){
  +						QName qname = memtype.getTypNameForAttribName("item");
  +						String containedType = null;
  +						if (CPPUtils.isSimpleType(qname)){
  +							containedType = CPPUtils.getclass4qname(qname);
   							writer.write("\t\t\tdelete [] (("+containedType+"*)pTemp->"+attribs[i][0]+".m_Array);\n");
  -						}else{
  +						}
  +						else{
  +							containedType = qname.getLocalPart();
   							writer.write("\t\t\tAxis_Delete_"+containedType+"(pTemp->"+attribs[i][0]+".m_Array,
true, pTemp->"+attribs[i][0]+".m_Size);\n");
   						}
   					}else{
  @@ -260,10 +273,14 @@
   			if(!CPPUtils.isSimpleType(attribs[i][1])){
   				Type memtype = wscontext.getTypemap().getType(type.getTypNameForAttribName(attribs[i][0]));
   				if (memtype.isArray()){
  -					String containedType = memtype.getTypNameForAttribName("item").getLocalPart();
  -					if (CPPUtils.isSimpleType(containedType)){
  +					QName qname = memtype.getTypNameForAttribName("item");
  +					String containedType = null;
  +					if (CPPUtils.isSimpleType(qname)){
  +						containedType = CPPUtils.getclass4qname(qname);
   						writer.write("\t\tdelete [] (("+containedType+"*)param->"+attribs[i][0]+".m_Array);\n");
  -					}else{
  +					}
  +					else{
  +						containedType = qname.getLocalPart();
   						writer.write("\t\tAxis_Delete_"+containedType+"(param->"+attribs[i][0]+".m_Array,
true, param->"+attribs[i][0]+".m_Size);\n");
   					}
   				}else{
  
  
  
  1.6       +30 -6     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/CPPUtils.java
  
  Index: CPPUtils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/CPPUtils.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CPPUtils.java	13 Oct 2003 05:03:14 -0000	1.5
  +++ CPPUtils.java	17 Oct 2003 08:34:01 -0000	1.6
  @@ -84,22 +84,32 @@
   		 class2QNamemap.put("float", new QName(WrapperConstants.SCHEMA_NAMESPACE, "float"));
   		 class2QNamemap.put("long", new QName(WrapperConstants.SCHEMA_NAMESPACE, "long"));
   		 class2QNamemap.put("double", new QName(WrapperConstants.SCHEMA_NAMESPACE, "double"));
  -		 class2QNamemap.put("int", new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"));
   		 class2QNamemap.put("char", new QName(WrapperConstants.SCHEMA_NAMESPACE, "char"));
   		 class2QNamemap.put("short", new QName(WrapperConstants.SCHEMA_NAMESPACE, "short"));
   		 class2QNamemap.put("string", new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"));
  -		 class2QNamemap.put("string", new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"));
  -
  +		 class2QNamemap.put("Axis_DateTime", new QName(WrapperConstants.SCHEMA_NAMESPACE, "dateTime"));
  +		 class2QNamemap.put("Axis_Date", new QName(WrapperConstants.SCHEMA_NAMESPACE, "date"));
  +		 class2QNamemap.put("Axis_Time", new QName(WrapperConstants.SCHEMA_NAMESPACE, "time"));
  +		 class2QNamemap.put("Axis_Base64Binary", new QName(WrapperConstants.SCHEMA_NAMESPACE,
"base64Binary"));
  +		 class2QNamemap.put("Axis_HexBinary", new QName(WrapperConstants.SCHEMA_NAMESPACE, "hexBinary"));
  +		 class2QNamemap.put("Axis_Decimal", new QName(WrapperConstants.SCHEMA_NAMESPACE, "decimal"));
  +		 class2QNamemap.put("Axis_Boolean", new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"));
  +		
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "int"), "int");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "byte"), "unsigned char");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "float"), "float");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "long"), "long");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "double"), "double");
  -		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"), "int");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "char"), "char");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "short"), "short");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"), "string");
  -		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"), "string");
  + 		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "dateTime"), "Axis_DateTime");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "date"), "Axis_Date");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "time"), "Axis_Time");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"), "Axis_Base64Binary");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "hexBinary"), "Axis_HexBinary");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "decimal"), "Axis_Decimal");
  +		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"), "Axis_Boolean");
   	}
   	public static boolean isSimpleType(String name){
   		if(class2QNamemap.containsKey(name))
  @@ -126,6 +136,13 @@
   		type2getValueMethodName.put("unsigned int","GetUnsignedInt");
   		type2getValueMethodName.put("unsigned short","GetUnsignedShort");
   		type2getValueMethodName.put("unsigned char","GetUnsignedChar");
  +		type2getValueMethodName.put("Axis_DateTime","GetDateTime");
  +		type2getValueMethodName.put("Axis_Date","GetDate");
  +		type2getValueMethodName.put("Axis_Time","GetTime");
  +		type2getValueMethodName.put("Axis_Base64Binary","GetBase64String");
  +		type2getValueMethodName.put("Axis_HexBinary","GetHexString");
  +		type2getValueMethodName.put("Axis_Decimal","GetDecimal");
  +		type2getValueMethodName.put("Axis_Boolean","GetInt");
   		String methodname;
   		if((methodname = (String)type2getValueMethodName.get(typeName))!= null)
   			return methodname+"()";
  @@ -153,6 +170,7 @@
   	public static String getXSDTypeForBasicType(String stype){
   		if ("int".equals(stype)) return "XSD_INT";
   		else if ("string".equals(stype)) return "XSD_STRING";
  +		else if ("char*".equals(stype)) return "XSD_STRING";
   		else if ("unsigned int".equals(stype)) return "XSD_UNSIGNEDINT";
   		else if ("short".equals(stype)) return "XSD_SHORT";
   		else if ("unsigned short".equals(stype)) return "XSD_UNSIGNEDSHORT";
  @@ -162,7 +180,13 @@
   		else if ("unsigned char".equals(stype)) return "XSD_BYTE";
   		else if ("float".equals(stype)) return "XSD_FLOAT";
   		else if ("double".equals(stype)) return "XSD_DOUBLE";
  -		else if ("struct tm".equals(stype)) return "XSD_DATETIME";
  +		else if ("Axis_DateTime".equals(stype)) return "XSD_DATETIME";
  +		else if ("Axis_Date".equals(stype)) return "XSD_DATE";
  +		else if ("Axis_Time".equals(stype)) return "XSD_TIME";
  +		else if ("Axis_Base64Binary".equals(stype)) return "XSD_BASE64BINARY";
  +		else if ("Axis_HexBinary".equals(stype)) return "XSD_HEXBINARY";
  +		else if ("Axis_Decimal".equals(stype)) return "XSD_DECIMAL";
  +		else if ("Axis_Boolean".equals(stype)) return "XSD_BOOLEAN";
   		else return "unknown type";
   	}
   }
  
  
  
  1.3       +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
  
  Index: ClientStubHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClientStubHeaderWriter.java	13 Oct 2003 05:03:14 -0000	1.2
  +++ ClientStubHeaderWriter.java	17 Oct 2003 08:34:01 -0000	1.3
  @@ -150,7 +150,7 @@
   		  for(int i = 0; i < methods.size(); i++){
   			  minfo = (MethodInfo)this.methods.get(i);
   			  //write return type
  -			  if(minfo.getReturnType().getLangName()==null)
  +			  if(minfo.getReturnType()==null)
   				  writer.write("\tvoid ");
   			  else {
   			  	  String outparam = minfo.getReturnType().getLangName();
  
  
  
  1.10      +51 -24    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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ClientStubWriter.java	14 Oct 2003 12:06:23 -0000	1.9
  +++ ClientStubWriter.java	17 Oct 2003 08:34:01 -0000	1.10
  @@ -66,6 +66,8 @@
   import java.util.Collection;
   import java.util.Iterator;
   
  +import javax.xml.namespace.QName;
  +
   import org.apache.axis.wsdl.wsdl2ws.WrapperFault;
   import org.apache.axis.wsdl.wsdl2ws.WrapperUtils;
   import org.apache.axis.wsdl.wsdl2ws.info.MethodInfo;
  @@ -155,7 +157,7 @@
   		try{
   			writer.write("#include \""+classname+".h\"\n\n");
   			writer.write("#include <IWrapperSoapDeSerializer.h>\n");
  -			writer.write("#include <IWrapperSoapSerializer.h>\n");
  +			writer.write("#include <IWrapperSoapSerializer.h>\n\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
   		}
  @@ -170,18 +172,21 @@
   	 */
   
   	public void writeMethodInWrapper(String methodName, Collection params, ParameterInfo returntype)
throws WrapperFault,IOException {
  -		Type retType = wscontext.getTypemap().getType(returntype.getSchemaName());
  -		String outparamType;
  +		Type retType = null;
   		boolean returntypeissimple = false;
   		boolean returntypeisarray = false;
  +		String outparamType = null;
  +		if (returntype != null)
  +			retType = wscontext.getTypemap().getType(returntype.getSchemaName());
   		if (retType != null){
   			outparamType = retType.getLanguageSpecificName();
   			returntypeisarray = retType.isArray();
   		}
  -		else{
  +		else if (returntype != null){
   			outparamType = returntype.getLangName();
   		}
  -		returntypeissimple = CPPUtils.isSimpleType(outparamType);
  +		if (returntype != null)
  +			returntypeissimple = CPPUtils.isSimpleType(outparamType);
   		writer.write("\n/////////////////////////////////////////////////////////////////\n");
   		writer.write("// This method wrap the service method"+ methodName +"\n");
   		writer.write("//////////////////////////////////////////////////////////////////\n");
  @@ -190,7 +195,10 @@
   		boolean typeisarray = false;
   		boolean typeissimple = false;
   		Type type;
  -		if (returntypeissimple || returntypeisarray){
  +		if (returntype == null){
  +			writer.write("void");
  +		}
  +		else if (returntypeissimple || returntypeisarray){
   			writer.write(outparamType);	
   		}else{
   			writer.write(outparamType+"*");
  @@ -233,16 +241,18 @@
   		}
   		writer.write(")\n{\n");
   		writer.write("\tint nStatus;\n\t");
  -		if(returntypeisarray){
  -			//for arrays
  -			writer.write(outparamType+" RetArray = {NULL, 0};\n");
  -		}else if(!returntypeissimple){
  -			writer.write(outparamType+"* pReturn = NULL;\n");
  -			//for complex types
  -		}else{
  -			//for simple types
  -			writer.write(outparamType+" Ret;\n");
  -			//TODO initialize return parameter appropriately.
  +		if (returntype != null){
  +			if(returntypeisarray){
  +				//for arrays
  +				writer.write(outparamType+" RetArray = {NULL, 0};\n");
  +			}else if(!returntypeissimple){
  +				writer.write(outparamType+"* pReturn = NULL;\n");
  +				//for complex types
  +			}else{
  +				//for simple types
  +				writer.write(outparamType+" Ret;\n");
  +				//TODO initialize return parameter appropriately.
  +			}
   		}
   		writer.write("\tif (SUCCESS != m_pCall->Initialize()) return ");
   		writer.write((returntypeisarray?"RetArray":returntypeissimple?"Ret":"pReturn")+";\n\t");
  @@ -262,10 +272,14 @@
   			writer.write("\tm_pCall->AddParameter(");			
   			if(typeisarray){
   				//arrays
  -				String containedType = type.getTypNameForAttribName("item").getLocalPart();
  -				if (CPPUtils.isSimpleType(containedType)){ //array of simple types
  +				QName qname = type.getTypNameForAttribName("item");
  +				String containedType = null;
  +				if (CPPUtils.isSimpleType(qname)){
  +					containedType = CPPUtils.getclass4qname(qname);
   					writer.write("(Axis_Array*)(&Value"+i+"), "+CPPUtils.getXSDTypeForBasicType(containedType)+",
\""+((ParameterInfo)paramsB.get(i)).getParamName()+"\"");					
  -				}else{ //array of complex types
  +				}
  +				else{
  +					containedType = qname.getLocalPart();
   					writer.write("(Axis_Array*)(&Value"+i+"), (void*)Axis_Serialize_"+containedType+",
(void*)Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+",
Axis_URI_"+containedType+", \""+((ParameterInfo)paramsB.get(i)).getParamName()+"\"");
   				}
   			}else if(typeissimple){
  @@ -277,11 +291,21 @@
   			}
   			writer.write(");\n");
   		}
  -		if (returntypeisarray){
  -			String containedType = retType.getTypNameForAttribName("item").getLocalPart();
  -			if (CPPUtils.isSimpleType(containedType)){ //array of simple types
  +		if (returntype == null){
  +			writer.write("\tnStatus = m_pCall->Invoke();\n");
  +			writer.write("\tif (SUCCESS != nStatus)\n\t{\n");
  +			writer.write("\t\t//What to do ? . Throw an exception ??? \n\t}\n");
  +			writer.write("\tm_pCall->UnInitialize();\n");
  +		}
  +		else if (returntypeisarray){
  +			QName qname = retType.getTypNameForAttribName("item");
  +			String containedType = null;
  +			if (CPPUtils.isSimpleType(qname)){
  +				containedType = CPPUtils.getclass4qname(qname);
   				writer.write("\tm_pCall->SetReturnType((Axis_Array*)(&RetArray), "+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
  -			}else{ //array of complex types
  +			}
  +			else{
  +				containedType = qname.getLocalPart();
   				writer.write("\tm_pCall->SetReturnType((Axis_Array*)(&RetArray), (void*) Axis_DeSerialize_"+containedType);
   				writer.write(", (void*) Axis_Create_"+containedType+", (void*) Axis_Delete_"+containedType+",
(void*) Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
   			}
  @@ -318,9 +342,12 @@
   	protected void writeGlobalCodes() throws WrapperFault {
   		Iterator types = wscontext.getTypemap().getTypes().iterator();
   		String typeName;
  +		Type type;
   		try {
   			while(types.hasNext()){
  -				typeName = ((Type)types.next()).getLanguageSpecificName();
  +				type = (Type)types.next();
  +				if (type.isArray()) continue;
  +				typeName = type.getLanguageSpecificName();
   				writer.write("extern int Axis_DeSerialize_"+typeName+"("+typeName+"* param, IWrapperSoapDeSerializer
*pDZ);\n");
   				writer.write("extern void* Axis_Create_"+typeName+"(bool bArray = false, int nSize=0);\n");
   				writer.write("extern void Axis_Delete_"+typeName+"("+typeName+"* param, bool bArray
= false, int nSize=0);\n");
  
  
  
  1.6       +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java
  
  Index: ServiceHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceHeaderWriter.java	13 Oct 2003 11:09:13 -0000	1.5
  +++ ServiceHeaderWriter.java	17 Oct 2003 08:34:01 -0000	1.6
  @@ -147,7 +147,7 @@
   		  for(int i = 0; i < methods.size(); i++){
   			  minfo = (MethodInfo)this.methods.get(i);
   			  //write return type
  -			  if(minfo.getReturnType().getLangName()==null)
  +			  if(minfo.getReturnType()==null)
   				  writer.write("\t\tvoid ");
   			  else {
   			  	  String outparam = minfo.getReturnType().getLangName();
  
  
  
  1.5       +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java
  
  Index: ServiceWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServiceWriter.java	13 Oct 2003 11:09:13 -0000	1.4
  +++ ServiceWriter.java	17 Oct 2003 08:34:01 -0000	1.5
  @@ -134,7 +134,7 @@
   		  for(int i = 0; i < methods.size(); i++){
   			  minfo = (MethodInfo)this.methods.get(i);
   
  -			  if(minfo.getReturnType().getLangName()==null)
  +			  if(minfo.getReturnType()== null)
   				  writer.write("void ");
   			  else {
   				String outparam = minfo.getReturnType().getLangName();
  
  
  
  1.7       +47 -29    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
  
  Index: WrapWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WrapWriter.java	13 Oct 2003 05:03:14 -0000	1.6
  +++ WrapWriter.java	17 Oct 2003 08:34:01 -0000	1.7
  @@ -66,6 +66,8 @@
   import java.util.Collection;
   import java.util.Iterator;
   
  +import javax.xml.namespace.QName;
  +
   import org.apache.axis.wsdl.wsdl2ws.WrapperFault;
   import org.apache.axis.wsdl.wsdl2ws.WrapperUtils;
   import org.apache.axis.wsdl.wsdl2ws.info.MethodInfo;
  @@ -140,10 +142,10 @@
   			writer.write("\n//Methods corresponding to the web service methods\n");
   			MethodInfo minfo;
   			for (int i = 0; i < methods.size(); i++) {
  -					 minfo = (MethodInfo)methods.get(i);
  -					 this.writeMethodInWrapper(minfo.getMethodname(), minfo.getParameterTypes(),minfo.getReturnType());
  -					 writer.write("\n");
  -				 }
  +				 minfo = (MethodInfo)methods.get(i);
  +				 this.writeMethodInWrapper(minfo.getMethodname(), minfo.getParameterTypes(),minfo.getReturnType());
  +				 writer.write("\n");
  +			 }
        
   		}catch(IOException e){
   			throw new WrapperFault(e);
  @@ -207,19 +209,21 @@
   	 */
   
   	public void writeMethodInWrapper(String methodName, Collection params, ParameterInfo returntype)
throws WrapperFault,IOException {
  -		Type retType = wscontext.getTypemap().getType(returntype.getSchemaName());
  -		String outparamType;
  +		Type retType = null;
  +		String outparamType = null;
   		boolean returntypeissimple = false;
   		boolean returntypeisarray = false;
  -		if (retType != null){
  -			outparamType = retType.getLanguageSpecificName();
  -			returntypeisarray = retType.isArray();
  -		}
  -		else{
  -			outparamType = returntype.getLangName();
  +		if (returntype != null){
  +			retType = wscontext.getTypemap().getType(returntype.getSchemaName());
  +			if (retType != null){
  +				outparamType = retType.getLanguageSpecificName();
  +				returntypeisarray = retType.isArray();
  +			}
  +			else{
  +				outparamType = returntype.getLangName();
  +			}
  +			returntypeissimple = CPPUtils.isSimpleType(outparamType);
   		}
  -		returntypeissimple = CPPUtils.isSimpleType(outparamType);
  -
   		writer.write("\n/////////////////////////////////////////////////////////////////\n");
   		writer.write("// This method wrap the service method \n");
   		writer.write("//////////////////////////////////////////////////////////////////\n");
  @@ -243,10 +247,14 @@
   				//for simple types	
   				writer.write("\t"+paraTypeName+" v"+i+" = pIWSDZ->"+CPPUtils.getParameterGetValueMethodName(paraTypeName)+";\n");
   			}else if((type = this.wscontext.getTypemap().getType(((ParameterInfo)paramsB.get(i)).getSchemaName()))
!= null && type.isArray()){
  -				String containedType = type.getTypNameForAttribName("item").getLocalPart();
  -				if(CPPUtils.isSimpleType(containedType)){
  +				QName qname = type.getTypNameForAttribName("item");
  +				String containedType = null;
  +				if (CPPUtils.isSimpleType(qname)){
  +					containedType = CPPUtils.getclass4qname(qname);
   					writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetArray("+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
  -				}else{
  +				}
  +				else{
  +					containedType = qname.getLocalPart();
   					writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetArray((AXIS_DESERIALIZE_FUNCT)Axis_DeSerialize_"+containedType+

   						"\n\t\t, (AXIS_OBJECT_CREATE_FUNCT)Axis_Create_"+containedType+", (AXIS_OBJECT_DELETE_FUNCT)Axis_Delete_"+containedType+
   						"\n\t\t, (AXIS_OBJECT_SIZE_FUNCT)Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+",
Axis_URI_"+containedType+");\n");
  @@ -259,23 +267,28 @@
   			}
   		}
   			
  -		if(!(outparamType == null ||outparamType.equals("void"))){				
  +		if(returntype != null){				
   			/* Invoke the service when return type not void */
   			writer.write("\t"+outparamType+((returntypeisarray || returntypeissimple)?" ":" *")+
"ret = "+"pWs->"+methodName+"(");
  -			for (int i = 0; i <  paramsB.size() - 1; i++) {
  -				writer.write("v" + i + ",");
  +			if (0<paramsB.size()){
  +				for (int i = 0; i <  paramsB.size() - 1; i++) {
  +					writer.write("v" + i + ",");
  +				}
  +				writer.write("v" + ( paramsB.size() - 1));
   			}
  -			writer.write("v" + ( paramsB.size() - 1));
   			writer.write(");\n");
   			/* set the result */
   			if (returntypeissimple){
   				writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", ret);\n");
   			}else if(returntypeisarray){
  -				String containedType = retType.getTypNameForAttribName("item").getLocalPart();
  -				if (CPPUtils.isSimpleType(containedType)){ //array of basic types
  +				QName qname = retType.getTypNameForAttribName("item");
  +				String containedType = null;
  +				if (CPPUtils.isSimpleType(qname)){
  +					containedType = CPPUtils.getclass4qname(qname);
   					writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (Axis_Array*)(&ret),"+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
   				}
  -				else{ //array of complex types
  +				else{
  +					containedType = qname.getLocalPart();
   					writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (Axis_Array*)(&ret),"+

   					"(void*) Axis_Serialize_"+containedType+", (void*) Axis_Delete_"+containedType+",
(void*) Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
   				}
  @@ -286,11 +299,13 @@
   			}
   		}else{//method does not return anything
   			/* Invoke the service when return type is void */
  -	 		writer.write("\t pWs->" + methodName + "(");
  -			for (int i = 0; i <  paramsB.size() - 1; i++) {
  -				writer.write("v" + i + ",");
  +	 		writer.write("\tpWs->" + methodName + "(");
  +			if (0<paramsB.size()){
  +				for (int i = 0; i <  paramsB.size() - 1; i++) {
  +					writer.write("v" + i + ",");
  +				}
  +				writer.write("v" + ( paramsB.size() - 1));
   			}
  -			writer.write("v" + ( paramsB.size() - 1));
   			writer.write(")\n");
   			writer.write("\treturn SUCCESS;\n");
   		}
  @@ -303,9 +318,12 @@
   	protected void writeGlobalCodes() throws WrapperFault {
   		Iterator types = wscontext.getTypemap().getTypes().iterator();
   		String typeName;
  +		Type type;
   		try {
   			while(types.hasNext()){
  -				typeName = ((Type)types.next()).getLanguageSpecificName();
  +				type = (Type)types.next();
  +				if (type.isArray()) continue;
  +				typeName = type.getLanguageSpecificName();
   				writer.write("extern int Axis_DeSerialize_"+typeName+"("+typeName+"* param, IWrapperSoapDeSerializer
*pDZ);\n");
   				writer.write("extern void* Axis_Create_"+typeName+"(bool bArray = false, int nSize=0);\n");
   				writer.write("extern void Axis_Delete_"+typeName+"("+typeName+"* param, bool bArray
= false, int nSize=0);\n");
  
  
  
  1.4       +0 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java
  
  Index: Type.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Type.java	13 Oct 2003 11:09:13 -0000	1.3
  +++ Type.java	17 Oct 2003 08:34:01 -0000	1.4
  @@ -121,8 +121,6 @@
           	//remove any funny Charactors
   			this.languageSpecificName.replaceAll("/","_");  
   			this.languageSpecificName.replaceAll(":","_");   
  -			//give it A GOOD java look :)
  -			this.languageSpecificName = WrapperUtils.firstCharacterToLowercase(this.languageSpecificName);
   			
           }    
          	this.attribOrder = new Vector();
  
  
  

Mime
View raw message