ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal ClientStubWriter.java
Date Mon, 14 Mar 2005 14:17:32 GMT
prestonf    2005/03/14 06:17:32

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        ClientStubWriter.java
  Log:
  Hi All,
  I think this will complete what needs to be done for AXISCPP-532.
  
  Regards,
  Fred Preston.
  
  Revision  Changes    Path
  1.82      +50 -41    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- ClientStubWriter.java	14 Mar 2005 02:03:38 -0000	1.81
  +++ ClientStubWriter.java	14 Mar 2005 14:17:31 -0000	1.82
  @@ -84,47 +84,56 @@
        */
       protected void writeMethods () throws WrapperFault
       {
  -	try
  -	{
  -	    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);
  -		writer.write ("\n");
  -	    }
  -
  -	    writer.write ("/*Methods for supporting SecureChannel*/\n\n");
  -	    // FJP - SecureChannel
  -	    writer.write ("void "
  -			  + classname
  -			  + "::SetSecure( char * pszArguments, ...)\n");
  -	    // FJP - SecureChannel
  -	    writer.write ("{\n");	// FJP - SecureChannel
  -	    writer.write ("\tchar **\tppszArgPtr = &pszArguments;\n");
  -	    // FJP - SecureChannel
  -	    writer.write ("\tint\t\tiArgIndex = 0;\n\n");	// FJP - SecureChannel
  -	    writer.write ("\twhile( *ppszArgPtr != NULL)\n");
  -	    // FJP - SecureChannel
  -	    writer.write ("\t{\n");	// FJP - SecureChannel
  -	    writer.write ("\t\tsArguments[iArgIndex] = *ppszArgPtr;\n\n");
  -	    // FJP - SecureChannel
  -	    writer.write ("\t\tiArgIndex++;\n");	// FJP - SecureChannel
  -	    writer.write ("\t\tppszArgPtr++;\n");	// FJP - SecureChannel
  -	    writer.write ("\t}\n");	// FJP - SecureChannel
  -	    writer.write ("}\n\n");	// FJP - SecureChannel
  -	    writer.write ("void " + classname + "::includeSecure()\n");
  -	    // FJP - SecureChannel
  -	    writer.write ("{\n");	// FJP - SecureChannel
  -	    writer.
  -		write
  -		("\tm_pCall->setTransportProperty( SECURE_PROPERTIES, (const char *) &sArguments);\n");
  -	    // FJP - SecureChannel
  -	    writer.write ("}\n");	// FJP - SecureChannel
  -	}
  +        try
  +        {
  +            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);
  +                writer.write("\n");
  +            }
  +
  +            writer.write("/*Methods for supporting SecureChannel*/\n\n");
  +            writer.write( "void " + classname + "::SetSecure( char * pszArguments, ...)\n");
  +            writer.write("{\n");
  +			writer.write("\tint\t\tiArgIndex = 0;\n");
  +			writer.write("\tva_list\targs;\n");
  +			writer.write("\tchar *\tpszArg = NULL;\n");
  +			writer.write("\t\n");
  +			writer.write("\tva_start( args, pszArguments);\n");
  +			writer.write("\t\n");
  +			writer.write("\tif( (pszArg = pszArguments) != NULL)\n");
  +			writer.write("\t{\n");
  +			writer.write("\t\tdo\n");
  +			writer.write("\t\t{\n");
  +			writer.write("\t\t\tif( pszArg == (char *) 1)\n");
  +			writer.write("\t\t\t{\n");
  +			writer.write("\t\t\t\tsArguments[iArgIndex] = \"true\";\n");
  +			writer.write("\t\t\t}\n");
  +			writer.write("\t\t\telse\n");
  +			writer.write("\t\t\t{\n");
  +			writer.write("\t\t\t\tsArguments[iArgIndex] = pszArg;\n");
  +			writer.write("\t\t\t}\n");
  +			writer.write("\n");
  +			writer.write("\t\tiArgIndex++;\n");
  +			writer.write("\t\t} while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex
< 8);\n");
  +			writer.write("\n");
  +			writer.write("\t\tif( iArgIndex == 6)\n");
  +			writer.write("\t\t{\n");
  +			writer.write("\t\t\tsArguments[iArgIndex] = \"false\";\n");
  +			writer.write("\t\t}\n");
  +			writer.write("\t}\n");
  +			writer.write("\n");
  +			writer.write("\tva_end( args);\n");
  +            writer.write("}\n\n");
  +            writer.write("void " + classname + "::includeSecure()\n");
  +            writer.write("{\n");
  +            writer.write("\tm_pCall->setTransportProperty( SECURE_PROPERTIES, (const
char *) &sArguments);\n");
  +            writer.write("}\n");
  +        }
   	catch (IOException e)
   	{
   	    throw new WrapperFault (e);
  
  
  

Mime
View raw message