axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r688130 [7/7] - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws: ./ c/ c/literal/ cpp/ cpp/literal/
Date Fri, 22 Aug 2008 17:37:40 GMT
Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java?rev=688130&r1=688129&r2=688130&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java Fri Aug 22 10:37:39 2008
@@ -56,7 +56,7 @@
         MethodInfo minfo;
         try
         {
-            writer.write("public: \n");
+            c_writer.write("public: \n");
 
             for (int i = 0; i < methods.size(); i++)
             {
@@ -66,7 +66,7 @@
                 
                 //write return type
                 if (0 == noOfOutParams)
-                    writer.write("\tSTORAGE_CLASS_INFO void ");
+                    c_writer.write("\tSTORAGE_CLASS_INFO void ");
                 else if (1 == noOfOutParams)
                 {
                     ParameterInfo returnParam =
@@ -76,17 +76,17 @@
                             || (CUtils.isSimpleType(outParamTypeName)
                             && (returnParam.isNillable() || returnParam.isOptional())
                             && !(CUtils.isPointerType(outParamTypeName))))
-                        writer.write("\tSTORAGE_CLASS_INFO " + outParamTypeName + " * ");
+                        c_writer.write("\tSTORAGE_CLASS_INFO " + outParamTypeName + " * ");
                     else
-                        writer.write("\tSTORAGE_CLASS_INFO " + outParamTypeName + " ");
+                        c_writer.write("\tSTORAGE_CLASS_INFO " + outParamTypeName + " ");
                 }
                 else
                 {
                     isAllTreatedAsOutParams = true;
-                    writer.write("\tSTORAGE_CLASS_INFO void ");
+                    c_writer.write("\tSTORAGE_CLASS_INFO void ");
                 }
                 //write return type
-                writer.write(minfo.getMethodname() + "(");
+                c_writer.write(minfo.getMethodname() + "(");
 
                 //write parameter names 
                 boolean hasInputParms = false;
@@ -94,7 +94,7 @@
                 for (int j = 0; params.hasNext(); j++)
                 {
                     if (j>0) 
-                        writer.write(", ");
+                        c_writer.write(", ");
                     hasInputParms = true;
                     ParameterInfo nparam = (ParameterInfo) params.next();
                     String paramTypeName = CUtils.getClassNameFromParamInfoConsideringArrays(nparam, wscontext);
@@ -107,14 +107,14 @@
                         baseTypeName = paramTypeName;
                     
                     if (nparam.getType().isAttachment())
-                        writer.write("ISoapAttachment *Value" + j);
+                        c_writer.write("ISoapAttachment *Value" + j);
                     else if ((paramTypeName.lastIndexOf ("_Array") > 0)
                                 || (CUtils.isSimpleType(baseTypeName)
                                         && (nparam.isNillable() || nparam.isOptional())
                                         && !(CUtils.isPointerType(baseTypeName))))
-                        writer.write(paramTypeName + " * Value" + j);
+                        c_writer.write(paramTypeName + " * Value" + j);
                     else
-                        writer.write(paramTypeName + " Value" + j);
+                        c_writer.write(paramTypeName + " Value" + j);
                 }
 
                 if (isAllTreatedAsOutParams)
@@ -135,9 +135,9 @@
                         boolean bTypeHasStar = paramType.endsWith( "*");
                         
                         if (hasInputParms || 0!=j)
-                            writer.write(", ");
+                            c_writer.write(", ");
                         
-                        writer.write("AXIS_OUT_PARAM " + paramType);
+                        c_writer.write("AXIS_OUT_PARAM " + paramType);
                         if (CUtils.isSimpleType(baseTypeName))
                         {
                             if ((nparam.isOptional() 
@@ -145,22 +145,22 @@
                                     && !CUtils.isPointerType(baseTypeName))
                             {
                                 if (bTypeHasStar)
-                                    writer.write(" *");
+                                    c_writer.write(" *");
                                 else
-                                    writer.write(" **");
+                                    c_writer.write(" **");
                             }
                             else if (CUtils.isPointerType(baseTypeName) || !bTypeHasStar)
-                                writer.write(" *");
+                                c_writer.write(" *");
                         }
                         else if(bTypeHasStar)
-                            writer.write(" *");
+                            c_writer.write(" *");
                         else
-                            writer.write(" **");
+                            c_writer.write(" **");
                         
-                        writer.write(" OutValue" + j);
+                        c_writer.write(" OutValue" + j);
                     } // for loop
                 }
-                writer.write(");\n");
+                c_writer.write(");\n");
             }
         }
         catch (Exception e)
@@ -176,13 +176,13 @@
     {
         try
         {
-            writer.write("#include <axis/client/Stub.hpp>\n");
-            writer.write("#include <axis/OtherFaultException.hpp>\n");
-            writer.write("#include <axis/ISoapAttachment.hpp>\n");
-            writer.write("#include <axis/ISoapFault.hpp>\n");
-            writer.write("\n");
-            writer.write("AXIS_CPP_NAMESPACE_USE\n");
-            writer.write("\n");
+            c_writer.write("#include <axis/client/Stub.hpp>\n");
+            c_writer.write("#include <axis/OtherFaultException.hpp>\n");
+            c_writer.write("#include <axis/ISoapAttachment.hpp>\n");
+            c_writer.write("#include <axis/ISoapFault.hpp>\n");
+            c_writer.write("\n");
+            c_writer.write("AXIS_CPP_NAMESPACE_USE\n");
+            c_writer.write("\n");
             
             Type atype;
             Iterator types = this.wscontext.getTypemap().getTypes().iterator();
@@ -216,12 +216,12 @@
             Iterator itr = typeSet.iterator();
             while (itr.hasNext())
             {
-                writer.write("#include \"" + itr.next().toString() + CUtils.getHeaderFileExtension() + "\"\n");
+                c_writer.write("#include \"" + itr.next().toString() + CUtils.getHeaderFileExtension() + "\"\n");
             }
             
             //    Method to print the Fault Exception headers
             //writeFaultHeaders();
-            writer.write("\n");
+            c_writer.write("\n");
         }
         catch (IOException e)
         {

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java?rev=688130&r1=688129&r2=688130&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java Fri Aug 22 10:37:39 2008
@@ -118,7 +118,7 @@
         // Generate method prototype
         //=============================================================================        
 
-        CUtils.printMethodComment(writer, "This method wraps the service method " + methodName + ".");
+        CUtils.printMethodComment(c_writer, "This method wraps the service method " + methodName + ".");
         
         //method signature
         String paramTypeName;
@@ -127,17 +127,17 @@
         Type type;
         
         if (returntype == null)
-            writer.write("void");
+            c_writer.write("void");
         else if (returntypeissimple
                     && (!(returntype.isNillable() || returntype.isOptional()) 
                             || CUtils.isPointerType(outparamType)))
-            writer.write(outparamType);
+            c_writer.write(outparamType);
         else if (outparamType.lastIndexOf("*") > 0)
-            writer.write(outparamType);
+            c_writer.write(outparamType);
         else 
-            writer.write(outparamType + "*");
+            c_writer.write(outparamType + "*");
 
-        writer.write (" " + classname + "::\n" + methodName + "(");
+        c_writer.write (" " + c_classname + "::\n" + methodName + "(");
         ArrayList paramsB = (ArrayList) params;
         ParameterInfo paramtype = null;
         if (0 < paramsB.size ())
@@ -178,17 +178,17 @@
 
             typeissimple = CUtils.isSimpleType (baseTypeName);
             if (paramtype.getType().isAttachment())
-                writer.write("ISoapAttachment *Value0");
+                c_writer.write("ISoapAttachment *Value0");
             else if (typeissimple
                     && (!(((ParameterInfo) paramsB.get (0)).isNillable () || ((ParameterInfo) paramsB.get (0)).isOptional())
                             || CUtils.isPointerType(baseTypeName)))
             {
-                writer.write (paramTypeName + " Value0");
+                c_writer.write (paramTypeName + " Value0");
             }
             else if (paramTypeName.lastIndexOf ("*") > 0)
-                writer.write (paramTypeName + " Value0");
+                c_writer.write (paramTypeName + " Value0");
             else //for AnyType too
-                writer.write (paramTypeName + "* Value0");
+                c_writer.write (paramTypeName + "* Value0");
 
             for (int i = 1; i < paramsB.size (); i++)
             {
@@ -228,16 +228,16 @@
 
                 typeissimple = CUtils.isSimpleType (baseTypeName);
                 if (paramtype.getType().isAttachment())
-                       writer.write(", ISoapAttachment *Value" + i);
+                       c_writer.write(", ISoapAttachment *Value" + i);
                 else if (typeissimple
                             && (!(((ParameterInfo) paramsB.get (i)).isNillable () 
                                     || ((ParameterInfo) paramsB.get (i)).isOptional())
                                         || CUtils.isPointerType(baseTypeName)))
-                    writer.write (", " + paramTypeName + " Value" + i);
+                    c_writer.write (", " + paramTypeName + " Value" + i);
                 else if (paramTypeName.lastIndexOf ("*") > 0)
-                    writer.write (", " + paramTypeName + " Value" + i);
+                    c_writer.write (", " + paramTypeName + " Value" + i);
                 else //for AnyType too
-                    writer.write (", " + paramTypeName + "* Value" + i);
+                    c_writer.write (", " + paramTypeName + "* Value" + i);
             } // end for loop
         } // end if (0 < paramsB.size ())
         
@@ -259,30 +259,30 @@
                 boolean bTypeHasStar = paramType.endsWith("*");
                 
                 if (paramsB.size()!=0 || 0!=i)
-                    writer.write(", ");
+                    c_writer.write(", ");
                 
-                writer.write("AXIS_OUT_PARAM " + paramType);
+                c_writer.write("AXIS_OUT_PARAM " + paramType);
                 if (CUtils.isSimpleType(baseTypeName))
                 {
                     if ((param.isOptional() || param.isNillable()) && !CUtils.isPointerType(baseTypeName))
                     {
                         if (bTypeHasStar)
-                            writer.write(" *");
+                            c_writer.write(" *");
                         else
-                            writer.write(" **");
+                            c_writer.write(" **");
                     }
                     else if (CUtils.isPointerType(baseTypeName) || !bTypeHasStar)
-                        writer.write(" *");
+                        c_writer.write(" *");
                 }
                 else if(bTypeHasStar)
-                    writer.write(" *");
+                    c_writer.write(" *");
                 else
-                    writer.write(" **");
+                    c_writer.write(" **");
                 
-                writer.write(" OutValue" + i);
+                c_writer.write(" OutValue" + i);
             } // end for-loop
     
-        writer.write (")\n{\n");
+        c_writer.write (")\n{\n");
         
         //=============================================================================
         // Generate global variables (outside of try block)
@@ -290,62 +290,62 @@
         
         if (returntype != null)
         {
-            writer.write ("\t");
+            c_writer.write ("\t");
     
             if (returntypeisarray)
-                writer.write (outparamType + " * RetArray = new " + outparamType + "();\n");
+                c_writer.write (outparamType + " * RetArray = new " + outparamType + "();\n");
             else if (!returntypeissimple)
             {        
                 //for AnyType too
                 if (outparamType.lastIndexOf ("*") > 0)
-                    writer.write (outparamType + " pReturn = NULL;\n");
+                    c_writer.write (outparamType + " pReturn = NULL;\n");
                 else
-                    writer.write (outparamType + "* pReturn = NULL;\n");
+                    c_writer.write (outparamType + "* pReturn = NULL;\n");
             }
             else if ((returntype.isNillable () || returntype.isOptional())
                         && !(CUtils.isPointerType(outparamType)))
-                writer.write (outparamType + "* Ret = NULL;\n");
+                c_writer.write (outparamType + "* Ret = NULL;\n");
             else
             {
                 String initValue = CUtils.getInitValueForType (outparamType);
                 if (initValue != null)
-                    writer.write (outparamType + " Ret = " + initValue + ";\n");
+                    c_writer.write (outparamType + " Ret = " + initValue + ";\n");
                 else if (CUtils.getXSDEnumeratorForType( outparamType).equals("XSD_DATETIME")
                         || CUtils.getXSDEnumeratorForType( outparamType).equals("XSD_DATE")
                         || CUtils.getXSDEnumeratorForType( outparamType).equals("XSD_TIME"))
                 {
-                    writer.write (outparamType + " Ret;\n");
-                    writer.write ("\tmemset(&Ret,0,sizeof(" + outparamType + "));\n");
+                    c_writer.write (outparamType + " Ret;\n");
+                    c_writer.write ("\tmemset(&Ret,0,sizeof(" + outparamType + "));\n");
                 }
                 else
-                    writer.write (outparamType + " Ret;\n");
+                    c_writer.write (outparamType + " Ret;\n");
             }
         }
         
-        writer.write ("\tconst char* pcCmplxFaultName = NULL;\n\n");
+        c_writer.write ("\tconst char* pcCmplxFaultName = NULL;\n\n");
         
         //=============================================================================
         // Generate try block and method logic
         //=============================================================================        
                 
-        writer.write ("\ttry\n\t{\n");
+        c_writer.write ("\ttry\n\t{\n");
     
-        CUtils.printBlockComment(writer, "Initialize client engine, set SOAP version, SOAPAction, operation, etc.");
+        CUtils.printBlockComment(c_writer, "Initialize client engine, set SOAP version, SOAPAction, operation, etc.");
         
-        writer.write("\t\tif (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER" + "))\n");
-        writer.write("\t\t\treturn ");
+        c_writer.write("\t\tif (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER" + "))\n");
+        c_writer.write("\t\t\treturn ");
         if (returntype != null)
-            writer.write ((returntypeisarray ? "RetArray" : returntypeissimple ? "Ret" : "pReturn") + ";\n");
+            c_writer.write ((returntypeisarray ? "RetArray" : returntypeissimple ? "Ret" : "pReturn") + ";\n");
         else
-            writer.write (";\n");
-        writer.write ("\n");
+            c_writer.write (";\n");
+        c_writer.write ("\n");
         
-        writer.write ("\t\tif (NULL==m_pCall->getTransportProperty(\"SOAPAction\",false))\n");
-        writer.write ("\t\t\tm_pCall->setTransportProperty(SOAPACTION_HEADER , \""
+        c_writer.write ("\t\tif (NULL==m_pCall->getTransportProperty(\"SOAPAction\",false))\n");
+        c_writer.write ("\t\t\tm_pCall->setTransportProperty(SOAPACTION_HEADER , \""
                + minfo.getSoapAction () + "\");\n");
-        writer.write("\n");
+        c_writer.write("\n");
         
-        writer.write ("\t\tm_pCall->setSOAPVersion(SOAP_VER_1_1);\n");
+        c_writer.write ("\t\tm_pCall->setSOAPVersion(SOAP_VER_1_1);\n");
         //TODO check which version is it really.
         
         // Issue setOperation logic...namespace for the operation is 
@@ -370,7 +370,7 @@
         if (minfo.isUnwrapped())
             iswrapperstyle = "false";
         
-         writer.write( "\t\tm_pCall->setOperation(\""
+         c_writer.write( "\t\tm_pCall->setOperation(\""
                 + minfo.getMethodname() + "\", \""
                 + namespaceURI + "\", " + iswrapperstyle + ");\n");
             
@@ -378,9 +378,9 @@
         // Apply user specified properties
         //=============================================================================        
         
-        CUtils.printBlockComment(writer, "Apply SSL configuration properties and user-set SOAP headers.");
-        writer.write ("\t\tincludeSecure();\n");
-        writer.write ("\t\tapplyUserPreferences();\n");
+        CUtils.printBlockComment(c_writer, "Apply SSL configuration properties and user-set SOAP headers.");
+        c_writer.write ("\t\tincludeSecure();\n");
+        c_writer.write ("\t\tapplyUserPreferences();\n");
 
         //=============================================================================
         // Process elements
@@ -400,10 +400,10 @@
             if (!commentIssued)
             {
                 commentIssued = true;
-                CUtils.printBlockComment(writer, "Process parameters.");
+                CUtils.printBlockComment(c_writer, "Process parameters.");
             }
             else
-                writer.write ("\n");
+                c_writer.write ("\n");
             
             // add elements
             type = wscontext.getTypemap ().getType (param.getSchemaName ());
@@ -431,7 +431,7 @@
             }
     
             if (param.isAnyType ())
-                writer.write ("\t\tm_pCall->addAnyObject(Value" + i);
+                c_writer.write ("\t\tm_pCall->addAnyObject(Value" + i);
             else
             {
                 String parameterName = ((ParameterInfo) paramsB.get (i)).getElementNameAsSOAPString ();
@@ -439,25 +439,25 @@
     
                 if (((ParameterInfo)paramsB.get(i)).isOptional())
                 {
-                    writer.write("\t\tif (Value" + i + " != NULL)\n\t\t{\n");
+                    c_writer.write("\t\tif (Value" + i + " != NULL)\n\t\t{\n");
                     tab2 = "\t";
                 }
                 
                 // If unwrapped, we pass in null string for qualified element name. 
                 if (minfo.isUnwrapped())
                 {
-                    writer.write (tab2 + "\t\tchar cPrefixAndParamName" + i + "[" + "] = \"\";\n");                    
+                    c_writer.write (tab2 + "\t\tchar cPrefixAndParamName" + i + "[" + "] = \"\";\n");                    
                 }
                 else if (namespace.length () == 0)
                 {
-                    writer.write (tab2 + "\t\tchar cPrefixAndParamName"
+                    c_writer.write (tab2 + "\t\tchar cPrefixAndParamName"
                               + i + "[" + "] = \"" + parameterName + "\";\n");
                 }
                 else
                 {
                     int stringLength = 8 + 1 + parameterName.length () + 1;
-                    writer.write (tab2 + "\t\tchar cPrefixAndParamName" + i + "[" + stringLength + "];\n");
-                    writer.write (tab2 + "\t\tsprintf( cPrefixAndParamName" + i +
+                    c_writer.write (tab2 + "\t\tchar cPrefixAndParamName" + i + "[" + stringLength + "];\n");
+                    c_writer.write (tab2 + "\t\tsprintf( cPrefixAndParamName" + i +
                               ", \"%s:" + parameterName +
                               "\", m_pCall->getNamespacePrefix(\"" +  namespace + "\"));\n");
                 }
@@ -465,18 +465,18 @@
                 if (param.getType().isAttachment())
                 {
                     String attchType = param.getType().getName().getLocalPart();
-                          writer.write(tab2 + "\t\tconst AxisChar *xmlSoapNsPfx" + i + 
+                          c_writer.write(tab2 + "\t\tconst AxisChar *xmlSoapNsPfx" + i + 
                         " = m_pCall->getNamespacePrefix(\"" + 
                         WrapperConstants.APACHE_XMLSOAP_NAMESPACE + "\");\n");
-                    writer.write(tab2 + "\t\tchar attchType" + i + "[64];\n");
-                    writer.write(tab2 + "\t\tstrcpy(attchType" + i + ", xmlSoapNsPfx" + i + ");\n");
-                    writer.write(tab2 + "\t\tstrcat(attchType" + i + ", \":" + attchType + "\");\n");
-                    writer.write(tab2 + "\t\tIAttribute *attrs" + i + "[2];\n");
-                    writer.write(tab2 + "\t\tattrs" + i + "[0] = m_pCall->createAttribute(\"type\", \"xsi\", attchType" + i + 
+                    c_writer.write(tab2 + "\t\tchar attchType" + i + "[64];\n");
+                    c_writer.write(tab2 + "\t\tstrcpy(attchType" + i + ", xmlSoapNsPfx" + i + ");\n");
+                    c_writer.write(tab2 + "\t\tstrcat(attchType" + i + ", \":" + attchType + "\");\n");
+                    c_writer.write(tab2 + "\t\tIAttribute *attrs" + i + "[2];\n");
+                    c_writer.write(tab2 + "\t\tattrs" + i + "[0] = m_pCall->createAttribute(\"type\", \"xsi\", attchType" + i + 
                         ");\n");
-                    writer.write(tab2 + "\t\tattrs" + i + "[1] = m_pCall->createAttribute(xmlSoapNsPfx" + i + 
+                    c_writer.write(tab2 + "\t\tattrs" + i + "[1] = m_pCall->createAttribute(xmlSoapNsPfx" + i + 
                         ", \"xmlns\", \"http://xml.apache.org/xml-soap\");\n");
-                    writer.write(tab2 + "\t\tm_pCall->addAttachmentParameter(Value" + i + ", cPrefixAndParamName" + i + 
+                    c_writer.write(tab2 + "\t\tm_pCall->addAttachmentParameter(Value" + i + ", cPrefixAndParamName" + i + 
                         ", attrs" + i + ", 2");
                 }
                 else if (typeisarray)
@@ -493,15 +493,15 @@
                     {
                         // Array of simple type
                         String containedType = CUtils.getSimpleType (qname);
-                        writer.write (tab2 + "\t\tm_pCall->addBasicArrayParameter(");
-                        writer.write ("Value" + i + ", " +
+                        c_writer.write (tab2 + "\t\tm_pCall->addBasicArrayParameter(");
+                        c_writer.write ("Value" + i + ", " +
                               CUtils.getXSDEnumeratorForType(containedType) + ", cPrefixAndParamName" + i);
                     }
                     else if (arrayType != null && arrayType.isSimpleType ())
                     {
                         String containedType = CUtils.getSimpleType (arrayType.getBaseType ());
-                        writer.write (tab2 + "\t\tm_pCall->addBasicArrayParameter(");
-                        writer.write ("Value" + i + ", " +
+                        c_writer.write (tab2 + "\t\tm_pCall->addBasicArrayParameter(");
+                        c_writer.write ("Value" + i + ", " +
                                   CUtils.getXSDEnumeratorForType(containedType) +
                                   ", cPrefixAndParamName" + i);
                     }
@@ -509,16 +509,16 @@
                     {
                         // Array of complex type
                         String containedType = qname.getLocalPart ();
-                        writer.write (tab2 + "\t\tm_pCall->addCmplxArrayParameter(");
-                        writer.write ("Value" + i +
+                        c_writer.write (tab2 + "\t\tm_pCall->addCmplxArrayParameter(");
+                        c_writer.write ("Value" + i +
                                   ", (void*)Axis_Serialize_" + containedType +
                                   ", (void*)Axis_Delete_" + containedType +
                                   ", \"" + parameterName + "\"" + ", ");
                         
                         if (namespace.length () == 0)
-                            writer.write ("NULL");
+                            c_writer.write ("NULL");
                         else
-                            writer.write ("Axis_URI_" + containedType);
+                            c_writer.write ("Axis_URI_" + containedType);
                     }
                 }
                 else if (CUtils.isSimpleType (paramTypeName))
@@ -527,31 +527,31 @@
                             || param.isOptional()
                             || CUtils.isPointerType(paramTypeName))
                     {
-                        writer.write (tab2 + "\t\tm_pCall->addParameter(");
-                        writer.write ("(void*)Value" + i + ", cPrefixAndParamName" + i
+                        c_writer.write (tab2 + "\t\tm_pCall->addParameter(");
+                        c_writer.write ("(void*)Value" + i + ", cPrefixAndParamName" + i
                                   + ", " + CUtils.getXSDEnumeratorForType(paramTypeName));
                     }
                     else
                     {
-                        writer.write (tab2 + "\t\tm_pCall->addParameter(");
-                        writer.write ("(void*)&Value" + i + ", cPrefixAndParamName" + i
+                        c_writer.write (tab2 + "\t\tm_pCall->addParameter(");
+                        c_writer.write ("(void*)&Value" + i + ", cPrefixAndParamName" + i
                                   + ", " + CUtils.getXSDEnumeratorForType(paramTypeName));
                     }
                 }
                 else
                 {
                     // Complex Type
-                    writer.write (tab2 + "\t\tm_pCall->addCmplxParameter(");
-                    writer.write ("Value" + i
+                    c_writer.write (tab2 + "\t\tm_pCall->addCmplxParameter(");
+                    c_writer.write ("Value" + i
                           + ", (void*)Axis_Serialize_" + paramTypeName
                           + ", (void*)Axis_Delete_" + paramTypeName
                           + ", cPrefixAndParamName" + i + ", Axis_URI_" + paramTypeName);
                 }              
             }
 
-            writer.write (");\n");
+            c_writer.write (");\n");
             if (((ParameterInfo)paramsB.get(i)).isOptional())
-                writer.write("\t\t}\n");
+                c_writer.write("\t\t}\n");
         } // end for-loop
         
         //=============================================================================
@@ -579,16 +579,16 @@
 
         if (minfo.getOutputMessage () != null)
         {
-            CUtils.printBlockComment(writer, "Invoke web service, send/receive operation. Handle output parameters, if any.");
-            writer.write ("\t\tif (AXIS_SUCCESS == m_pCall->sendAndReceive())\n\t\t{\n");
-            writer.write ("\t\t\tif(AXIS_SUCCESS == m_pCall->validateMessage(\""
+            CUtils.printBlockComment(c_writer, "Invoke web service, send/receive operation. Handle output parameters, if any.");
+            c_writer.write ("\t\tif (AXIS_SUCCESS == m_pCall->sendAndReceive())\n\t\t{\n");
+            c_writer.write ("\t\t\tif(AXIS_SUCCESS == m_pCall->validateMessage(\""
                   + minfo.getOutputMessage ().getLocalPart () + "\", \""
                   + minfo.getOutputMessage ().getNamespaceURI () + "\", " + consumeBodyNode + "))\n\t\t\t{\n");
         }
         else
         {
-            CUtils.printBlockComment(writer, "Invoke web service, send-only operation.");
-            writer.write ("\t\tif (AXIS_SUCCESS == m_pCall->send())\n\t\t{\n");
+            CUtils.printBlockComment(c_writer, "Invoke web service, send-only operation.");
+            c_writer.write ("\t\tif (AXIS_SUCCESS == m_pCall->send())\n\t\t{\n");
         }
         
         //=============================================================================
@@ -650,54 +650,54 @@
                     {
                         containedType = CUtils.getSimpleType (qname);
         
-                        writer.write("\n\t\t\t\tAxis_Array * pReturn" + i + " = m_pCall->getBasicArray(" + CUtils.getXSDEnumeratorForType (containedType) 
+                        c_writer.write("\n\t\t\t\tAxis_Array * pReturn" + i + " = m_pCall->getBasicArray(" + CUtils.getXSDEnumeratorForType (containedType) 
                             + ", \"" + currentType.getParamNameAsSOAPString ()
                             + "\", 0);\n\n");
-                        writer.write("\t\t\t\tif( pReturn" + i + " != NULL && OutValue" + i + " != NULL)\n");
-                        writer.write("\t\t\t\t{\n");
-                        writer.write("\t\t\t\t\tif( *OutValue" + i + " == NULL)\n");
-                        writer.write("\t\t\t\t\t\t*OutValue" + i + " = new " + currentParaType + "();\n");
-                        writer.write("\t\t\t\t\telse\n");
-                        writer.write("\t\t\t\t\t\t(*OutValue" + i + ")->clear();\n");
-                        writer.write("\t\t\t\t\t(*OutValue" + i + ")->clone(*pReturn" + i + ");\n");
-                        writer.write("\t\t\t\t}\n\n");
-                        writer.write("\t\t\t\tAxis::AxisDelete( (void *) pReturn" + i + ", XSD_ARRAY);\n");
+                        c_writer.write("\t\t\t\tif( pReturn" + i + " != NULL && OutValue" + i + " != NULL)\n");
+                        c_writer.write("\t\t\t\t{\n");
+                        c_writer.write("\t\t\t\t\tif( *OutValue" + i + " == NULL)\n");
+                        c_writer.write("\t\t\t\t\t\t*OutValue" + i + " = new " + currentParaType + "();\n");
+                        c_writer.write("\t\t\t\t\telse\n");
+                        c_writer.write("\t\t\t\t\t\t(*OutValue" + i + ")->clear();\n");
+                        c_writer.write("\t\t\t\t\t(*OutValue" + i + ")->clone(*pReturn" + i + ");\n");
+                        c_writer.write("\t\t\t\t}\n\n");
+                        c_writer.write("\t\t\t\tAxis::AxisDelete( (void *) pReturn" + i + ", XSD_ARRAY);\n");
                     }
                     else
                     {
                         containedType = qname.getLocalPart ();
-                        writer.write("\n\t\t\t\tif (OutValue" + i + " != NULL)\n" );
-                        writer.write("\t\t\t\t{\n");
-                        writer.write("\t\t\t\t\tif (" + currentParamName + " == NULL)\n");
-                        writer.write("\t\t\t\t\t\t" + currentParamName + " = new " + containedType + "_Array();\n");
-                        writer.write("\t\t\t\t\telse\n");
-                        writer.write("\t\t\t\t\t\t(" + currentParamName + ")->clear();\n");
-                        writer.write("\t\t\t\t\tm_pCall->getCmplxArray(" + currentParamName 
+                        c_writer.write("\n\t\t\t\tif (OutValue" + i + " != NULL)\n" );
+                        c_writer.write("\t\t\t\t{\n");
+                        c_writer.write("\t\t\t\t\tif (" + currentParamName + " == NULL)\n");
+                        c_writer.write("\t\t\t\t\t\t" + currentParamName + " = new " + containedType + "_Array();\n");
+                        c_writer.write("\t\t\t\t\telse\n");
+                        c_writer.write("\t\t\t\t\t\t(" + currentParamName + ")->clear();\n");
+                        c_writer.write("\t\t\t\t\tm_pCall->getCmplxArray(" + currentParamName 
                               + ", (void*) Axis_DeSerialize_" + containedType
                               + ", (void*) Axis_Create_" + containedType
                               + ", (void*) Axis_Delete_" + containedType
                               + ", \"" + currentType.getElementNameAsSOAPString () 
                               + "\", Axis_URI_" + containedType + ");\n");
-                        writer.write("\t\t\t\t}\n");
-                        writer.write("\t\t\t\telse\n");
-                        writer.write("\t\t\t\t{\n");
-                        writer.write("\t\t\t\t\t// Unable to return value, but will deserialize to ensure subsequent elements can be correctly processed.\n");
-                        writer.write("\t\t\t\t\t" + containedType + "_Array * pTemp" + i 
+                        c_writer.write("\t\t\t\t}\n");
+                        c_writer.write("\t\t\t\telse\n");
+                        c_writer.write("\t\t\t\t{\n");
+                        c_writer.write("\t\t\t\t\t// Unable to return value, but will deserialize to ensure subsequent elements can be correctly processed.\n");
+                        c_writer.write("\t\t\t\t\t" + containedType + "_Array * pTemp" + i 
                                 + " = new " + containedType + "_Array();\n");
-                        writer.write("\t\t\t\t\tm_pCall->getCmplxArray(pTemp" + i 
+                        c_writer.write("\t\t\t\t\tm_pCall->getCmplxArray(pTemp" + i 
                               + ", (void*) Axis_DeSerialize_" + containedType
                               + ", (void*) Axis_Create_" + containedType
                               + ", (void*) Axis_Delete_" + containedType
                               + ", \"" + currentType.getElementNameAsSOAPString () 
                               + "\", Axis_URI_" + containedType + ");\n");
-                        writer.write("\t\t\t\t\tdelete pTemp" + i + ";\n");
-                        writer.write("\t\t\t\t}\n");
+                        c_writer.write("\t\t\t\t\tdelete pTemp" + i + ";\n");
+                        c_writer.write("\t\t\t\t}\n");
                     }
                 }
                 else if (typeissimple)
                 {
                     if( i > 0)
-                        writer.write( "\n");
+                        c_writer.write( "\n");
                     
                     if (CUtils.isPointerType(baseTypeName))
                     {
@@ -711,58 +711,58 @@
                             xsdType += " *";
                         }
                         
-                        writer.write( "\t\t\t\t" + currentParaType + " pReturn" + i + " = m_pCall->" + CUtils.getDeserializerMethodName( baseTypeName, false) + "( \"" + currentType.getParamNameAsSOAPString() + "\", 0);\n");
-                        writer.write( "\n");
-                        writer.write( "\t\t\t\tif( pReturn" + i + " != NULL && OutValue" + i + " != NULL)\n");
-                        writer.write( "\t\t\t\t\t{\n");
-                        writer.write( "\t\t\t\t\tif( *OutValue" + i + " != NULL)\n");
-                        writer.write( "\t\t\t\t\t{\n");
-                        writer.write( "\t\t\t\t\t\tint\tiStringSize" + i + " = strlen( (char *) *OutValue" + i + ");\n");
-                        writer.write( "\t\t\t\t\t\tint\tiStrLenValue" + i + " = strlen( pReturn" + i + ");\n");
-                        writer.write( "\n");
-                        writer.write( "\t\t\t\t\t\tif( iStrLenValue" + i + " > iStringSize" + i + ")\n");
-                        writer.write( "\t\t\t\t\t\t{\n");
-                        writer.write( "\t\t\t\t\t\t\t*OutValue" + i + " =(" + xsdType + ") new char[iStrLenValue" + i + " + 1];\n");
-                        writer.write( "\t\t\t\t\t\t\tstrcpy( (char *) *OutValue" + i + ", pReturn" + i + ");\n");
-                        writer.write( "\t\t\t\t\t\t}\n");
-                        writer.write( "\t\t\t\t\t\telse\n");
-                        writer.write( "\t\t\t\t\t\t\tstrcpy( (char *) *OutValue" + i + ", pReturn" + i + ");\n");
-                        writer.write( "\t\t\t\t\t}\n");
-                        writer.write( "\t\t\t\t\telse\n");
-                        writer.write( "\t\t\t\t\t{\n");
-                        writer.write( "\t\t\t\t\t\t*OutValue" + i + " = (" + xsdType + ") new char[strlen( pReturn" + i + ") + 1];\n");
-                        writer.write( "\t\t\t\t\t\tstrcpy( (char *) *OutValue" + i + ", pReturn" + i + ");\n");
-                        writer.write( "\t\t\t\t\t}\n");
-                        writer.write( "\t\t\t\t}\n");
-                        writer.write( "\n");
-                        writer.write( "\t\t\t\tAxis::AxisDelete( (void *) pReturn" + i + ", " + CUtils.getXSDEnumeratorForType( baseTypeName) + ");\n");
+                        c_writer.write( "\t\t\t\t" + currentParaType + " pReturn" + i + " = m_pCall->" + CUtils.getDeserializerMethodName( baseTypeName, false) + "( \"" + currentType.getParamNameAsSOAPString() + "\", 0);\n");
+                        c_writer.write( "\n");
+                        c_writer.write( "\t\t\t\tif( pReturn" + i + " != NULL && OutValue" + i + " != NULL)\n");
+                        c_writer.write( "\t\t\t\t\t{\n");
+                        c_writer.write( "\t\t\t\t\tif( *OutValue" + i + " != NULL)\n");
+                        c_writer.write( "\t\t\t\t\t{\n");
+                        c_writer.write( "\t\t\t\t\t\tint\tiStringSize" + i + " = strlen( (char *) *OutValue" + i + ");\n");
+                        c_writer.write( "\t\t\t\t\t\tint\tiStrLenValue" + i + " = strlen( pReturn" + i + ");\n");
+                        c_writer.write( "\n");
+                        c_writer.write( "\t\t\t\t\t\tif( iStrLenValue" + i + " > iStringSize" + i + ")\n");
+                        c_writer.write( "\t\t\t\t\t\t{\n");
+                        c_writer.write( "\t\t\t\t\t\t\t*OutValue" + i + " =(" + xsdType + ") new char[iStrLenValue" + i + " + 1];\n");
+                        c_writer.write( "\t\t\t\t\t\t\tstrcpy( (char *) *OutValue" + i + ", pReturn" + i + ");\n");
+                        c_writer.write( "\t\t\t\t\t\t}\n");
+                        c_writer.write( "\t\t\t\t\t\telse\n");
+                        c_writer.write( "\t\t\t\t\t\t\tstrcpy( (char *) *OutValue" + i + ", pReturn" + i + ");\n");
+                        c_writer.write( "\t\t\t\t\t}\n");
+                        c_writer.write( "\t\t\t\t\telse\n");
+                        c_writer.write( "\t\t\t\t\t{\n");
+                        c_writer.write( "\t\t\t\t\t\t*OutValue" + i + " = (" + xsdType + ") new char[strlen( pReturn" + i + ") + 1];\n");
+                        c_writer.write( "\t\t\t\t\t\tstrcpy( (char *) *OutValue" + i + ", pReturn" + i + ");\n");
+                        c_writer.write( "\t\t\t\t\t}\n");
+                        c_writer.write( "\t\t\t\t}\n");
+                        c_writer.write( "\n");
+                        c_writer.write( "\t\t\t\tAxis::AxisDelete( (void *) pReturn" + i + ", " + CUtils.getXSDEnumeratorForType( baseTypeName) + ");\n");
                     }
                     else 
                     {
-                        writer.write( "\t\t\t\t" + currentParaType + " * pReturn" + i + " = m_pCall->" + CUtils.getDeserializerMethodName( baseTypeName, false) + "( \"" + currentType.getParamNameAsSOAPString() + "\", 0);\n");
-                        writer.write( "\n");
-                        writer.write( "\t\t\t\tif( pReturn" + i + " != NULL && OutValue" + i + " != NULL)\n");
-                        writer.write( "\t\t\t\t{\n");
+                        c_writer.write( "\t\t\t\t" + currentParaType + " * pReturn" + i + " = m_pCall->" + CUtils.getDeserializerMethodName( baseTypeName, false) + "( \"" + currentType.getParamNameAsSOAPString() + "\", 0);\n");
+                        c_writer.write( "\n");
+                        c_writer.write( "\t\t\t\tif( pReturn" + i + " != NULL && OutValue" + i + " != NULL)\n");
+                        c_writer.write( "\t\t\t\t{\n");
                         
                         if (currentType.isNillable() || currentType.isOptional())
                         {
-                            writer.write( "\t\t\t\t\tif( *OutValue" + i + " == NULL)\n");
-                            writer.write( "\t\t\t\t\t\t*OutValue" + i + " = new " + currentParaType + "();\n");
-                            writer.write( "\n");
-                            writer.write( "\t\t\t\t\t*");
+                            c_writer.write( "\t\t\t\t\tif( *OutValue" + i + " == NULL)\n");
+                            c_writer.write( "\t\t\t\t\t\t*OutValue" + i + " = new " + currentParaType + "();\n");
+                            c_writer.write( "\n");
+                            c_writer.write( "\t\t\t\t\t*");
                         }
                         else
-                            writer.write( "\t\t\t\t\t");
+                            c_writer.write( "\t\t\t\t\t");
 
-                        writer.write( "*OutValue" + i + " = *pReturn" + i + ";\n");
-                        writer.write( "\t\t\t\t}\n");
-                        writer.write( "\n");
-                        writer.write( "\t\t\t\tAxis::AxisDelete( (void *) pReturn" + i + ", " + CUtils.getXSDEnumeratorForType( baseTypeName) + ");\n");
+                        c_writer.write( "*OutValue" + i + " = *pReturn" + i + ";\n");
+                        c_writer.write( "\t\t\t\t}\n");
+                        c_writer.write( "\n");
+                        c_writer.write( "\t\t\t\tAxis::AxisDelete( (void *) pReturn" + i + ", " + CUtils.getXSDEnumeratorForType( baseTypeName) + ");\n");
                     }
                 }
                 else if (currentType.isAnyType ())
                 {
-                    writer.write ("\t\t\t\t"
+                    c_writer.write ("\t\t\t\t"
                           + currentParamName + " = *(" + currentParaType 
                           + "*)m_pCall->getAnyObject();\n");
                 }
@@ -772,7 +772,7 @@
                     if (lastIndexOfStar > 0)
                         currentParaType = currentParaType.substring(0, lastIndexOfStar);
 
-                    writer.write ("\n\t\t\t\t"
+                    c_writer.write ("\n\t\t\t\t"
                               + currentParamName + " = (" + currentParaType
                               + "*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_" + currentParaType 
                               + ", (void*) Axis_Create_" + currentParaType 
@@ -781,12 +781,12 @@
                 }
             } // end for-loop for paramsC
             
-            writer.write ("\t\t\t}\n");
+            c_writer.write ("\t\t\t}\n");
         }
         else if (returntype == null)
         {
             if (minfo.getOutputMessage () != null)
-                writer.write ("\t\t\t\t// no output?\n\t\t\t}\n");
+                c_writer.write ("\t\t\t\t// no output?\n\t\t\t}\n");
         }
         else if (returntypeisarray)
         {
@@ -799,16 +799,16 @@
             if (CUtils.isSimpleType (qname))
             {
                 containedType = CUtils.getSimpleType (qname);
-                writer.write ("\t\t\t\tAxis_Array * RetAxisArray = m_pCall->getBasicArray(" 
+                c_writer.write ("\t\t\t\tAxis_Array * RetAxisArray = m_pCall->getBasicArray(" 
                         + CUtils.getXSDEnumeratorForType (containedType) 
                         + ", \"" + returntype.getParamNameAsSOAPString () + "\", 0);\n");
-                writer.write ("\t\t\t\tRetArray->clone(*RetAxisArray);\n");
-                writer.write ("\t\t\t\tAxis::AxisDelete( (void *)RetAxisArray, XSD_ARRAY);\n");
+                c_writer.write ("\t\t\t\tRetArray->clone(*RetAxisArray);\n");
+                c_writer.write ("\t\t\t\tAxis::AxisDelete( (void *)RetAxisArray, XSD_ARRAY);\n");
             }
             else
             {
                 containedType = qname.getLocalPart ();
-                writer.write("\t\t\t\tRetArray = (" + containedType + "_Array *) m_pCall->getCmplxArray(RetArray, (void*) Axis_DeSerialize_"
+                c_writer.write("\t\t\t\tRetArray = (" + containedType + "_Array *) m_pCall->getCmplxArray(RetArray, (void*) Axis_DeSerialize_"
                         + containedType 
                         + ", (void*) Axis_Create_" + containedType
                           + ", (void*) Axis_Delete_" + containedType
@@ -816,7 +816,7 @@
                           + "\", Axis_URI_" + containedType + ");\n");
             }
             
-            writer.write ("\t\t\t}\n");
+            c_writer.write ("\t\t\t}\n");
 
             returnStatement = "\t\treturn RetArray;\n";
         }
@@ -824,32 +824,32 @@
         {
             if (returntype.isNillable () || returntype.isOptional() || CUtils.isPointerType(outparamType))
             {
-                writer.write( "\t\t\t\tRet = m_pCall->" 
+                c_writer.write( "\t\t\t\tRet = m_pCall->" 
                         + CUtils.getDeserializerMethodName( outparamType, false) 
                         + "(\"" + returntype.getParamNameAsSOAPString() + "\", 0);\n");
             }
             else
             {
-                writer.write ("\t\t\t\t" + outparamType + " * pReturn = m_pCall->" +
+                c_writer.write ("\t\t\t\t" + outparamType + " * pReturn = m_pCall->" +
                           CUtils.getDeserializerMethodName(outparamType, false) + "(\"" +
                           returntype.getElementNameAsSOAPString() + "\", 0);\n");
-                writer.write ("\t\t\t\tif(pReturn)\n");
-                writer.write ("\t\t\t\t{\n");
-                writer.write ("\t\t\t\t\tRet = *pReturn;\n");
-                writer.write ("\t\t\t\t\tAxis::AxisDelete( (void *) pReturn, " + CUtils.getXSDEnumeratorForType( outparamType) + ");\n");
-                writer.write ("\t\t\t\t}\n");
+                c_writer.write ("\t\t\t\tif(pReturn)\n");
+                c_writer.write ("\t\t\t\t{\n");
+                c_writer.write ("\t\t\t\t\tRet = *pReturn;\n");
+                c_writer.write ("\t\t\t\t\tAxis::AxisDelete( (void *) pReturn, " + CUtils.getXSDEnumeratorForType( outparamType) + ");\n");
+                c_writer.write ("\t\t\t\t}\n");
                 
                 // TODO If we unexpectedly receive a nill value, when nillable="false" we should do something appropriate, perhaps as below:
 //                              writer.write("\t\t\telse");
 //                              writer.write("\t\t\t\tthrow new Exception(\"Unexpected use of nill\");");
             }
-            writer.write ("\t\t\t}\n");
+            c_writer.write ("\t\t\t}\n");
 
             returnStatement = "\t\treturn Ret;\n";
         }
         else if (returntype.isAnyType ())
         {
-            writer.write ("\t\t\t\tpReturn = (" + outparamType + "*)m_pCall->getAnyObject();\n\t\t}\n");
+            c_writer.write ("\t\t\t\tpReturn = (" + outparamType + "*)m_pCall->getAnyObject();\n\t\t}\n");
 
             returnStatement =  "\t\treturn pReturn;\n";
         }
@@ -858,7 +858,7 @@
             if (outparamType.lastIndexOf ("*") > 0)
             {
                 String outparamTypeBase = outparamType.substring (0,outparamType.lastIndexOf("*"));
-                writer.write ("\t\t\t\tpReturn = (" + outparamType +
+                c_writer.write ("\t\t\t\tpReturn = (" + outparamType +
                           ")m_pCall->getCmplxObject((void*) Axis_DeSerialize_" + outparamTypeBase +
                           ", (void*) Axis_Create_" + outparamTypeBase +
                           ", (void*) Axis_Delete_" + outparamTypeBase + ",\"" +
@@ -866,7 +866,7 @@
             }
             else
             {
-                writer.write ("\t\t\t\tpReturn = (" + outparamType
+                c_writer.write ("\t\t\t\tpReturn = (" + outparamType
                           + "*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_" + outparamType +
                           ", (void*) Axis_Create_" + outparamType +
                           ", (void*) Axis_Delete_" + outparamType + ",\"" +
@@ -878,12 +878,12 @@
         }
     
         if (minfo.getOutputMessage () != null)
-            writer.write ("\n\t\t\tcheckForExtraneousElements();\n");
-        writer.write ("\t\t}\n\n");
-        writer.write ("\t\tm_pCall->unInitialize();\n");
-        writer.write(returnStatement);
+            c_writer.write ("\n\t\t\tcheckForExtraneousElements();\n");
+        c_writer.write ("\t\t}\n\n");
+        c_writer.write ("\t\tm_pCall->unInitialize();\n");
+        c_writer.write(returnStatement);
         
-        writer.write ("\t}\n");
+        c_writer.write ("\t}\n");
         
         //=============================================================================
         // End of try block, beginning of catch block
@@ -895,6 +895,6 @@
         // End of method
         //=============================================================================        
                         
-        writer.write ("}\n");
+        c_writer.write ("}\n");
     }
 }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ServiceHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ServiceHeaderWriter.java?rev=688130&r1=688129&r2=688130&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ServiceHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ServiceHeaderWriter.java Fri Aug 22 10:37:39 2008
@@ -52,24 +52,24 @@
     {
         try
         {
-            writer.write("/*\n");
-            writer.write(" * Copyright 2003-2006 The Apache Software Foundation.\n\n");
-            writer.write(" *\n");
-            writer.write(" * Licensed under the Apache License, Version 2.0 (the \"License\");\n");
-            writer.write(" * you may not use this file except in compliance with the License.\n");
-            writer.write(" * You may obtain a copy of the License at\n");
-            writer.write(" *\n");
-            writer.write(" *\t\thttp://www.apache.org/licenses/LICENSE-2.0\n");
-            writer.write(" *\n");
-            writer.write(" * Unless required by applicable law or agreed to in writing, software\n");
-            writer.write(" * distributed under the License is distributed on an \"AS IS\" BASIS,\n");
-            writer.write(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n");
-            writer.write(" * See the License for the specific language governing permissions and\n");
-            writer.write(" * limitations under the License.\n");
-            writer.write(" *\n");
-            writer.write(" * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)\n");
-            writer.write(" * This file contains declaration of the web service\n");
-            writer.write(" */\n\n");
+            c_writer.write("/*\n");
+            c_writer.write(" * Copyright 2003-2006 The Apache Software Foundation.\n\n");
+            c_writer.write(" *\n");
+            c_writer.write(" * Licensed under the Apache License, Version 2.0 (the \"License\");\n");
+            c_writer.write(" * you may not use this file except in compliance with the License.\n");
+            c_writer.write(" * You may obtain a copy of the License at\n");
+            c_writer.write(" *\n");
+            c_writer.write(" *\t\thttp://www.apache.org/licenses/LICENSE-2.0\n");
+            c_writer.write(" *\n");
+            c_writer.write(" * Unless required by applicable law or agreed to in writing, software\n");
+            c_writer.write(" * distributed under the License is distributed on an \"AS IS\" BASIS,\n");
+            c_writer.write(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n");
+            c_writer.write(" * See the License for the specific language governing permissions and\n");
+            c_writer.write(" * limitations under the License.\n");
+            c_writer.write(" *\n");
+            c_writer.write(" * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)\n");
+            c_writer.write(" * This file contains declaration of the web service\n");
+            c_writer.write(" */\n\n");
         }
         catch (IOException e)
         {
@@ -90,10 +90,10 @@
             HashSet typeSet = new HashSet();
             HashSet removeSet = new HashSet();
             
-            writer.write("#include <axis/AxisUserAPI.hpp>\n");
-            writer.write("#include <axis/AxisUserAPIArrays.hpp>\n");
-            writer.write("#include <axis/ISoapAttachment.hpp>\n");
-            writer.write("#include \"AxisServiceException.hpp\" \n\n");
+            c_writer.write("#include <axis/AxisUserAPI.hpp>\n");
+            c_writer.write("#include <axis/AxisUserAPIArrays.hpp>\n");
+            c_writer.write("#include <axis/ISoapAttachment.hpp>\n");
+            c_writer.write("#include \"AxisServiceException.hpp\" \n\n");
             while (types.hasNext())
             {
                 atype = (Type) types.next();
@@ -115,12 +115,12 @@
             Iterator itr = typeSet.iterator();
             while (itr.hasNext())
             {
-                writer.write(
+                c_writer.write(
                     "#include \"" + itr.next().toString() + CUtils.getHeaderFileExtension() + "\"\n");
             }
 
             //writeFaultHeaders();            
-            writer.write("\n");
+            c_writer.write("\n");
         }
         catch (IOException e)
         {

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java?rev=688130&r1=688129&r2=688130&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java Fri Aug 22 10:37:39 2008
@@ -106,32 +106,32 @@
             }
         }
         
-        CUtils.printMethodComment(writer, "This method wraps the service method " + methodName + ".");
+        CUtils.printMethodComment(c_writer, "This method wraps the service method " + methodName + ".");
 
         //method signature
-        writer.write("int " + classname + "::" + methodName + "(void* pMsg)\n{\n");
-        writer.write("\tIMessageData* mc = (IMessageData*)pMsg;\n");
-        writer.write("\tint nStatus;\n\n");
+        c_writer.write("int " + c_classname + "::" + methodName + "(void* pMsg)\n{\n");
+        c_writer.write("\tIMessageData* mc = (IMessageData*)pMsg;\n");
+        c_writer.write("\tint nStatus;\n\n");
         
-        writer.write("\tIWrapperSoapSerializer* pIWSSZ = NULL;\n");
-        writer.write("\tmc->getSoapSerializer(&pIWSSZ);\n");
-        writer.write("\tif (!pIWSSZ)\n");
-        writer.write("\t\treturn AXIS_FAIL;\n\n");
+        c_writer.write("\tIWrapperSoapSerializer* pIWSSZ = NULL;\n");
+        c_writer.write("\tmc->getSoapSerializer(&pIWSSZ);\n");
+        c_writer.write("\tif (!pIWSSZ)\n");
+        c_writer.write("\t\treturn AXIS_FAIL;\n\n");
         
-        writer.write("\tIWrapperSoapDeSerializer* pIWSDZ = NULL;\n");
-        writer.write("\tmc->getSoapDeSerializer(&pIWSDZ);\n");
-        writer.write("\tif (!pIWSDZ)\n");
-        writer.write("\t\treturn AXIS_FAIL;\n\n");
+        c_writer.write("\tIWrapperSoapDeSerializer* pIWSDZ = NULL;\n");
+        c_writer.write("\tmc->getSoapDeSerializer(&pIWSDZ);\n");
+        c_writer.write("\tif (!pIWSDZ)\n");
+        c_writer.write("\t\treturn AXIS_FAIL;\n\n");
 
-        writer.write("\t// check whether we have got correct message\n");
-        writer.write("\tif (AXIS_SUCCESS != pIWSDZ->checkMessageBody(\""
+        c_writer.write("\t// check whether we have got correct message\n");
+        c_writer.write("\tif (AXIS_SUCCESS != pIWSDZ->checkMessageBody(\""
                 + minfo.getInputMessage().getLocalPart() + "\", \""
                 + minfo.getInputMessage().getNamespaceURI() + "\"))\n");
-        writer.write("\t\treturn AXIS_FAIL;\n\n");
+        c_writer.write("\t\treturn AXIS_FAIL;\n\n");
 
         if (minfo.getOutputMessage() != null)
         {
-            writer.write("\tpIWSSZ->createSoapMethod(\""
+            c_writer.write("\tpIWSSZ->createSoapMethod(\""
                     + minfo.getOutputMessage().getLocalPart() + "\", \""
                     + minfo.getOutputMessage().getNamespaceURI() + "\");\n");
         }
@@ -167,7 +167,7 @@
                         splatDeref = " * ";
                 }
                 
-                writer.write("\t" + paraTypeName + splatPtr + "v" + i + " =" + splatDeref
+                c_writer.write("\t" + paraTypeName + splatPtr + "v" + i + " =" + splatDeref
                         + "(pIWSDZ->" + CUtils.getDeserializerMethodName(paraTypeName,false)
                         + "(\"" + elementName + "\",0));\n");
             }
@@ -178,74 +178,74 @@
                 {
                     String containedType = CUtils.getSimpleType(type.getName());
                     
-                    writer.write("\n\t" + containedType + "_Array * v" + i +" = new " + containedType + "_Array();\n");
-                    writer.write("\t"
+                    c_writer.write("\n\t" + containedType + "_Array * v" + i +" = new " + containedType + "_Array();\n");
+                    c_writer.write("\t"
                             + "Axis_Array * RetArray" + i + " = pIWSDZ->getBasicArray("
                             + CUtils.getXSDEnumeratorForType(containedType)
                             + ", \"" + elementName + "\",0);\n");
-                    writer.write ("\tv" + i + "->clone(*RetArray"+ i + ");\n");
-                    writer.write ("\tAxis::AxisDelete( (void *)RetArray" + i + ", XSD_ARRAY);\n\n");
+                    c_writer.write ("\tv" + i + "->clone(*RetArray"+ i + ");\n");
+                    c_writer.write ("\tAxis::AxisDelete( (void *)RetArray" + i + ", XSD_ARRAY);\n\n");
                 }
                 else if (CUtils.isPointerType(paraTypeName))
                 {
-                    writer.write("\n\t" + paraTypeName + " v" + i + " = NULL;\n");
+                    c_writer.write("\n\t" + paraTypeName + " v" + i + " = NULL;\n");
                     if (param.isOptional())
                     {
-                        writer.write("\tconst char * elementName" + i + " = pIWSDZ->peekNextElementName();\n");
-                        writer.write("\tif ( strcmp( elementName" + i + ", \"" + elementName + "\" ) == 0)\n");
-                        writer.write("\t{\n");
+                        c_writer.write("\tconst char * elementName" + i + " = pIWSDZ->peekNextElementName();\n");
+                        c_writer.write("\tif ( strcmp( elementName" + i + ", \"" + elementName + "\" ) == 0)\n");
+                        c_writer.write("\t{\n");
                     }
-                    writer.write("\t" + paraTypeName + " value" + i + " = pIWSDZ->"
+                    c_writer.write("\t" + paraTypeName + " value" + i + " = pIWSDZ->"
                         + CUtils.getDeserializerMethodName(paraTypeName,false)
                         + "(\"" + elementName + "\",0);\n");
-                    writer.write("\tif ( value" + i + " )\n");
-                    writer.write("\t{\n");
-                    writer.write("\t\tv" + i + " = new char[ strlen( value" + i + ") + 1 ];\n");
-                    writer.write("\t\tstrcpy( v" + i + ", value" + i + ");\n");
-                    writer.write("\t\tAxis::AxisDelete( (void *) value" + i + ", " + CUtils.getXSDEnumeratorForType(paraTypeName) + " );\n");
-                    writer.write("\t}\n");
+                    c_writer.write("\tif ( value" + i + " )\n");
+                    c_writer.write("\t{\n");
+                    c_writer.write("\t\tv" + i + " = new char[ strlen( value" + i + ") + 1 ];\n");
+                    c_writer.write("\t\tstrcpy( v" + i + ", value" + i + ");\n");
+                    c_writer.write("\t\tAxis::AxisDelete( (void *) value" + i + ", " + CUtils.getXSDEnumeratorForType(paraTypeName) + " );\n");
+                    c_writer.write("\t}\n");
                     if (param.isOptional())
-                        writer.write("\t}\n");
+                        c_writer.write("\t}\n");
                 }
                 else if (param.isNillable()  || param.isOptional())
                 {
-                    writer.write("\n\t" + paraTypeName + " * v" + i + " = NULL;\n");
+                    c_writer.write("\n\t" + paraTypeName + " * v" + i + " = NULL;\n");
                     if (param.isOptional())
                     {
-                        writer.write("\tconst char * elementName" + i + " = pIWSDZ->peekNextElementName();\n");
-                        writer.write("\tif (strcmp( elementName" + i + ", \"" + elementName + "\" ) == 0)\n");
-                        writer.write("\t{\n");
+                        c_writer.write("\tconst char * elementName" + i + " = pIWSDZ->peekNextElementName();\n");
+                        c_writer.write("\tif (strcmp( elementName" + i + ", \"" + elementName + "\" ) == 0)\n");
+                        c_writer.write("\t{\n");
                     }
-                    writer.write("\t" + paraTypeName + " * pValue" + i + " = pIWSDZ->"
+                    c_writer.write("\t" + paraTypeName + " * pValue" + i + " = pIWSDZ->"
                             + CUtils.getDeserializerMethodName(paraTypeName,false)
                             + "(\"" + elementName + "\",0);\n");
-                    writer.write("\tif (pValue" + i +")\n");
-                    writer.write("\t{\n");
-                    writer.write("\t\tv" + i + " = new " + paraTypeName + "();\n");
-                    writer.write("\t\t*v" + i + " = *pValue" + i + ";\n");
-                    writer.write("\t\tAxis::AxisDelete( (void *) pValue" + i + ", " + CUtils.getXSDEnumeratorForType(paraTypeName) + ");\n");
-                    writer.write("\t}\n");
+                    c_writer.write("\tif (pValue" + i +")\n");
+                    c_writer.write("\t{\n");
+                    c_writer.write("\t\tv" + i + " = new " + paraTypeName + "();\n");
+                    c_writer.write("\t\t*v" + i + " = *pValue" + i + ";\n");
+                    c_writer.write("\t\tAxis::AxisDelete( (void *) pValue" + i + ", " + CUtils.getXSDEnumeratorForType(paraTypeName) + ");\n");
+                    c_writer.write("\t}\n");
                     if (param.isOptional())
-                        writer.write("\t}\n");
+                        c_writer.write("\t}\n");
                 }
                 else
                 {
-                    writer.write("\n\t" + paraTypeName + " v" + i);
+                    c_writer.write("\n\t" + paraTypeName + " v" + i);
                     String typeInitValue = CUtils.getInitValueForType(paraTypeName);
                     if (typeInitValue != null)
-                        writer.write(" = " + typeInitValue);
+                        c_writer.write(" = " + typeInitValue);
 
-                    writer.write(";\n");
-                    writer.write("\t"
+                    c_writer.write(";\n");
+                    c_writer.write("\t"
                             + paraTypeName + " * pValue" + i + " = pIWSDZ->"
                             + CUtils.getDeserializerMethodName(paraTypeName,false) + "(\""
                             + elementName + "\", 0);\n");
-                    writer.write("\tif (pValue" + i + ")\n");
-                    writer.write("\t{\n");
-                    writer.write("\t\tv" + i + " = *pValue" + i + ";\n");
-                    writer.write("\t\tAxis::AxisDelete( (void *) pValue"
+                    c_writer.write("\tif (pValue" + i + ")\n");
+                    c_writer.write("\t{\n");
+                    c_writer.write("\t\tv" + i + " = *pValue" + i + ";\n");
+                    c_writer.write("\t\tAxis::AxisDelete( (void *) pValue"
                             + i + ", " + CUtils.getXSDEnumeratorForType(paraTypeName)+ ");\n");
-                    writer.write("\t}\n");
+                    c_writer.write("\t}\n");
                 }
             }
             else if ((type != null) && type.isArray())
@@ -256,30 +256,30 @@
                 if (CUtils.isSimpleType(qname))
                 {
                     containedType = CUtils.getSimpleType(qname);
-                    writer.write("\n\t" + outparamType + "_Array * v" + i +" = new " + outparamType + "_Array();\n");
-                    writer.write("\t"
+                    c_writer.write("\n\t" + outparamType + "_Array * v" + i +" = new " + outparamType + "_Array();\n");
+                    c_writer.write("\t"
                         + "Axis_Array * RetArray" + i + " = pIWSDZ->getBasicArray("
                         + CUtils.getXSDEnumeratorForType(containedType)
                         + ", \"" + elementName + "\",0);\n");
-                    writer.write ("\tv" + i + "->clone(*RetArray"+ i + ");\n");
-                    writer.write ("\tAxis::AxisDelete( (void *)RetArray" + i + ", XSD_ARRAY);\n\n");
+                    c_writer.write ("\tv" + i + "->clone(*RetArray"+ i + ");\n");
+                    c_writer.write ("\tAxis::AxisDelete( (void *)RetArray" + i + ", XSD_ARRAY);\n\n");
                 }
                 else if (arrayType.isSimpleType())
                 {
                     containedType = CUtils.getSimpleType(arrayType.getBaseType());
-                    writer.write("\n\t" + outparamType + " * v" + i +" = new " + outparamType + "();\n");
-                    writer.write("\t"
+                    c_writer.write("\n\t" + outparamType + " * v" + i +" = new " + outparamType + "();\n");
+                    c_writer.write("\t"
                         + "Axis_Array * RetArray" + i + " = pIWSDZ->getBasicArray("
                         + CUtils.getXSDEnumeratorForType(containedType)
                         + ", \"" + elementName + "\",0);\n");
-                    writer.write ("\tv" + i + "->clone(*RetArray"+ i + ");\n");
-                    writer.write ("\tAxis::AxisDelete( (void *)RetArray" + i + ", XSD_ARRAY);\n\n");
+                    c_writer.write ("\tv" + i + "->clone(*RetArray"+ i + ");\n");
+                    c_writer.write ("\tAxis::AxisDelete( (void *)RetArray" + i + ", XSD_ARRAY);\n\n");
                 }
                 else
                 {
                     containedType = qname.getLocalPart();
-                    writer.write("\n\t" + paraTypeName + " * v" + i +" = new " + paraTypeName + "();\n");
-                    writer.write("\t"
+                    c_writer.write("\n\t" + paraTypeName + " * v" + i +" = new " + paraTypeName + "();\n");
+                    c_writer.write("\t"
                         + "pIWSDZ->getCmplxArray(v" + i + ", (void*)Axis_DeSerialize_" + containedType
                         + ",\n\t\t(void*)Axis_Create_" + containedType
                         + ", (void*)Axis_Delete_" + containedType
@@ -288,13 +288,13 @@
             }
             else if (param.isAnyType())
             {
-                writer.write("\t" + paraTypeName + " *v" + i + " = (" + paraTypeName
+                c_writer.write("\t" + paraTypeName + " *v" + i + " = (" + paraTypeName
                         + "*)pIWSDZ->getAnyObject();\n");
             }
             else
             {
                 //for complex types 
-                writer.write("\t" + paraTypeName + " *v" + i + " = (" + paraTypeName
+                c_writer.write("\t" + paraTypeName + " *v" + i + " = (" + paraTypeName
                         + "*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_" + paraTypeName
                         + "\n\t\t, (void*)Axis_Create_" + paraTypeName
                         + ", (void*)Axis_Delete_" + paraTypeName
@@ -303,8 +303,8 @@
             }
         } // for loop
         
-        writer.write("\n\tif (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus()))\n");
-        writer.write("\t\treturn nStatus;\n\n");
+        c_writer.write("\n\tif (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus()))\n");
+        c_writer.write("\t\treturn nStatus;\n\n");
         
         // Multiples parameters so fill the methods prototype
         if (isAllTreatedAsOutParams)
@@ -315,51 +315,51 @@
                 ParameterInfo param = (ParameterInfo) paramsC.get(i);
                 String typeName = CUtils.getClassNameFromParamInfoConsideringArrays(
                                     (ParameterInfo) paramsC.get(i), wscontext);
-                writer.write("\t" + typeName);
+                c_writer.write("\t" + typeName);
                 
                 if ( (param.isOptional() || param.isNillable()) 
                         && CUtils.isSimpleType(typeName) 
                         && !CUtils.isPointerType(typeName) && !param.isArray())
-                    writer.write(" *");
-                writer.write(" out" + i + ";\n");
+                    c_writer.write(" *");
+                c_writer.write(" out" + i + ";\n");
             }
         }
         
-        writer.write("\ttry\n\t{\n"); //nithya
+        c_writer.write("\ttry\n\t{\n"); //nithya
         if (returntype != null)
         { 
             /* Invoke the service when return type not void */
             returnParamName = returntype.getElementNameAsSOAPString();
-            writer.write("\t\t" + outparamType);
+            c_writer.write("\t\t" + outparamType);
             if ((outparamType.lastIndexOf ("_Array") > 0)
                     ||(!returntypeisarray 
                             && (!returntypeissimple
                                     || (returntypeissimple 
                                             && (returntype.isNillable() || returntype.isOptional())
                                             && !(CUtils.isPointerType(retType.getLanguageSpecificName()))))))
-                writer.write(" *");
+                c_writer.write(" *");
             
-            writer.write(" ret = " + "pWs->" + methodName + "(");
+            c_writer.write(" ret = " + "pWs->" + methodName + "(");
             if (0 < paramsB.size())
             {
                 for (int i = 0; i < paramsB.size() - 1; i++)
-                    writer.write("v" + i + ",");
+                    c_writer.write("v" + i + ",");
 
-                writer.write("v" + (paramsB.size() - 1));
+                c_writer.write("v" + (paramsB.size() - 1));
             }
 
-            writer.write(");\n");
+            c_writer.write(");\n");
             /* set the result */
             if (returntypeissimple)
             {
                 if (returntype.isArray())
                 {
                     String containedType = CUtils.getSimpleType(retType.getName());
-                    writer.write("\t\tnStatus = pIWSSZ->addOutputBasicArrayParam(ret, "
+                    c_writer.write("\t\tnStatus = pIWSSZ->addOutputBasicArrayParam(ret, "
                             + CUtils.getXSDEnumeratorForType(containedType) + ", \""
                             + returnParamName + "\");\n");
-                    writer.write("\t\tdelete ret;\n");
-                    writer.write("\t\treturn nStatus;\n");
+                    c_writer.write("\t\tdelete ret;\n");
+                    c_writer.write("\t\treturn nStatus;\n");
                 }
                 else
                 {
@@ -368,12 +368,12 @@
                             || returntype.isOptional()
                             || CUtils.isPointerType(returnParamTypeName))
                     {
-                        writer.write("\t\treturn pIWSSZ->addOutputParam(\"" + returnParamName
+                        c_writer.write("\t\treturn pIWSSZ->addOutputParam(\"" + returnParamName
                             + "\", (void*)ret, " + CUtils.getXSDEnumeratorForType(outparamType) + ");\n");
                     }
                     else
                     {
-                        writer.write("\t\treturn pIWSSZ->addOutputParam(\"" + returnParamName
+                        c_writer.write("\t\treturn pIWSSZ->addOutputParam(\"" + returnParamName
                             + "\", (void*)&ret, " + CUtils.getXSDEnumeratorForType(outparamType) + ");\n");
                     }
                 }
@@ -386,39 +386,39 @@
                 if (CUtils.isSimpleType(qname))
                 {
                     containedType = CUtils.getSimpleType(qname);
-                    writer.write("\t\tnStatus = pIWSSZ->addOutputBasicArrayParam(ret, "
+                    c_writer.write("\t\tnStatus = pIWSSZ->addOutputBasicArrayParam(ret, "
                                 + CUtils.getXSDEnumeratorForType(containedType)
                                 + ", \"" + returnParamName + "\");\n");
-                    writer.write("\t\tdelete ret;\n");
-                    writer.write("\t\treturn nStatus;\n");
+                    c_writer.write("\t\tdelete ret;\n");
+                    c_writer.write("\t\treturn nStatus;\n");
                 }
                 else if (arrayType.isSimpleType())
                 {
                     containedType = CUtils.getSimpleType(arrayType.getBaseType());
-                    writer.write("\t\tnStatus = pIWSSZ->addOutputBasicArrayParam(ret, "
+                    c_writer.write("\t\tnStatus = pIWSSZ->addOutputBasicArrayParam(ret, "
                             + CUtils.getXSDEnumeratorForType(containedType)
                             + ", \"" + returnParamName + "\");\n");
-                    writer.write("\t\tdelete ret;\n");
-                    writer.write("\t\treturn nStatus;\n");
+                    c_writer.write("\t\tdelete ret;\n");
+                    c_writer.write("\t\treturn nStatus;\n");
                 }
                 else
                 {
                     containedType = qname.getLocalPart();
-                    writer.write("\t\tnStatus = pIWSSZ->addOutputCmplxArrayParam(ret,"
+                    c_writer.write("\t\tnStatus = pIWSSZ->addOutputCmplxArrayParam(ret,"
                             + "(void*) Axis_Serialize_" + containedType
                             + ", (void*) Axis_Delete_" + containedType
                             + ", \"" + returnParamName
                             + "\", Axis_URI_" + containedType + ");\n");
-                    writer.write("\t\tdelete ret;\n");
-                    writer.write("\t\treturn nStatus;\n");
+                    c_writer.write("\t\tdelete ret;\n");
+                    c_writer.write("\t\treturn nStatus;\n");
                 }
             }
             else if (returntype.isAnyType())
-                writer.write( "\t\treturn pIWSSZ->addOutputAnyObject(ret);\n");
+                c_writer.write( "\t\treturn pIWSSZ->addOutputAnyObject(ret);\n");
             else
             {
                 //complex type
-                writer.write("\t\treturn pIWSSZ->addOutputCmplxParam(ret, (void*)Axis_Serialize_"
+                c_writer.write("\t\treturn pIWSSZ->addOutputCmplxParam(ret, (void*)Axis_Serialize_"
                         + outparamType
                         + ", (void*)Axis_Delete_" + outparamType
                         + ", \"" + returnParamName + "\", Axis_URI_" + outparamType + ");\n");
@@ -426,17 +426,17 @@
         }
         else if (isAllTreatedAsOutParams)
         {
-            writer.write("\tpWs->" + methodName + "(");
+            c_writer.write("\tpWs->" + methodName + "(");
             if (0 < paramsB.size())
                 for (int i = 0; i < paramsB.size(); i++)
-                    writer.write("v" + i + ",");
+                    c_writer.write("v" + i + ",");
             
             ArrayList paramsC = (ArrayList) minfo.getOutputParameterTypes();
             for (int i = 0; i < paramsC.size() - 1; i++)
-                writer.write("&out" + i + ",");
+                c_writer.write("&out" + i + ",");
 
-            writer.write("&out" + (paramsC.size() - 1));
-            writer.write(");\n");
+            c_writer.write("&out" + (paramsC.size() - 1));
+            c_writer.write(");\n");
             paramsC = (ArrayList) minfo.getOutputParameterTypes();
             for (int i = 0; i < paramsC.size(); i++)
             {
@@ -471,7 +471,7 @@
                     if (param.isArray())
                     {
                         String containedType = CUtils.getSimpleType(retType.getName());
-                        writer.write("\treturn pIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out" + i + "),"
+                        c_writer.write("\treturn pIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out" + i + "),"
                                 + CUtils.getXSDEnumeratorForType(containedType)
                                 + ", \"" + returnParamName + "\");\n");
                     }
@@ -481,22 +481,22 @@
                     {
                         if (param.isOptional())
                         {
-                            writer.write("\tif (out" + i + ")\n");
-                            writer.write("\t{\n");
-                            writer.write("\t");
+                            c_writer.write("\tif (out" + i + ")\n");
+                            c_writer.write("\t{\n");
+                            c_writer.write("\t");
                         }
                         
-                        writer.write("\tpIWSSZ->addOutputParam(\""
+                        c_writer.write("\tpIWSSZ->addOutputParam(\""
                                     + returnParamName
                                     + "\", (void*)out" + i + ", "
                                     + CUtils.getXSDEnumeratorForType(outparamType) + ");\n");
                         
                         if (param.isOptional())
-                            writer.write("\t}\n");
+                            c_writer.write("\t}\n");
                     }
                     else
                     {
-                        writer.write("\tpIWSSZ->addOutputParam(\""
+                        c_writer.write("\tpIWSSZ->addOutputParam(\""
                                     + returnParamName
                                     + "\", (void*)&out" + i + ", "
                                     + CUtils.getXSDEnumeratorForType(outparamType) + ");\n");
@@ -511,65 +511,65 @@
                     if (CUtils.isSimpleType(qname))
                     {
                         containedType = CUtils.getSimpleType(qname);
-                        writer.write("\tpIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out"
+                        c_writer.write("\tpIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out"
                                 + i + ")," + CUtils.getXSDEnumeratorForType( containedType)
                                 + ", \"" + returnParamName + "\");\n");
                     }
                     else if (arrayType.isSimpleType())
                     {
                         containedType = CUtils.getSimpleType(arrayType.getBaseType());
-                        writer.write("\tpIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out"
+                        c_writer.write("\tpIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out"
                                 + i + ")," + CUtils.getXSDEnumeratorForType(containedType)
                                 + ", \"" + returnParamName + "\");\n");
                     }
                     else
                     {
                         containedType = qname.getLocalPart();
-                        writer.write("\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out" + i  + "),"
+                        c_writer.write("\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out" + i  + "),"
                                 + "(void*) Axis_Serialize_" + containedType
                                 + ", (void*) Axis_Delete_" + containedType
                                 + ", \"" + returnParamName + "\", Axis_URI_" + containedType + ");\n");
                     }
                 }
                 else if (param.isAnyType())
-                    writer.write("\tpIWSSZ->addOutputAnyObject(out" + i + ");\n");
+                    c_writer.write("\tpIWSSZ->addOutputAnyObject(out" + i + ");\n");
                 else
                 {
                     if (param.isOptional())
                     {
-                        writer.write("\tif (out" + i + ")\n");
-                        writer.write("\t{\n");
-                        writer.write("\t");
+                        c_writer.write("\tif (out" + i + ")\n");
+                        c_writer.write("\t{\n");
+                        c_writer.write("\t");
                     }
                     //complex type
-                    writer.write("\tpIWSSZ->addOutputCmplxParam(out" + i
+                    c_writer.write("\tpIWSSZ->addOutputCmplxParam(out" + i
                             + ", (void*)Axis_Serialize_" + outparamType
                             + ", (void*)Axis_Delete_" + outparamType
                             + ", \""  + returnParamName
                             + "\", Axis_URI_" + outparamType + ");\n");
                     
                     if (param.isOptional())
-                        writer.write("\t}\n");
+                        c_writer.write("\t}\n");
                 }
             }
-            writer.write("\treturn AXIS_SUCCESS;\n");
+            c_writer.write("\treturn AXIS_SUCCESS;\n");
         }
         else
         { 
             //method does not return anything Invoke the service when return type is void
-            writer.write("\tpWs->" + methodName + "(");
+            c_writer.write("\tpWs->" + methodName + "(");
             if (0 < paramsB.size())
             {
                 for (int i = 0; i < paramsB.size() - 1; i++)
-                    writer.write("v" + i + ",");
+                    c_writer.write("v" + i + ",");
 
-                writer.write("v" + (paramsB.size() - 1));
+                c_writer.write("v" + (paramsB.size() - 1));
             }
-            writer.write(");\n");
-            writer.write("\treturn AXIS_SUCCESS;\n");
+            c_writer.write(");\n");
+            c_writer.write("\treturn AXIS_SUCCESS;\n");
         }
         
-        writer.write("\t}\n"); //nithya          
+        c_writer.write("\t}\n"); //nithya          
         Iterator paramsFault = minfo.getFaultType().iterator();
         String faultInfoName = null;
         String faultType = null;
@@ -591,33 +591,33 @@
         }
         
         // Handle SOAP faults not specified within the WSDL (ie OtherFaultException)
-        writer.write("\tcatch(OtherFaultException * pObjFault)\n");
-        writer.write("\t{\n");
-        writer.write("\t\tif (pObjFault)\n");
-        writer.write("\t\t{\n");
-        writer.write("\t\t\tpIWSSZ->createSoapFault(\"\", \"\", pObjFault->getFaultCode(), pObjFault->getFaultString());\n");
-        writer.write("\t\t\tpIWSSZ->addFaultDetail(pObjFault->getFaultDetail());\n");
-        writer.write("\t\t\tdelete pObjFault;\n");
-        writer.write("\t\t\tthrow AxisServiceException(AXISC_SERVICE_THROWN_EXCEPTION);\n");
-        writer.write("\t\t}\n");
-        writer.write("\t\treturn AXIS_FAIL;\n");
-        writer.write("\t}\n");
+        c_writer.write("\tcatch(OtherFaultException * pObjFault)\n");
+        c_writer.write("\t{\n");
+        c_writer.write("\t\tif (pObjFault)\n");
+        c_writer.write("\t\t{\n");
+        c_writer.write("\t\t\tpIWSSZ->createSoapFault(\"\", \"\", pObjFault->getFaultCode(), pObjFault->getFaultString());\n");
+        c_writer.write("\t\t\tpIWSSZ->addFaultDetail(pObjFault->getFaultDetail());\n");
+        c_writer.write("\t\t\tdelete pObjFault;\n");
+        c_writer.write("\t\t\tthrow AxisServiceException(AXISC_SERVICE_THROWN_EXCEPTION);\n");
+        c_writer.write("\t\t}\n");
+        c_writer.write("\t\treturn AXIS_FAIL;\n");
+        c_writer.write("\t}\n");
         
         // Handle generic exception, placing the message into a generic SOAP fault
-        writer.write("\tcatch (exception & e)\n");
-        writer.write("\t{\n");
-        writer.write("\t\tpIWSSZ->createSoapFault(\"\", \"\", \"Server\", e.what());\n");
-        writer.write("\t\tthrow AxisServiceException(AXISC_SERVICE_THROWN_EXCEPTION);\n");
-        writer.write("\t\treturn AXIS_FAIL;\n");
-        writer.write("\t}\n");
+        c_writer.write("\tcatch (exception & e)\n");
+        c_writer.write("\t{\n");
+        c_writer.write("\t\tpIWSSZ->createSoapFault(\"\", \"\", \"Server\", e.what());\n");
+        c_writer.write("\t\tthrow AxisServiceException(AXISC_SERVICE_THROWN_EXCEPTION);\n");
+        c_writer.write("\t\treturn AXIS_FAIL;\n");
+        c_writer.write("\t}\n");
         
         // Handle any other exception
-        writer.write("\tcatch(...)\n");
-        writer.write("\t{\n");
-        writer.write("\t\treturn AXIS_FAIL;\n");
-        writer.write("\t}\n");
+        c_writer.write("\tcatch(...)\n");
+        c_writer.write("\t{\n");
+        c_writer.write("\t\treturn AXIS_FAIL;\n");
+        c_writer.write("\t}\n");
 
-        writer.write("}\n");
+        c_writer.write("}\n");
     }
     /* (non-Javadoc)
      * @see org.apache.axis.wsdl.wsdl2ws.cpp.CPPClassWriter#writeGlobalCodes()
@@ -632,21 +632,21 @@
     {
         try
         {
-            writer.write("\tcatch(" + faulttype + " pObjFault)\n");
-            writer.write("\t{\n");
-            writer.write("\t\tif (pObjFault)\n");
-            writer.write("\t\t{\n");
-            writer.write("\t\t\tpIWSSZ->createSoapFault(\"" + faultInfoName
+            c_writer.write("\tcatch(" + faulttype + " pObjFault)\n");
+            c_writer.write("\t{\n");
+            c_writer.write("\t\tif (pObjFault)\n");
+            c_writer.write("\t\t{\n");
+            c_writer.write("\t\t\tpIWSSZ->createSoapFault(\"" + faultInfoName
                     + "\", \"" + wscontext.getWrapperInfo().getTargetNameSpaceOfWSDL()
                     + "\",\"AxisC++ Faultcode\", \"Custom Out of bound exception\");\n");
 
-            writer.write("\t\t\tpIWSSZ->addFaultDetail(pObjFault, (void*) Axis_Serialize_" + langName + ",\n");
-            writer.write("\t\t\t\t(void*) Axis_Delete_" + langName
+            c_writer.write("\t\t\tpIWSSZ->addFaultDetail(pObjFault, (void*) Axis_Serialize_" + langName + ",\n");
+            c_writer.write("\t\t\t\t(void*) Axis_Delete_" + langName
                     + ",\"" + faultInfoName + "\", Axis_URI_" + langName + ");\n");
-            writer.write("\t\t\tthrow AxisServiceException(AXISC_SERVICE_THROWN_EXCEPTION);\n");
-            writer.write("\t\t}\n");
-            writer.write("\t\treturn AXIS_FAIL;\n");
-            writer.write("\t}\n");
+            c_writer.write("\t\t\tthrow AxisServiceException(AXISC_SERVICE_THROWN_EXCEPTION);\n");
+            c_writer.write("\t\t}\n");
+            c_writer.write("\t\treturn AXIS_FAIL;\n");
+            c_writer.write("\t}\n");
         }
         catch (IOException e)
         {



Mime
View raw message