axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanj...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp WrapWriter.java WrapHeaderWriter.java ServiceHeaderWriter.java ParmHeaderFileWriter.java ParamWriter.java CPPUtils.java ClientStubWriter.java ClientStubHeaderWriter.java BeanParamWriter.java AllParamWriter.java
Date Wed, 14 Jan 2004 05:19:20 GMT
sanjaya     2004/01/13 21:19:19

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp Tag:
                        CWrapperSupport WrapWriter.java
                        WrapHeaderWriter.java ServiceHeaderWriter.java
                        ParmHeaderFileWriter.java ParamWriter.java
                        CPPUtils.java ClientStubWriter.java
                        ClientStubHeaderWriter.java BeanParamWriter.java
                        AllParamWriter.java
  Log:
  -changes made to conform to the new changes to api changes by
  susantha.
  -removed the << operator of the soapserializer removed and a serialize method
   call used.
  -now get<TYPE>asElement used
  -now uses predefined types in AxisUserApi.h rather than generating types for
  simple type arrays.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.10.4.6  +29 -20    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.10.4.5
  retrieving revision 1.10.4.6
  diff -u -r1.10.4.5 -r1.10.4.6
  --- WrapWriter.java	12 Jan 2004 03:44:52 -0000	1.10.4.5
  +++ WrapWriter.java	14 Jan 2004 05:19:19 -0000	1.10.4.6
  @@ -173,10 +173,12 @@
   		writer.write(" */\n");
   		writer.write("int "+classname+"::Invoke(IMessageData *mc)\n{\n");
   		//msgdata.setSoapFault(new SOAPFault(new AxisFault()))
  -		writer.write("\tIWrapperSoapDeSerializer *pIWSDZ = NULL;\n");
  -		writer.write("\tmc->getSoapDeSerializer(&pIWSDZ);\n");
  -		writer.write("\tif (!pIWSDZ) return AXIS_FAIL;\n");
  -		writer.write("\tconst AxisChar *method = pIWSDZ->GetMethodName();\n");
  +		//writer.write("\tIWrapperSoapDeSerializer *pIWSDZ = NULL;\n");
  +		//writer.write("\tmc->getSoapDeSerializer(&pIWSDZ);\n");
  +		//writer.write("\tif (!pIWSDZ) return AXIS_FAIL;\n");
  +		//writer.write("\tconst AxisChar *method = pIWSDZ->GetMethodName();\n");
  +		//writer.write("\tconst AxisChar *method = mc->GetMethodName();\n");
  +		writer.write("\tconst AxisChar *method = mc->GetOperationName();\n");
   		//if no methods in the service simply return
   		if (methods.size() == 0) {
   			writer.write("}\n");
  @@ -246,12 +248,14 @@
   		//method signature
   		writer.write("int "+classname+"::" + methodName + "(IMessageData* mc)\n{\n");
   		writer.write("\tIWrapperSoapSerializer *pIWSSZ = NULL;\n");
  -		writer.write("\tmc->getSoapSerializer(&pIWSSZ);\n");
  +		writer.write("\tmc->GetSoapSerializer(&pIWSSZ);\n");
   		writer.write("\tif (!pIWSSZ) return AXIS_FAIL;\n");
   		writer.write("\tIWrapperSoapDeSerializer *pIWSDZ = NULL;\n");
  -		writer.write("\tmc->getSoapDeSerializer(&pIWSDZ);\n");
  +		writer.write("\tmc->GetSoapDeSerializer(&pIWSDZ);\n");
   		writer.write("\tif (!pIWSDZ) return AXIS_FAIL;\n");
  -		writer.write("\tpIWSSZ->createSoapMethod(\""+methodName+"Response\", pIWSSZ->getNewNamespacePrefix(), \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
  +		writer.write("\tif(AXIS_SUCESS !=  pIWSDZ->CheckMessageBody(\""+methodName+"\", \"\")) return AXIS_FAIL;\n");
  +		//writer.write("\tpIWSSZ->createSoapMethod(\""+methodName+"Response\", pIWSSZ->getNewNamespacePrefix(), \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
  +		writer.write("\tpIWSSZ->CreateSoapMethod(\""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
   		//create and populate variables for each parameter
   		String paraTypeName;
   		ArrayList paramsB = new ArrayList(params);
  @@ -266,21 +270,23 @@
   				String containedType = null;
   				if (CPPUtils.isSimpleType(qname)){
   					containedType = CPPUtils.getclass4qname(qname);
  -					writer.write("\t"+paraTypeName+" v"+i+";\n"); 
  -					writer.write("\tv"+i+".m_Size = pIWSDZ->GetArraySize();\n");
  -					writer.write("\tif (v"+i+".m_Size < 1) return AXIS_FAIL;\n");
  -					writer.write("\tv"+i+".m_Array = new "+containedType+"[v"+i+".m_Size];\n");
  -					writer.write("\tif (AXIS_SUCCESS != pIWSDZ->GetArray((Axis_Array*)(&v"+i+"), "+CPPUtils.getXSDTypeForBasicType(containedType)+")) return AXIS_FAIL;\n");
  +					//writer.write("\t"+paraTypeName+" v"+i+";\n"); 
  +					writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetBasicArray("+CPPUtils.getXSDTypeForBasicType(containedType)+",0,0);\n");
  +					//writer.write("\tv"+i+".m_Size = pIWSDZ->GetArraySize();\n");
  +					//writer.write("\tif (v"+i+".m_Size < 1) return AXIS_FAIL;\n");
  +					//writer.write("\tv"+i+".m_Array = new "+containedType+"[v"+i+".m_Size];\n");
  +					//writer.write("\tif (AXIS_SUCCESS != pIWSDZ->GetArray((Axis_Array*)(&v"+i+"), "+CPPUtils.getXSDTypeForBasicType(containedType)+")) return AXIS_FAIL;\n");
   				}
   				else{
   					containedType = qname.getLocalPart();
  -					writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetArray((void*)Axis_DeSerialize_"+containedType+ 
  +					//writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetArray((void*)Axis_DeSerialize_"+containedType+ 
  +					writer.write("\t"+paraTypeName+" v"+i+" = ("+paraTypeName+"&)pIWSDZ->GetCmplxArray((void*)Axis_DeSerialize_"+containedType+
   						"\n\t\t, (void*)Axis_Create_"+containedType+", (void*)Axis_Delete_"+containedType+
   						"\n\t\t, (void*)Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
   				}
   			}else{
   				//for complex types 
  -				writer.write("\t"+paraTypeName+" *v"+i+" = ("+paraTypeName+"*)pIWSDZ->GetObject((void*)Axis_DeSerialize_"+paraTypeName+
  +				writer.write("\t"+paraTypeName+" *v"+i+" = ("+paraTypeName+"*)pIWSDZ->GetCmplxObject((void*)Axis_DeSerialize_"+paraTypeName+
   					"\n\t\t, (void*)Axis_Create_"+paraTypeName+", (void*)Axis_Delete_"+paraTypeName+
   					"\n\t\t, Axis_TypeName_"+paraTypeName+", Axis_URI_"+paraTypeName+");\n");				
   			}
  @@ -298,23 +304,26 @@
   			writer.write(");\n");
   			/* set the result */
   			if (returntypeissimple){
  -				writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", ret, "+CPPUtils.getXSDTypeForBasicType(outparamType)+");\n");
  +				writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (void*) &ret, "+CPPUtils.getXSDTypeForBasicType(outparamType)+");\n");
   			}else if(returntypeisarray){
   				QName qname = WrapperUtils.getArrayType(retType).getName();
   				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");
  +					//writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (Axis_Array*)(&ret),"+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
  +					writer.write("\treturn pIWSSZ->AddOutputBasicArrayParam((Axis_Array*)(&ret), "+CPPUtils.getXSDTypeForBasicType(containedType)+", \""+methodName+"Return\");\n");
   				}
   				else{
   					containedType = qname.getLocalPart();
  -					writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (Axis_Array*)(&ret),"+ 
  +					//writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", (Axis_Array*)(&ret),"+ 
  +					writer.write("\treturn pIWSSZ->AddOutputCmplxArrayParam((Axis_Array*)(&ret),"+
   					"(void*) Axis_Serialize_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
   				}
   			}
   			else{
   				//complex type
  -				writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", ret, (void*)Axis_Serialize_"+outparamType+", (void*)Axis_Delete_"+outparamType+");\n");
  +				//writer.write("\treturn pIWSSZ->AddOutputParam(\""+methodName+"Return\", ret, (void*)Axis_Serialize_"+outparamType+", (void*)Axis_Delete_"+outparamType+");\n");
  +				writer.write("\treturn pIWSSZ->AddOutputCmplxParam(ret, (void*)Axis_Serialize_"+outparamType+", (void*)Axis_Delete_"+outparamType+",\""+methodName+"Return\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
   			}
   		}else{//method does not return anything
   			/* Invoke the service when return type is void */
  @@ -344,9 +353,9 @@
   				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_Create_"+typeName+"(void* pObj, bool bArray = false, int nSize=0);\n");
   				writer.write("extern void Axis_Delete_"+typeName+"("+typeName+"* param, bool bArray = false, int nSize=0);\n");
  -				writer.write("extern int Axis_Serialize_"+typeName+"("+typeName+"* param, IWrapperSoapSerializer& pSZ, bool bArray = false);\n");
  +				writer.write("extern int Axis_Serialize_"+typeName+"("+typeName+"* param, IWrapperSoapSerializer* pSZ, bool bArray = false);\n");
   				writer.write("extern int Axis_GetSize_"+typeName+"();\n\n");
   			}
   		} catch (IOException e) {
  
  
  
  1.5.4.3   +4 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java
  
  Index: WrapHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java,v
  retrieving revision 1.5.4.2
  retrieving revision 1.5.4.3
  diff -u -r1.5.4.2 -r1.5.4.3
  --- WrapHeaderWriter.java	19 Nov 2003 13:49:54 -0000	1.5.4.2
  +++ WrapHeaderWriter.java	14 Jan 2004 05:19:19 -0000	1.5.4.3
  @@ -131,6 +131,7 @@
   			writer.write("\tvoid AXISCALL OnFault(IMessageData* pMsg);\n");
   			writer.write("\tint AXISCALL Init();\n");
   			writer.write("\tint AXISCALL Fini();\n");
  +			writer.write("AXIS_BINDING_STYLE AXISCALL GetBindingStyle(){return RPC_ENCODED;};\n");
   			writer.write("private:/*Methods corresponding to the web service methods*/\n");
   			MethodInfo minfo;
   			for (int i = 0; i < methods.size(); i++) {
  @@ -153,7 +154,9 @@
   			writer.write("#include <axis/common/WrapperClassHandler.h>\n");
   			writer.write("#include <axis/common/IMessageData.h>\n");
   			writer.write("#include <axis/common/GDefine.h>\n");
  -			writer.write("#include <axis/common/AxisWrapperAPI.h>\n\n");
  +			//writer.write("#include <axis/common/AxisWrapperAPI.h>\n\n");
  +			writer.write("#include <axis/common/IWrapperSoapDeSerializer.h>\n");
  +			writer.write("#include <axis/common/IWrapperSoapSerializer.h>\n\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
   		}
  
  
  
  1.8.4.3   +5 -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.8.4.2
  retrieving revision 1.8.4.3
  diff -u -r1.8.4.2 -r1.8.4.3
  --- ServiceHeaderWriter.java	12 Jan 2004 03:44:52 -0000	1.8.4.2
  +++ ServiceHeaderWriter.java	14 Jan 2004 05:19:19 -0000	1.8.4.3
  @@ -198,7 +198,11 @@
   			writer.write("#include <axis/common/AxisUserAPI.h>\n\n");
   			while(types.hasNext()){
   				atype = (Type)types.next();
  -				typeSet.add(atype.getLanguageSpecificName());
  +				
  +					if (atype.isArray()&& !CPPUtils.isSimpleType(WrapperUtils.getArrayType(atype).getName()))
  +					typeSet.add(atype.getLanguageSpecificName());
  +					if(!atype.isArray() && !CPPUtils.isSimpleType(atype.getName()))
  +					typeSet.add(atype.getLanguageSpecificName());
   			}		
   			Iterator itr = typeSet.iterator();
   			while(itr.hasNext())
  
  
  
  1.9.4.2   +2 -0      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.9.4.1
  retrieving revision 1.9.4.2
  diff -u -r1.9.4.1 -r1.9.4.2
  --- ParmHeaderFileWriter.java	14 Nov 2003 12:04:23 -0000	1.9.4.1
  +++ ParmHeaderFileWriter.java	14 Jan 2004 05:19:19 -0000	1.9.4.2
  @@ -106,6 +106,8 @@
   				  //if((t = wscontext.getTypemap().getType(new QName(attribs[i][2],attribs[i][3])))!= null && t.isArray()) continue;
   				  writer.write("\t"+getCorrectParmNameConsideringArraysAndComplexTypes(new QName(attribs[i][2],attribs[i][3]),attribs[i][1])+" "+attribs[i][0]+";\n");
   			  }    
  +				writer.write("\t"+classname+"(); \n");
  +				writer.write("\t ~"+classname+"(); \n");
   		  } catch (IOException e) {
   			   throw new WrapperFault(e);
   		  }
  
  
  
  1.3.4.4   +1 -0      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamWriter.java
  
  Index: ParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamWriter.java,v
  retrieving revision 1.3.4.3
  retrieving revision 1.3.4.4
  diff -u -r1.3.4.3 -r1.3.4.4
  --- ParamWriter.java	1 Jan 2004 07:08:30 -0000	1.3.4.3
  +++ ParamWriter.java	14 Jan 2004 05:19:19 -0000	1.3.4.4
  @@ -92,6 +92,7 @@
   
       public ParamWriter(WebServiceContext wscontext,Type type) throws WrapperFault {
               super(WrapperUtils.getWrapperClassName4QualifiedName(type.getLanguageSpecificName()));
  +            //super(CPPUtils.getclass4qname(type.getName()));
               this.wscontext = wscontext;
               this.type = type;
               this.attribs = this.getAttribList(wscontext.getSerInfo().getQualifiedServiceName());
  
  
  
  1.6.4.4   +112 -44   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.6.4.3
  retrieving revision 1.6.4.4
  diff -u -r1.6.4.3 -r1.6.4.4
  --- CPPUtils.java	19 Nov 2003 13:49:54 -0000	1.6.4.3
  +++ CPPUtils.java	14 Jan 2004 05:19:19 -0000	1.6.4.4
  @@ -74,6 +74,7 @@
   	private static Hashtable class2QNamemap = new Hashtable();
   	private static Hashtable qname2classmap = new Hashtable();
   	private static Hashtable type2getValueMethodName = new Hashtable();
  +	private static Hashtable type2BasicArrayName = new Hashtable();
   	
   	static{	
   		 class2QNamemap.put("int", new QName(WrapperConstants.SCHEMA_NAMESPACE, "int"));
  @@ -83,14 +84,23 @@
   		 class2QNamemap.put("double", new QName(WrapperConstants.SCHEMA_NAMESPACE, "double"));
   		 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("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"));
  +		 //class2QNamemap.put("string", new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"));
  +		 //class2QNamemap.put("AxisChar*", new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"));
  +		 class2QNamemap.put("xsd__string", new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"));
  +		 //class2QNamemap.put("Axis_DateTime", new QName(WrapperConstants.SCHEMA_NAMESPACE, "dateTime"));
  +		 class2QNamemap.put("xsd__dateTime", new QName(WrapperConstants.SCHEMA_NAMESPACE, "dateTime"));
  +		 //class2QNamemap.put("Axis_Date", new QName(WrapperConstants.SCHEMA_NAMESPACE, "date"));
  +		 class2QNamemap.put("xsd__date", new QName(WrapperConstants.SCHEMA_NAMESPACE, "date"));
  +		 //class2QNamemap.put("Axis_Time", new QName(WrapperConstants.SCHEMA_NAMESPACE, "time"));
  +		 class2QNamemap.put("xsd__time", new QName(WrapperConstants.SCHEMA_NAMESPACE, "time"));
  +		 //class2QNamemap.put("Axis_Base64Binary", new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"));
  +		 class2QNamemap.put("xsd__base64Binary", new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"));
  +		 //class2QNamemap.put("Axis_HexBinary", new QName(WrapperConstants.SCHEMA_NAMESPACE, "hexBinary"));
  +		 class2QNamemap.put("xsd__hexBinary", new QName(WrapperConstants.SCHEMA_NAMESPACE, "hexBinary"));
  +		 //class2QNamemap.put("Axis_Decimal", new QName(WrapperConstants.SCHEMA_NAMESPACE, "decimal"));
  +		 class2QNamemap.put("xsd_decimal", new QName(WrapperConstants.SCHEMA_NAMESPACE, "decimal"));
  +		 //class2QNamemap.put("Axis_Boolean", new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"));
  +		 class2QNamemap.put("xsd__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");
  @@ -99,14 +109,25 @@
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "double"), "double");
   		 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, "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");
  +		 //qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"), "string");
  +		 //qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"), "AxisChar*");
  + 		 //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");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "string"), "xsd__string");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "dateTime"), "xsd__dateTime");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "date"), "xsd__date");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "time"), "xsd__time");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "base64Binary"), "xsd__base64Binary");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "hexBinary"), "xsd__hexBinary");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "decimal"), "xsd__decimal");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "boolean"), "xsd__boolean");
  +
  +		 
   	}
   	public static boolean isSimpleType(String name){
   		if(class2QNamemap.containsKey(name))
  @@ -122,27 +143,56 @@
   
   	
   	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("unsigned long","GetUnsignedLong");
  -		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");
  +		type2getValueMethodName.put("int","GetElementAsInt");
  +		type2getValueMethodName.put("float","GetElementAsFloat");
  +		//type2getValueMethodName.put("string","GetString");
  +		//type2getValueMethodName.put("AxisChar*","GetElementAsString");
  +		type2getValueMethodName.put("xsd__string","GetElementAsString");
  +		type2getValueMethodName.put("long","GetElementAsLong");
  +		type2getValueMethodName.put("short","GetElementAsShort");
  +		type2getValueMethodName.put("char","GetElementAsChar");
  +		type2getValueMethodName.put("double","GetElementAsDouble");
  +		type2getValueMethodName.put("unsigned long","GetElementAsUnsignedLong");
  +		type2getValueMethodName.put("unsigned int","GetElementAsUnsignedInt");
  +		type2getValueMethodName.put("unsigned short","GetElementAsUnsignedShort");
  +		type2getValueMethodName.put("unsigned char","GetElementAsUnsignedChar");
  +		//type2getValueMethodName.put("Axis_DateTime","GetElementAsDateTime");
  +		//type2getValueMethodName.put("Axis_Date","GetElementAsDate");
  +		//type2getValueMethodName.put("Axis_Time","GetElementAsTime");
  +		//type2getValueMethodName.put("Axis_Base64Binary","GetElementAsBase64Binary");
  +		//type2getValueMethodName.put("Axis_HexBinary","GetElementAsHexBinary");
  +		//type2getValueMethodName.put("Axis_Decimal","GetElementAsDecimal");
  +		//type2getValueMethodName.put("Axis_Boolean","GetElementAsBoolean");
  +		type2getValueMethodName.put("xsd__dateTime","GetElementAsDateTime");
  +		type2getValueMethodName.put("xsd__date","GetElementAsDate");
  +		type2getValueMethodName.put("xsd__time","GetElementAsTime");
  +		type2getValueMethodName.put("xsd__base64Binary","GetElementAsBase64Binary");
  +		type2getValueMethodName.put("xsd__hexBinary","GetElementAsHexBinary");
  +		type2getValueMethodName.put("xsd__decimal","GetElementAsDecimal");
  +		type2getValueMethodName.put("xsd__boolean","GetElementAsBoolean");
  +		
  +		type2BasicArrayName.put("int","xsd__int_Array");
  +		type2BasicArrayName.put("float","xsd__float_Array");
  +		type2BasicArrayName.put("xsd__string","xsd__string_Array");
  +		type2BasicArrayName.put("long","xsd__long_Array");
  +		type2BasicArrayName.put("short","xsd__short_Array");
  +		type2BasicArrayName.put("char","xsd__byte_Array");
  +		type2BasicArrayName.put("double","xsd__double_Array");
  +		type2BasicArrayName.put("unsigned long","xsd__unsignedLong_Array");
  +		type2BasicArrayName.put("unsigned int","xsd__unsignedInt_Array");
  +		type2BasicArrayName.put("unsigned short","xsd__unsignedShort_Array");
  +		type2BasicArrayName.put("unsigned char","xsd__unsignedByte_Array");
  +		type2BasicArrayName.put("xsd__dateTime","xsd__dateTime_Array");
  +		type2BasicArrayName.put("xsd__date","xsd__date_Array");
  +		type2BasicArrayName.put("xsd__time","xsd__time_Array");
  +		type2BasicArrayName.put("xsd__base64Binary","xsd__base64Binary_Array");
  +		type2BasicArrayName.put("xsd__hexBinary","xsd__hexBinary_Array");
  +		type2BasicArrayName.put("xsd__decimal","xsd__decimal_Array");
  +		type2BasicArrayName.put("xsd__boolean","xsd__boolean_Array");
  +		
   		String methodname;
   		if((methodname = (String)type2getValueMethodName.get(typeName))!= null)
  -			return methodname + "()";
  +			return methodname + "(0,0)";
   		return null;	
   	}
   	
  @@ -166,8 +216,10 @@
   	}
   	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 ("string".equals(stype)) return "XSD_STRING";
  +		//else if ("AxisChar*".equals(stype)) return "XSD_STRING";
  +		else if ("xsd__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";
  @@ -177,13 +229,29 @@
   		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 ("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 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 if ("xsd__dateTime".equals(stype)) return "XSD_DATETIME";
  +		else if ("xsd__date".equals(stype)) return "XSD_DATE";
  +		else if ("xsd__time".equals(stype)) return "XSD_TIME";
  +		else if ("xsd__base64Binary".equals(stype)) return "XSD_BASE64BINARY";
  +		else if ("xsd__hexBinary".equals(stype)) return "XSD_HEXBINARY";
  +		else if ("xsd__decimal".equals(stype)) return "XSD_DECIMAL";
  +		else if ("xsd__boolean".equals(stype)) return "XSD_BOOLEAN";
  +
   		else return "unknown type";
  +	}
  +	
  +	public static String getBasicArrayNameforType(String stype){
  +		String arrayName;
  +		if((arrayName = (String)type2BasicArrayName.get(stype))!= null){
  +			return arrayName;
  +		}
  +		return null;		
   	}
   }
  
  
  
  1.15.4.5  +71 -33    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.15.4.4
  retrieving revision 1.15.4.5
  diff -u -r1.15.4.4 -r1.15.4.5
  --- ClientStubWriter.java	12 Jan 2004 03:44:52 -0000	1.15.4.4
  +++ ClientStubWriter.java	14 Jan 2004 05:19:19 -0000	1.15.4.5
  @@ -94,11 +94,11 @@
   	}
   	protected void writeClassComment() throws WrapperFault {
   			try{
  -				writer.write("/*\n");	
  -				writer.write(" * This is the Client Stub implementation file genarated by WSDL2Ws tool.\n");
  -				writer.write(" * "+classname+".cpp: implemtation for the "+classname+".\n");
  -				writer.write(" *\n");
  -				writer.write(" */\n\n");
  +				writer.write("///////////////////////////////////////////////////////////////////////\n");	
  +				writer.write("// This is the Client Stub implementation file genarated by WSDL2Ws tool.\n");
  +				writer.write("// "+classname+".cpp: implemtation for the "+classname+".\n");
  +				writer.write("//\n");
  +				writer.write("//////////////////////////////////////////////////////////////////////\n\n");
   			}catch(IOException e){
   				throw new WrapperFault(e);
   			}
  @@ -113,7 +113,7 @@
   		writer.write("\tm_pCall = new Call();\n");
   		//TODO get TransportURI from WrapInfo and check what the transport is and do the following line accordingly
   		writer.write("\tm_pCall->SetProtocol(APTHTTP);\n");
  -		writer.write("\tm_pCall->SetHeader(\"SOAPAction\", \""+wscontext.getSerInfo().getServicename()+"\");\n");
  +		//writer.write("\tm_pCall->SetHeader(\"SOAPAction\", \""+wscontext.getSerInfo().getServicename()+"\");\n");
   		writer.write("\tm_pCall->SetEndpointURI(\""+wscontext.getWrapInfo().getTargetEndpointURI()+"\");\n");
   		writer.write("}\n\n");
   		}catch(IOException e){
  @@ -137,7 +137,7 @@
   	 */
   	protected void writeMethods() throws WrapperFault {
   		try{
  -			writer.write("\n/*Methods corresponding to the web service methods*/\n");
  +			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);
  @@ -202,9 +202,9 @@
   		}
   		if (returntype != null)
   			returntypeissimple = CPPUtils.isSimpleType(outparamType);
  -		writer.write("\n/*\n");
  -		writer.write(" * This method wrap the service method"+ methodName +"\n");
  -		writer.write(" */\n");
  +		writer.write("\n/////////////////////////////////////////////////////////////////\n");
  +		writer.write("// This method wrap the service method"+ methodName +"\n");
  +		writer.write("//////////////////////////////////////////////////////////////////\n");
   		//method signature
   		String paraTypeName;
   		boolean typeisarray = false;
  @@ -270,14 +270,15 @@
   				//TODO initialize return parameter appropriately.
   			}
   		}
  -		writer.write("\tif (AXIS_SUCCESS != m_pCall->Initialize()) return ");
  +		writer.write("\tif (AXIS_SUCCESS != m_pCall->Initialize(RPC_ENCODED)) return ");
   		if (returntype != null){
   			writer.write((returntypeisarray?"RetArray":returntypeissimple?"Ret":"pReturn")+";\n\t");
   		}
   		else{
   			writer.write(";\n\t");
   		}
  -		writer.write("m_pCall->SetSOAPVersion(SOAP_VER_1_1);\n"); //TODO check which version is it really.
  +		writer.write("m_pCall->SetTransportProperty(SOAPACTION_HEADER, \""+wscontext.getSerInfo().getServicename()+"#"+methodName+"\");\n");
  +		writer.write("\tm_pCall->SetSOAPVersion(SOAP_VER_1_1);\n"); //TODO check which version is it really.
   		writer.write("\tm_pCall->SetOperation(\""+methodName+"\", \""+ wscontext.getWrapInfo().getTargetNameSpaceOfWSDL() +"\");\n");
   		for (int i = 0; i < paramsB.size(); i++) {
   			type = wscontext.getTypemap().getType(((ParameterInfo)paramsB.get(i)).getSchemaName());
  @@ -290,32 +291,43 @@
   				typeisarray = false;
   			}
   			typeissimple = CPPUtils.isSimpleType(paraTypeName);
  -			writer.write("\tm_pCall->AddParameter(");			
  +			//writer.write("\tm_pCall->AddParameter(");			
   			if(typeisarray){
   				//arrays
   				QName qname = WrapperUtils.getArrayType(type).getName();
   				String containedType = null;
   				if (CPPUtils.isSimpleType(qname)){
   					containedType = CPPUtils.getclass4qname(qname);
  +					writer.write("\tm_pCall->AddBasicArrayParameter(");
   					writer.write("(Axis_Array*)(&Value"+i+"), "+CPPUtils.getXSDTypeForBasicType(containedType)+", \""+((ParameterInfo)paramsB.get(i)).getParamName()+"\"");					
   				}
   				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()+"\"");
  +					writer.write("\tm_pCall->AddCmplxArrayParameter(");
  +					//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()+"\"");
  +					writer.write("(Axis_Array*)(&Value"+i+"), (void*)Axis_Serialize_"+containedType+", (void*)Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType);
   				}
   			}else if(typeissimple){
   				//for simple types	
  +				writer.write("\tm_pCall->AddParameter(");	
   				writer.write("Value"+i+", \"" + ((ParameterInfo)paramsB.get(i)).getParamName()+"\", "+CPPUtils.getXSDTypeForBasicType(paraTypeName));
   			}else{
   				//for complex types 
  -				writer.write("Value"+i+", (void*)Axis_Serialize_"+paraTypeName+", (void*)Axis_Delete_"+paraTypeName+", \"" + ((ParameterInfo)paramsB.get(i)).getParamName()+"\"");
  +				writer.write("\tm_pCall->AddCmplxParameter(");
  +				//writer.write("Value"+i+", (void*)Axis_Serialize_"+paraTypeName+", (void*)Axis_Delete_"+paraTypeName+", \"" + ((ParameterInfo)paramsB.get(i)).getParamName()+"\"");
  +				writer.write("Value"+i+", (void*)Axis_Serialize_"+paraTypeName+", (void*)Axis_Delete_"+paraTypeName+", Axis_TypeName_"+outparamType+", Axis_URI_"+outparamType);
   			}
   			writer.write(");\n");
   		}
   		if (returntype == null){
   			writer.write("\tnStatus = m_pCall->Invoke();\n");
  -			writer.write("\tif (AXIS_SUCCESS != nStatus)\n\t{\n");
  +			//writer.write("\tif (AXIS_SUCCESS != nStatus)\n\t{\n");
  +			//writer.write("\t\t//What to do ? . Throw an exception ??? \n\t}\n");
  +			writer.write("\tif (AXIS_SUCCESS == nStatus)\n\t{\n");
  +			writer.write("\t\tif (AXIS_SUCCESS == m_pCall->CheckMessage(\""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t{\n");
   			writer.write("\t\t//What to do ? . Throw an exception ??? \n\t}\n");
  +			writer.write("\t\t}\n");
  +			
   			writer.write("\tm_pCall->UnInitialize();\n");
   		}
   		else if (returntypeisarray){
  @@ -323,34 +335,60 @@
   			String containedType = null;
   			if (CPPUtils.isSimpleType(qname)){
   				containedType = CPPUtils.getclass4qname(qname);
  -				writer.write("\tm_pCall->SetReturnType((Axis_Array*)(&RetArray), "+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
  +				//writer.write("\tm_pCall->SetReturnType((Axis_Array*)(&RetArray), "+CPPUtils.getXSDTypeForBasicType(containedType)+");\n");
  +				
  +				
  +				
  +				writer.write("\tnStatus = m_pCall->Invoke();\n");
  +				writer.write("\tif (AXIS_SUCCESS == nStatus)\n\t{\n");
  +				writer.write("\t\tif (AXIS_SUCCESS == m_pCall->CheckMessage(\""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t{\n");
  +				writer.write("\t\t\tRetArray = ("+containedType+"&)m_pCall->GetBasicArray("+CPPUtils.getXSDTypeForBasicType(containedType)+",0,0);\n\t\t}\n");
  +				writer.write("\t}\n");
  +				writer.write("\tm_pCall->UnInitialize();\n");
  +				writer.write("\treturn RetArray;\n");
  +				
  +				
   			}
   			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");
  -			}
  -			writer.write("\tnStatus = m_pCall->Invoke();\n");
  -			writer.write("\tif (AXIS_SUCCESS != nStatus)\n\t{\n");
  -			writer.write("\t\tdelete RetArray.m_Array;\n");
  -			writer.write("\t\tRetArray.m_Array = NULL;\n");
  -			writer.write("\t\tRetArray.m_Size = 0;\n\t}\n");
  -			writer.write("\tm_pCall->UnInitialize();\n");
  -			writer.write("\treturn RetArray;\n");
  +				//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");
  +				writer.write("\tnStatus = m_pCall->Invoke();\n");
  +				writer.write("\tif (AXIS_SUCCESS == nStatus)\n\t{\n");
  +				writer.write("\t\tif (AXIS_SUCCESS == m_pCall->CheckMessage(\""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t{\n");
  +				writer.write("\t\t\tRetArray = ("+containedType+"&)m_pCall->GetCmplxArray("+"(void*)Axis_DeSerialize_"+containedType+", (void*)Axis_Create_"+containedType+", (void*)Axis_Delete_"+containedType+", (void*)Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
  +				writer.write("\t\t}\n");
  +				writer.write("\tm_pCall->UnInitialize();\n");
  +				writer.write("\treturn RetArray;\n");
  +			}
  +//			writer.write("\tnStatus = m_pCall->Invoke();\n");
  +//			writer.write("\tif (AXIS_SUCCESS == nStatus)\n\t{\n");
  +//			writer.write("\t\tif (AXIS_SUCCESS == m_pCall->CheckMessage(\""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t{\n");
  +//			writer.write("\t\t\tRetArray = ("+outparamType+"&)m_pCall->GetBasicArray("+CPPUtils.getXSDTypeForBasicType(containedType)+",0,0);\n\t\t}\n");
  +//			writer.write("\t}\n");
  +//			writer.write("\tm_pCall->UnInitialize();\n");
  +//			writer.write("\treturn RetArray;\n");
   		}
   		else if(returntypeissimple){
  -			writer.write("\tm_pCall->SetReturnType("+CPPUtils.getXSDTypeForBasicType(outparamType)+");\n");
  +			//writer.write("\tm_pCall->SetReturnType("+CPPUtils.getXSDTypeForBasicType(outparamType)+");\n");
   			writer.write("\tnStatus = m_pCall->Invoke();\n");
  +			//writer.write("\tif (AXIS_SUCCESS == nStatus)\n\t{\n");
   			writer.write("\tif (AXIS_SUCCESS == nStatus)\n\t{\n");
  -			writer.write("\t\tRet = m_pCall->GetResult()->"+CPPUtils.getParameterGetValueMethodName(outparamType)+";\n\t}\n");
  +			writer.write("\t\tif (AXIS_SUCCESS == m_pCall->CheckMessage(\""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t{\n");
  +			//writer.write("\t\t\tRet = m_pCall->GetResult()->"+CPPUtils.getParameterGetValueMethodName(outparamType)+";\n\t\t}\n");
  +			writer.write("\t\t\tRet = m_pCall->"+CPPUtils.getParameterGetValueMethodName(CPPUtils.getclass4qname(returntype.getType().getName()))+";\n\t\t}\n");
  +			writer.write("\t}\n");
   			writer.write("\tm_pCall->UnInitialize();\n");
   			writer.write("\treturn Ret;\n");
   		}
   		else{
  -			writer.write("\tm_pCall->SetReturnType((void*) Axis_DeSerialize_"+outparamType+", (void*) Axis_Create_"+outparamType+", (void*) Axis_Delete_"+outparamType+", Axis_TypeName_"+outparamType+", Axis_URI_"+outparamType+");\n");
  +			//writer.write("\tm_pCall->SetReturnType((void*) Axis_DeSerialize_"+outparamType+", (void*) Axis_Create_"+outparamType+", (void*) Axis_Delete_"+outparamType+", Axis_TypeName_"+outparamType+", Axis_URI_"+outparamType+");\n");
   			writer.write("\tnStatus = m_pCall->Invoke();\n");
   			writer.write("\tif (AXIS_SUCCESS == nStatus)\n\t{\n");
  -			writer.write("\t\tm_pCall->GetResult((void**)&pReturn);\n\t}\n");
  +			writer.write("\t\tif (AXIS_SUCCESS == m_pCall->CheckMessage(\""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t{\n");
  +			writer.write("\t\t\tpReturn = ("+outparamType+"*)m_pCall->GetCmplxObject("+"(void*)Axis_DeSerialize_"+outparamType+", (void*) Axis_Create_"+outparamType+", (void*) Axis_Delete_"+outparamType+", Axis_TypeName_"+outparamType+", Axis_URI_"+outparamType+");\n\t\t}\n");
  +			writer.write("\t}\n");
  +			
   			writer.write("\tm_pCall->UnInitialize();\n");
   			writer.write("\treturn pReturn;\n");						
   		}
  @@ -370,9 +408,9 @@
   				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_Create_"+typeName+"(void* pObj, bool bArray = false, int nSize=0);\n");
   				writer.write("extern void Axis_Delete_"+typeName+"("+typeName+"* param, bool bArray = false, int nSize=0);\n");
  -				writer.write("extern int Axis_Serialize_"+typeName+"("+typeName+"* param, IWrapperSoapSerializer& pSZ, bool bArray = false);\n");
  +				writer.write("extern int Axis_Serialize_"+typeName+"("+typeName+"* param, IWrapperSoapSerializer* pSZ, bool bArray = false);\n");
   				writer.write("extern int Axis_GetSize_"+typeName+"();\n\n");
   			}
   		} catch (IOException e) {
  
  
  
  1.4.4.3   +6 -2      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.4.4.2
  retrieving revision 1.4.4.3
  diff -u -r1.4.4.2 -r1.4.4.3
  --- ClientStubHeaderWriter.java	12 Jan 2004 03:44:52 -0000	1.4.4.2
  +++ ClientStubHeaderWriter.java	14 Jan 2004 05:19:19 -0000	1.4.4.3
  @@ -201,8 +201,12 @@
   			HashSet typeSet = new HashSet();
   			while(types.hasNext()){
   				atype = (Type)types.next();
  -				typeSet.add(atype.getLanguageSpecificName());
  -			}
  +				
  +					if (atype.isArray()&& !CPPUtils.isSimpleType(WrapperUtils.getArrayType(atype).getName()))
  +					typeSet.add(atype.getLanguageSpecificName());
  +					if(!atype.isArray() && !CPPUtils.isSimpleType(atype.getName()))
  +					typeSet.add(atype.getLanguageSpecificName());
  +			}		
   			Iterator itr = typeSet.iterator();
   			while(itr.hasNext())
   			{
  
  
  
  1.9.4.6   +105 -17   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.9.4.5
  retrieving revision 1.9.4.6
  diff -u -r1.9.4.5 -r1.9.4.6
  --- BeanParamWriter.java	1 Jan 2004 07:22:03 -0000	1.9.4.5
  +++ BeanParamWriter.java	14 Jan 2004 05:19:19 -0000	1.9.4.6
  @@ -106,9 +106,9 @@
   		{
   			typeName = itr.next().toString();
   			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_Create_"+typeName+"(void* pObj, bool bArray = false, int nSize=0);\n");
   			writer.write("extern void Axis_Delete_"+typeName+"("+typeName+"* param, bool bArray = false, int nSize=0);\n");
  -			writer.write("extern int Axis_Serialize_"+typeName+"("+typeName+"* param, IWrapperSoapSerializer& pSZ, bool bArray = false);\n");
  +			writer.write("extern int Axis_Serialize_"+typeName+"("+typeName+"* param, IWrapperSoapSerializer* pSZ, bool bArray = false);\n");
   			writer.write("extern int Axis_GetSize_"+typeName+"();\n\n");			
   		}
   		writeSerializeGlobalMethod();
  @@ -126,6 +126,84 @@
   		writer.write(" */\n");
   		writer.write("int Axis_GetSize_"+classname+"()\n{\n\treturn sizeof("+classname+");\n}\n");
   	}
  +	
  +	protected void writeConstructors() throws WrapperFault
  +	{
  +		Type t = null;
  +		try
  +		{
  +			writer.write(classname+"::"+classname+"()\n");
  +			writer.write("{\n");
  +			for(int i = 0; i< attribs.length;i++)
  +			{
  +				//if simple type
  +				if(CPPUtils.isSimpleType(attribs[i][1]))
  +				{
  +					//More to be added
  +					if ("AxisChar*".equals(attribs[i][1]))
  +					{
  +						writer.write("\t"+attribs[i][0]+" = 0;\n");
  +					}
  +				}
  +				//if array
  +				else if((t = wscontext.getTypemap().getType(new QName(attribs[i][2],attribs[i][3])))!= null && t.isArray())
  +				{
  +					QName qname = WrapperUtils.getArrayType(t).getName();
  +					writer.write("\t"+attribs[i][0]+".m_Array = 0;\n");
  +				}
  +				//if complex type
  +				else
  +				{
  +					writer.write("\t"+attribs[i][0]+" = 0;\n");				
  +				}
  +
  +			}		
  +			writer.write("}\n");	
  +		}
  +		catch (IOException ioe)
  +		{
  +			throw new WrapperFault(ioe.toString());
  +		}		
  +	}
  +	
  +	protected void writeDistructors() throws WrapperFault
  +	{
  +		Type t = null;
  +		try
  +		{
  +			writer.write(classname+"::~"+classname+"()\n");
  +			writer.write("{\n");
  +			for(int i = 0; i< attribs.length;i++)
  +			{
  +				//if simple type
  +				if(CPPUtils.isSimpleType(attribs[i][1]))
  +				{
  +					//More to be added
  +					if ("AxisChar*".equals(attribs[i][1]))
  +					{
  +						writer.write("\tfree("+attribs[i][0]+");\n");
  +					}
  +				}
  +				//if array
  +				else if((t = wscontext.getTypemap().getType(new QName(attribs[i][2],attribs[i][3])))!= null && t.isArray())
  +				{
  +					QName qname = WrapperUtils.getArrayType(t).getName();
  +					writer.write("\tdelete "+attribs[i][0]+".m_Array;\n");
  +				}
  +				//if complex type
  +				else
  +				{
  +					writer.write("\tdelete "+attribs[i][0]+";\n");				
  +				}
  +			}		
  +			writer.write("}\n");	
  +		}
  +		catch (IOException ioe)
  +		{
  +			throw new WrapperFault(ioe.toString());
  +		}
  +	}
  +	
   	private void writeSerializeGlobalMethod()throws IOException,WrapperFault{
   		Type t;
   		writer.write("/*\n");
  @@ -144,7 +222,8 @@
   		writer.write("\t}\n");
   		writer.write("\telse\n");
   		writer.write("\t{\n");
  -		writer.write("\t\tconst AxisChar* sPrefix = pSZ.getNewNamespacePrefix();\n");
  +		//writer.write("\t\tconst AxisChar* sPrefix = pSZ.getNewNamespacePrefix();\n");
  +		writer.write("\t\tconst AxisChar* sPrefix = pSZ->GetNamespacePrefix(Axis_URI_"+classname+");\n");
   		writer.write("\t\tpSZ->Serialize(\"<\", Axis_TypeName_"+classname+", \" xsi:type=\\\"\", sPrefix, \":\",\n"); 
   		writer.write("\t\t\tAxis_TypeName_"+classname+", \"\\\" xmlns:\", sPrefix, \"=\\\"\",\n"); 
   		writer.write("\t\t\tAxis_URI_"+classname+", \"\\\">\", NULL);\n");
  @@ -152,14 +231,16 @@
   		for(int i = 0; i< attribs.length;i++){
   			if(CPPUtils.isSimpleType(attribs[i][1])){
   				//if simple type
  -				writer.write("\tpSZ->Serialize(pSZ->SerializeBasicType(\""+attribs[i][0]+"\", param->"+attribs[i][0]+", "+ CPPUtils.getXSDTypeForBasicType(attribs[i][1])+"), NULL);\n");
  +				//writer.write("\tpSZ->Serialize(pSZ->SerializeBasicType(\""+attribs[i][0]+"\", param->"+attribs[i][0]+", "+ CPPUtils.getXSDTypeForBasicType(attribs[i][1])+"), NULL);\n");
  +				writer.write("\tpSZ->SerializeAsElement(\""+attribs[i][0]+"\", (void*)&param->"+attribs[i][0]+", "+ CPPUtils.getXSDTypeForBasicType(attribs[i][1])+");\n");
   			}else if((t = wscontext.getTypemap().getType(new QName(attribs[i][2],attribs[i][3])))!= null && t.isArray()){
   				//if Array
   				QName qname = WrapperUtils.getArrayType(t).getName();
   				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"); 
  +					//writer.write("\tpSZ->SerializeArray((Axis_Array*)(&param->"+attribs[i][0]+"),"+CPPUtils.getXSDTypeForBasicType(arrayType)+", \""+attribs[i][0]+"\");\n");
  +					writer.write("\tpSZ->SerializeBasicArray((Axis_Array*)(&param->"+attribs[i][0]+"),"+CPPUtils.getXSDTypeForBasicType(arrayType)+", \""+attribs[i][0]+"\");\n"); 
   				}
   				else{
   					arrayType = qname.getLocalPart();
  @@ -172,7 +253,7 @@
   				writer.write("\tAxis_Serialize_"+attribs[i][1]+"(param->"+attribs[i][0]+", pSZ);\n");
   			}
   		}
  -		writer.write("\n\tpSZ->Serialize(\"</\", Axis_TypeName_"+classname+", \">\", NULL);\n");
  +		writer.write("\tpSZ->Serialize(\"</\", Axis_TypeName_"+classname+", \">\", NULL);\n");
   		writer.write("\treturn AXIS_SUCCESS;\n");
   		writer.write("}\n\n");
   	
  @@ -199,10 +280,11 @@
   				String arrayType = null;
   				if (CPPUtils.isSimpleType(qname)){
   					arrayType = CPPUtils.getclass4qname(qname);
  -					writer.write("\tparam->"+attribs[i][0]+".m_Size = pIWSDZ->GetArraySize();\n");
  -					writer.write("\tif (param->"+attribs[i][0]+".m_Size < 1) return AXIS_FAIL;\n");
  -					writer.write("\tparam->"+attribs[i][0]+".m_Array = new "+arrayType+"[param->"+attribs[i][0]+".m_Size];\n");
  -					writer.write("\tif (AXIS_SUCCESS != pIWSDZ->GetArray((Axis_Array*)(&param->"+attribs[i][0]+"), "+CPPUtils.getXSDTypeForBasicType(arrayType)+")) return AXIS_FAIL;\n");
  +					//writer.write("\tparam->"+attribs[i][0]+".m_Size = pIWSDZ->GetArraySize();\n");
  +					//writer.write("\tif (param->"+attribs[i][0]+".m_Size < 1) return AXIS_FAIL;\n");
  +					//writer.write("\tparam->"+attribs[i][0]+".m_Array = new "+arrayType+"[param->"+attribs[i][0]+".m_Size];\n");
  +					writer.write("\tparam->"+attribs[i][0]+" = ("+t.getLanguageSpecificName()+"&)pIWSDZ->GetBasicArray("+CPPUtils.getXSDTypeForBasicType(arrayType)+",0,0);\n");
  +					//writer.write("\tif (AXIS_SUCCESS != pIWSDZ->GetArray((Axis_Array*)(&param->"+attribs[i][0]+"), "+CPPUtils.getXSDTypeForBasicType(arrayType)+")) return AXIS_FAIL;\n");
   				}
   				else{
   					arrayType = qname.getLocalPart();
  @@ -212,7 +294,7 @@
   				}
   			}else{
   				//if complex type
  -				writer.write("\tparam->"+attribs[i][0]+" = ("+attribs[i][1]+"*)pIWSDZ->GetObject((void*)Axis_DeSerialize_"+attribs[i][1]+
  +				writer.write("\tparam->"+attribs[i][0]+" = ("+attribs[i][1]+"*)pIWSDZ->GetCmplxObject((void*)Axis_DeSerialize_"+attribs[i][1]+
   					"\n\t\t, (void*)Axis_Create_"+attribs[i][1]+", (void*)Axis_Delete_"+attribs[i][1]+
   					"\n\t\t, Axis_TypeName_"+attribs[i][1]+", Axis_URI_"+attribs[i][1]+");\n");				
   			}		
  @@ -222,7 +304,8 @@
   	}
   	
   	private void writeCreateGlobalMethod()throws IOException{
  -		writer.write("void* Axis_Create_"+classname+"(bool bArray = false, int nSize=0)\n{\n");
  +		//writer.write("void* Axis_Create_"+classname+"(bool bArray = false, int nSize=0)\n{\n");
  +		writer.write("void* Axis_Create_"+classname+"(void* pObj, bool bArray = false, int nSize=0)\n{\n");
   		writer.write("\tif (bArray && (nSize > 0))\n\t\treturn new "+classname+"[nSize];\n");
   		writer.write("\telse\n\t\treturn new "+classname+";\n}\n\n");	
   	}
  @@ -243,9 +326,10 @@
   			}
   		}			
   		if (hasComplexType){ 
  -			writer.write("\t\t/*delete any pointer members or array members of this struct here*/\n");
  -			writer.write("\t\t"+classname+"* pTemp = param;\n");
  -			writer.write("\t\tfor (int x=0; x<nSize; x++)\n");
  +			//writer.write("\t\t/*delete any pointer members or array members of this struct here*/\n");
  +			//writer.write("\t\t"+classname+"* pTemp = param;\n");
  +			//writer.write("\t\tfor (int x=0; x<nSize; x++)\n");
  +			/*
   			writer.write("\t\t{\n");
   			for(int i = 0; i< attribs.length;i++){
   				if(!CPPUtils.isSimpleType(attribs[i][1])){ //this can be either an array or complex type
  @@ -269,12 +353,15 @@
   			}			
   			writer.write("\t\t\tpTemp++;\n");
   			writer.write("\t\t}\n");
  +			*/
   		}
  +
   		writer.write("\t\tdelete [] param;\n");
   		writer.write("\t}\n");
   		writer.write("\telse\n");
   		writer.write("\t{\n");
  -		writer.write("\t\t/*delete any pointer members or array members of this struct here*/\n");
  +		//writer.write("\t\t/*delete any pointer members or array members of this struct here*/\n");
  +		/*
   		for(int i = 0; i< attribs.length;i++){
   			if(!CPPUtils.isSimpleType(attribs[i][1])){
   				//to understand what happens here please refer to where the 
  @@ -294,7 +381,8 @@
   					writer.write("\t\tAxis_Delete_"+attribs[i][1]+"(param->"+attribs[i][0]+");\n");
   				}
   			}
  -		}			
  +		}	
  +		*/		
   		writer.write("\t\tdelete param;\n");
   		writer.write("\t}\n");
   		writer.write("}\n");
  
  
  
  1.2.4.1   +6 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/AllParamWriter.java
  
  Index: AllParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/AllParamWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- AllParamWriter.java	10 Oct 2003 05:13:14 -0000	1.2
  +++ AllParamWriter.java	14 Jan 2004 05:19:19 -0000	1.2.4.1
  @@ -67,6 +67,7 @@
   import org.apache.axis.wsdl.wsdl2ws.WrapperFault;
   import org.apache.axis.wsdl.wsdl2ws.info.Type;
   import org.apache.axis.wsdl.wsdl2ws.info.WebServiceContext;
  +import org.apache.axis.wsdl.wsdl2ws.WrapperUtils;
   
   public class AllParamWriter implements SourceWriter{
   	private WebServiceContext wscontext;
  @@ -88,8 +89,11 @@
   			type = (Type)enu.next();
   			if(wscontext.getWrapInfo().getImplStyle().equals(WrapperConstants.IMPL_STYLE_STRUCT)){
   					if(type.isArray()){
  -						System.out.println("Array writer called ......");
  -						(new ArrayParamWriter(wscontext,type)).writeSource();	
  +						if(!CPPUtils.isSimpleType(WrapperUtils.getArrayType(type).getName()))
  +						{
  +							System.out.println("Array writer called ......");
  +							(new ArrayParamWriter(wscontext,type)).writeSource();	
  +						}
   					}	
   					else{	
   						System.out.println("complex type writer called ......");
  
  
  

Mime
View raw message