ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp BeanParamWriter.java ClientStubWriter.java WrapWriter.java
Date Mon, 21 Feb 2005 06:19:22 GMT
samisa      2005/02/20 22:19:21

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp
                        BeanParamWriter.java ClientStubWriter.java
                        WrapWriter.java
  Log:
  Fixed the compilation problems for RPC style code generated.
  AXISCPP-459
  
  Revision  Changes    Path
  1.33      +15 -3     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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- BeanParamWriter.java	18 Feb 2005 12:09:48 -0000	1.32
  +++ BeanParamWriter.java	21 Feb 2005 06:19:21 -0000	1.33
  @@ -431,7 +431,6 @@
                       if (attribs[i].isSimpleType())
                       {
                       	if (attribs[i].isNillable()
  -                    			|| attribs[i].getTypeName().equals("xsd__string")
   								|| attribs[i].getTypeName().equals("xsd__anyURI")
   								|| attribs[i].getTypeName().equals("xsd__QName")
   								|| attribs[i].getTypeName().equals("xsd__notation"))
  @@ -448,19 +447,32 @@
   	                                + attribs[i].getParamName()
   	                                + "\",0));\n");
                       	}
  +                    	else if(attribs[i].getTypeName().equals("xsd__string"))
  +			{
  +				writer.write(
  +                                    "\tparam->"
  +                                        + attribs[i].getParamNameAsMember()
  +                                        + " = pIWSDZ->"
  +                                        + CUtils.getParameterGetValueMethodName(
  +                                            attribs[i].getTypeName(),
  +                                            attribs[i].isAttribute())
  +                                        + "(\""
  +                                        + attribs[i].getParamName()
  +                                        + "\",0);\n");
  +			}
                       	else
                       	{
   	                        //TODO handle optional attributes
   	                        writer.write(
   	                            "\tparam->"
   	                                + attribs[i].getParamNameAsMember()
  -	                                + " = pIWSDZ->"
  +	                                + " = *(pIWSDZ->"
   	                                + CUtils.getParameterGetValueMethodName(
   	                                    attribs[i].getTypeName(),
   	                                    attribs[i].isAttribute())
   	                                + "(\""
   	                                + attribs[i].getParamName()
  -	                                + "\",0);\n");
  +	                                + "\",0));\n");
                       	}
                       }
                       else
  
  
  
  1.72      +18 -8     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.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- ClientStubWriter.java	18 Feb 2005 12:24:25 -0000	1.71
  +++ ClientStubWriter.java	21 Feb 2005 06:19:21 -0000	1.72
  @@ -349,27 +349,31 @@
                   	{
                   		writer.write(outparamTypeName + "* Ret = NULL;\n");
                   	}
  +			else if (outparamTypeName.equals("xsd__string"))
  +			{
  +                		writer.write(outparamTypeName + " Ret;\n");
  +			}
                   	else
                   	{
   	                    String initValue = CUtils.getInitValue(outparamTypeName);
   	                    if (initValue != null)
   	                    {
   	                        writer.write(
  -	                            outparamTypeName + " Ret = " + initValue + ";\n");
  +	                            outparamTypeName + "* Ret = NULL;\n");//" + initValue + ";\n");
   	                    }
   	                    else
   	                    {
   	                        if (outparamTypeName.equals("xsd__base64Binary")
   	                            || outparamTypeName.equals("xsd__hexBinary"))
   	                        {
  -	                            writer.write(outparamTypeName + " Ret;\n");
  -	                            writer.write("\tRet.__ptr = NULL;\n");
  -	                            writer.write("\tRet.__size = 0;\n");
  +	                            writer.write(outparamTypeName + "* Ret;\n");
  +	                            //writer.write("\tRet->__ptr = NULL;\n");
  +	                            //writer.write("\tRet->__size = 0;\n");
   	                        }
   	
   	                        else
   	                        {
  -	                            writer.write(outparamTypeName + " Ret;\n");
  +	                            writer.write(outparamTypeName + "* Ret;\n");
   	                        }
   	                    }
   	                    //TODO initialize return parameter appropriately.
  @@ -389,11 +393,14 @@
           //damitha
           if (returntype != null)
           {
  -            writer.write(
  +            if (outparamTypeName.equals("xsd__string") && returntypeissimple) 
  +		writer.write("Ret;\n");
  +	    else
  +	        writer.write(
                   (returntypeisarray
                       ? "RetArray"
                       : returntypeissimple
  -                    ? "Ret"
  +                    ? "*Ret"
                       : "pReturn")
                       + ";\n");
           }
  @@ -696,7 +703,10 @@
                           writer.write("\t\t}\n");
                           writer.write("\tm_pCall->unInitialize();\n");
                           //            writer.write("\t\t}\n\t\tm_pCall->unInitialize();\n");
  -                        writer.write("\t\treturn Ret;\n");
  +			if (outparamTypeName.equals("xsd__string") ) 
  +                        	writer.write("\t\treturn Ret;\n");
  +			else 
  +	                        writer.write("\t\treturn *Ret;\n");
                       }
                       else
                       {
  
  
  
  1.39      +11 -1     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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- WrapWriter.java	18 Feb 2005 11:11:20 -0000	1.38
  +++ WrapWriter.java	21 Feb 2005 06:19:21 -0000	1.39
  @@ -343,7 +343,17 @@
               	}
               	else
               	{
  -            		writer.write("\t"
  +            		if (param.getLangName().equals("xsd__string"))
  +				writer.write("\t"
  +                                                        + paraTypeName
  +                                                        + " v"
  +                                                        + i
  +                                                        + " = pIWSDZ->"
  +                                                        + CUtils.getParameterGetValueMethodName(paraTypeName,
false)
  +                                                        + "(\""
  +                                                        + parameterName + "\",0);\n");
  +			else
  +	            		writer.write("\t"
   							+ paraTypeName
   							+ " v"
   							+ i
  
  
  

Mime
View raw message