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/c CUtils.java ClientStubWrapperWriter.java
Date Mon, 13 Oct 2003 12:18:48 GMT
susantha    2003/10/13 05:18:48

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c CUtils.java
                        ClientStubWrapperWriter.java
  Log:
  Fixed few bugs in generating C wrappers/skeletons and Stubs.
  
  Revision  Changes    Path
  1.3       +2 -0      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CUtils.java	10 Oct 2003 05:13:14 -0000	1.2
  +++ CUtils.java	13 Oct 2003 12:18:47 -0000	1.3
  @@ -90,6 +90,7 @@
   		 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"));
   
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "int"), "int");
   		 qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "byte"), "unsigned char");
  @@ -101,6 +102,7 @@
   		 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*");
   	}
   	public static boolean isSimpleType(String name){
   		if(class2QNamemap.containsKey(name))
  
  
  
  1.2       +5 -12     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWrapperWriter.java
  
  Index: ClientStubWrapperWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWrapperWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClientStubWrapperWriter.java	1 Oct 2003 11:57:57 -0000	1.1
  +++ ClientStubWrapperWriter.java	13 Oct 2003 12:18:47 -0000	1.2
  @@ -124,21 +124,18 @@
   			  	writer.write("void ");
   		  	else {
   				String outparam = minfo.getReturnType().getLangName();
  -				isSimpleType = CUtils.isSimpleType(outparam);
  -				writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(minfo.getReturnType(),wscontext)+(isSimpleType?"
":" *"));
  +				writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(minfo.getReturnType(),wscontext)+"
");
   		  	}
   		  	writer.write(minfo.getMethodname()+"(");
   		  	//write parameter names 
   			Iterator params = minfo.getParameterTypes().iterator();
   			if(params.hasNext()){
   				ParameterInfo fparam = (ParameterInfo)params.next();
  -				isSimpleType = CUtils.isSimpleType(fparam.getLangName());
  -				writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(fparam,wscontext)+(isSimpleType?"
Value":" *pValue")+0);
  +				writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(fparam,wscontext)+"
Value"+0);
   			}
   			for(int j =1; params.hasNext();j++){
   				ParameterInfo nparam = (ParameterInfo)params.next();
  -				isSimpleType = CUtils.isSimpleType(nparam.getLangName());
  -				writer.write(","+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+(isSimpleType?"
Value":" *pValue")+j);
  +				writer.write(","+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+"
Value"+j);
   			}
   			writer.write(")\n{\n");
   			writer.write("\tif (NULL == "+sGlobalInstanceName+")\n"); 
  @@ -146,14 +143,10 @@
   			writer.write("\treturn "+sGlobalInstanceName+"->" + minfo.getMethodname()+"(");
   			params = minfo.getParameterTypes().iterator();
   			if(params.hasNext()){
  -				ParameterInfo fparam = (ParameterInfo)params.next();
  -				isSimpleType = CUtils.isSimpleType(fparam.getLangName());
  -				writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(fparam,wscontext)+(isSimpleType?"
Value":" *pValue")+0);
  +				writer.write(" Value"+0);
   			}
   			for(int j =1; params.hasNext();j++){
  -				ParameterInfo nparam = (ParameterInfo)params.next();
  -				isSimpleType = CUtils.isSimpleType(nparam.getLangName());
  -				writer.write(","+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+(isSimpleType?"
Value":" *pValue")+j);
  +				writer.write(", Value"+j);
   			}
   			writer.write(");\n}\n\n");
   	  	}			
  
  
  

Mime
View raw message