axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r386235 [3/3] - /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/
Date Thu, 16 Mar 2006 01:24:13 GMT
Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java?rev=386235&r1=386234&r2=386235&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
Wed Mar 15 17:24:11 2006
@@ -121,28 +121,28 @@
         try
         {
             boolean foundDeepCopyType = false;
-        	for (int i = 0 ; i < attribs.length ; i++)
-        	{
-        	    Type type = attribs[i].getType();
-				boolean isPointerType = false;
-				if (type.isSimpleType())
-				{
-				    isPointerType = CUtils.isPointerType(CUtils.getclass4qname(type.getBaseType()));

-				}
-				else
-				{
-				    isPointerType = CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]));
-				}
-        	    if ((attribs[i].isSimpleType() || attribs[i].getType().isSimpleType()) &&
!attribs[i].isArray() &&(isElementNillable(i) || isElementOptional(i) || isPointerType
|| attribs[i].getChoiceElement() || attribs[i].getAllElement()))
-        	    {
-        	        if (!foundDeepCopyType)
-        	        {
-        	            writer.write("\nprivate:\n");
-        	            foundDeepCopyType = true;
-        	        }
-        	        writer.write("\tbool __axis_deepcopy_" + attribs[i].getParamNameWithoutSymbols()
+ ";\n");
-        	    }
-        	}
+            for (int i = 0 ; i < attribs.length ; i++)
+            {
+                Type type = attribs[i].getType();
+                boolean isPointerType = false;
+                if (type.isSimpleType())
+                {
+                    isPointerType = CUtils.isPointerType(CUtils.getclass4qname(type.getBaseType()));

+                }
+                else
+                {
+                    isPointerType = CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]));
+                }
+                if ((attribs[i].isSimpleType() || attribs[i].getType().isSimpleType()) &&
!attribs[i].isArray() &&(isElementNillable(i) || isElementOptional(i) || isPointerType
|| attribs[i].getChoiceElement() || attribs[i].getAllElement()))
+                {
+                    if (!foundDeepCopyType)
+                    {
+                        writer.write("\nprivate:\n");
+                        foundDeepCopyType = true;
+                    }
+                    writer.write("\tbool __axis_deepcopy_" + attribs[i].getParamNameWithoutSymbols()
+ ";\n");
+                }
+            }
         }
         catch (IOException e)
         {
@@ -297,8 +297,8 @@
     protected void writeAttributes() throws WrapperFault
     {
         int anyCounter = 0;
-    	
-    	if (type.isArray())
+        
+        if (type.isArray())
         {
             return;
         }
@@ -309,94 +309,94 @@
             {
                 attribs[i].setParamName( CUtils.sanitiseAttributeName( classname, attribs[i].getParamName()));
                 
-				// FJP Nillable vv
-				if (isElementNillable(i) || attribs[i].isArray() || isElementOptional(i) && !attribs[i].getAllElement())
-				{
-										
-					if(attribs[i].isAnyType()){
-						anyCounter += 1;
-						    writer
-						.write("\t"
-								+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-								+ " * " + attribs[i].getParamName()
-								+ Integer.toString(anyCounter)
-								+ ";\n");
-					}
-					else
-					{
-					    if( attribs[i].isArray())
-					    {
-					        String paramName = getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]);
-					        if (!paramName.endsWith("*"))
-					        {
-					            paramName += " *";
-					        }
-					        
-					        if (!attribs[i].isSimpleType() && attribs[i].getType().isSimpleType())
-					        {
-					            writer.write("\t");
-					        }
-					        else
-					        {
-					            writer.write("\tclass ");
-					        }
-							writer.write(paramName
-									 + " " + attribs[i].getParamName()
-									 + ";\n");
-					        
-					    }
-					    else
-					    {
-					    	if(attribs[i].getChoiceElement()&& !isElementNillable(i))
-					    		writer.write("\t"
-									 + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-									 + " " + attribs[i].getParamName()
-									 + ";\n");
-					    	else
-					    		writer.write("\t"
-										 + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-										 + " * " + attribs[i].getParamName()
-										 + ";\n");
-					        
-					    }
-					}
-				} else 
-					{
-						if(attribs[i].getAllElement() || attribs[i].getChoiceElement() )
-						{
-							writer.write("\t"
-									 + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-									 + " " + attribs[i].getParamName()
-									 + ";\n");
-						}
-						else 
-						{
-							// FJP Nillable ^^
-							if(attribs[i].isAnyType()){
-								anyCounter += 1;
-								writer
-								.write("\t"
-										+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-										+ " " + attribs[i].getParamName()
-										+ Integer.toString(anyCounter)
-										+ ";\n");
-								
-							}
-								
-							else{
-						    writer.write("\t"
-		                                + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-		                                + " " + attribs[i].getParamNameWithoutSymbols()
-		                                + ";\n");
-							}
-						}
-					}
+                // FJP Nillable vv
+                if (isElementNillable(i) || attribs[i].isArray() || isElementOptional(i)
&& !attribs[i].getAllElement())
+                {
+                                        
+                    if(attribs[i].isAnyType()){
+                        anyCounter += 1;
+                            writer
+                        .write("\t"
+                                + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                + " * " + attribs[i].getParamName()
+                                + Integer.toString(anyCounter)
+                                + ";\n");
+                    }
+                    else
+                    {
+                        if( attribs[i].isArray())
+                        {
+                            String paramName = getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]);
+                            if (!paramName.endsWith("*"))
+                            {
+                                paramName += " *";
+                            }
+                            
+                            if (!attribs[i].isSimpleType() && attribs[i].getType().isSimpleType())
+                            {
+                                writer.write("\t");
+                            }
+                            else
+                            {
+                                writer.write("\tclass ");
+                            }
+                            writer.write(paramName
+                                     + " " + attribs[i].getParamName()
+                                     + ";\n");
+                            
+                        }
+                        else
+                        {
+                            if(attribs[i].getChoiceElement()&& !isElementNillable(i))
+                                writer.write("\t"
+                                     + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                     + " " + attribs[i].getParamName()
+                                     + ";\n");
+                            else
+                                writer.write("\t"
+                                         + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                         + " * " + attribs[i].getParamName()
+                                         + ";\n");
+                            
+                        }
+                    }
+                } else 
+                    {
+                        if(attribs[i].getAllElement() || attribs[i].getChoiceElement() )
+                        {
+                            writer.write("\t"
+                                     + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                     + " " + attribs[i].getParamName()
+                                     + ";\n");
+                        }
+                        else 
+                        {
+                            // FJP Nillable ^^
+                            if(attribs[i].isAnyType()){
+                                anyCounter += 1;
+                                writer
+                                .write("\t"
+                                        + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                        + " " + attribs[i].getParamName()
+                                        + Integer.toString(anyCounter)
+                                        + ";\n");
+                                
+                            }
+                                
+                            else{
+                            writer.write("\t"
+                                        + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                        + " " + attribs[i].getParamNameWithoutSymbols()
+                                        + ";\n");
+                            }
+                        }
+                    }
             }
             
             if (extensionBaseAttrib != null &&
                 getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib) !=
null)
             {
-				writer.write("\t"
+                writer.write("\t"
                              + getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib)
                              + " "
                              + extensionBaseAttrib.getParamNameWithoutSymbols() + ";\n");
@@ -413,19 +413,19 @@
     protected void writeGetSetMethods() throws WrapperFault
     {
         int anyCounter = 0;
-    	
-    	if (type.isArray())
+        
+        if (type.isArray())
         {
             return;
         }
-    	
+        
         try
         {
             for (int i = 0; i < attribs.length; i++)
             {
-        		String methodName = attribs[i].getParamNameWithoutSymbols();
-        		
-        		if( methodName.endsWith( "_"))
+                String methodName = attribs[i].getParamNameWithoutSymbols();
+                
+                if( methodName.endsWith( "_"))
                 {
                     String localMethodName = methodName.substring( 0, methodName.length()
- 1);
                     
@@ -434,136 +434,136 @@
                         methodName = localMethodName; 
                     }
                 }
-            	
+                
 // FJP Nillable vv
                 if (isElementNillable(i)  || attribs[i].isArray() || isElementOptional(i))
                 {
-                	if ( attribs[i].isAnyType()){
-                		anyCounter += 1;
-						writer
-							.write("\t"
-									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-									+ " * get"
-									+ methodName
-									+ Integer.toString(anyCounter)
-									+ "();\n");
-
-						writer
-							.write("\t"
-									+ "void set"
-									+ methodName
-									+ Integer.toString(anyCounter)
-									+ "("
-									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-									+ " * pInValue);\n\n");
-					}
-					else 
-					{
-						if(attribs[i].getAllElement() || attribs[i].getChoiceElement())
-						{
-						    String paramName = getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]);
-						    if (!paramName.endsWith("*"))
-						    {
-						        paramName += " *";
-						    }
-							if (attribs[i].isArray()){
-								writer.write( "\n\t"
-		                                  + paramName
-		                                  + " get"
-		                                  + methodName
-		                                  + "();\n");
-
-								writer.write( "\t"
-		                                  + "void set"
-		                                  + methodName
-		                                  + "("
-		                                  + paramName
-		                                  + " pInValue");
-							}
-							else{
-								if (isElementNillable(i)){
-									writer.write( "\n\t"
-	                                  + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-	                                  + " * get"
-	                                  + methodName
-	                                  + "();\n");
-
-									writer.write( "\t"
-	                                  + "void set"
-	                                  + methodName
-	                                  + "("
-	                                  + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-	                                  + " * pInValue");
-								}
-								else{
-									writer.write( "\n\t"
-			                                  + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-			                                  + " get"
-			                                  + methodName
-			                                  + "();\n");
-
-										writer.write( "\t"
-			                                  + "void set"
-			                                  + methodName
-			                                  + "("
-			                                  + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-			                                  + " pInValue");
-								}
-							}
-						}
-						else
-						{
-							writer.write( "\n\t"
-	                                  + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-	                                  + " * get"
-	                                  + methodName
-	                                  + "();\n");
-	
-							writer.write( "\t"
-	                                  + "void set"
-	                                  + methodName
-	                                  + "("
-	                                  + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-	                                  + " * pInValue");
-						}
-						if ((isElementNillable(i) || isElementOptional(i) || attribs[i].getAllElement() ||
attribs[i].getChoiceElement() ) && !attribs[i].isArray())
-						{
-						    writer.write(", bool deep = true");
-						}
-						writer.write(");\n");
-					}
+                    if ( attribs[i].isAnyType()){
+                        anyCounter += 1;
+                        writer
+                            .write("\t"
+                                    + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                    + " * get"
+                                    + methodName
+                                    + Integer.toString(anyCounter)
+                                    + "();\n");
+
+                        writer
+                            .write("\t"
+                                    + "void set"
+                                    + methodName
+                                    + Integer.toString(anyCounter)
+                                    + "("
+                                    + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                    + " * pInValue);\n\n");
+                    }
+                    else 
+                    {
+                        if(attribs[i].getAllElement() || attribs[i].getChoiceElement())
+                        {
+                            String paramName = getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]);
+                            if (!paramName.endsWith("*"))
+                            {
+                                paramName += " *";
+                            }
+                            if (attribs[i].isArray()){
+                                writer.write( "\n\t"
+                                          + paramName
+                                          + " get"
+                                          + methodName
+                                          + "();\n");
+
+                                writer.write( "\t"
+                                          + "void set"
+                                          + methodName
+                                          + "("
+                                          + paramName
+                                          + " pInValue");
+                            }
+                            else{
+                                if (isElementNillable(i)){
+                                    writer.write( "\n\t"
+                                      + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                      + " * get"
+                                      + methodName
+                                      + "();\n");
+
+                                    writer.write( "\t"
+                                      + "void set"
+                                      + methodName
+                                      + "("
+                                      + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                      + " * pInValue");
+                                }
+                                else{
+                                    writer.write( "\n\t"
+                                              + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                              + " get"
+                                              + methodName
+                                              + "();\n");
+
+                                        writer.write( "\t"
+                                              + "void set"
+                                              + methodName
+                                              + "("
+                                              + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                              + " pInValue");
+                                }
+                            }
+                        }
+                        else
+                        {
+                            writer.write( "\n\t"
+                                      + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                      + " * get"
+                                      + methodName
+                                      + "();\n");
+    
+                            writer.write( "\t"
+                                      + "void set"
+                                      + methodName
+                                      + "("
+                                      + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                      + " * pInValue");
+                        }
+                        if ((isElementNillable(i) || isElementOptional(i) || attribs[i].getAllElement()
|| attribs[i].getChoiceElement() ) && !attribs[i].isArray())
+                        {
+                            writer.write(", bool deep = true");
+                        }
+                        writer.write(");\n");
+                    }
                 }
                 else
                 {
 // FJP Nillable ^^
-                	if ( attribs[i].isAnyType()){
-                		anyCounter += 1;
-                		writer
-							.write("\t"
-									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-									+ " get"
-									+ methodName
-									+ Integer.toString(anyCounter)
-									+ "();\n");
-
-						writer
-							.write("\t"
-									+ "void set"
-									+ methodName
-									+ Integer.toString(anyCounter)
-									+ "("
-									+ getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-									+ "  InValue);\n\n");
-					}
-					else {
-                	
-                	
-                	
-                	/**
+                    if ( attribs[i].isAnyType()){
+                        anyCounter += 1;
+                        writer
+                            .write("\t"
+                                    + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                    + " get"
+                                    + methodName
+                                    + Integer.toString(anyCounter)
+                                    + "();\n");
+
+                        writer
+                            .write("\t"
+                                    + "void set"
+                                    + methodName
+                                    + Integer.toString(anyCounter)
+                                    + "("
+                                    + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                    + "  InValue);\n\n");
+                    }
+                    else {
+                    
+                    
+                    
+                    /**
                      * Dushshantha: Write setter
                      */
 
-						writer.write("\n\t"
+                        writer.write("\n\t"
                                     + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
                                     + " get"
                                     + methodName
@@ -573,29 +573,29 @@
                      * Dushshantha: Write getter
                      */
 
-						writer.write("\t"
+                        writer.write("\t"
                                     + "void set"
                                     + methodName
                                     + "("
                                     + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
                                     + " InValue");
-						Type type = attribs[i].getType();
-						boolean isPointerType = false;
-						if (type.isSimpleType())
-						{
-						    isPointerType = CUtils.isPointerType(CUtils.getclass4qname(type.getBaseType()));

-						}
-						else
-						{
-						    isPointerType = CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]));
-						}
-						
-						if ( (attribs[i].getAllElement() || attribs[i].getChoiceElement() || isPointerType)
&& (attribs[i].isSimpleType() || attribs[i].getType().isSimpleType()))
-						{
-						    writer.write(", bool deep = true");
-						}
-						writer.write(");\n");
-					}
+                        Type type = attribs[i].getType();
+                        boolean isPointerType = false;
+                        if (type.isSimpleType())
+                        {
+                            isPointerType = CUtils.isPointerType(CUtils.getclass4qname(type.getBaseType()));

+                        }
+                        else
+                        {
+                            isPointerType = CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]));
+                        }
+                        
+                        if ( (attribs[i].getAllElement() || attribs[i].getChoiceElement()
|| isPointerType) && (attribs[i].isSimpleType() || attribs[i].getType().isSimpleType()))
+                        {
+                            writer.write(", bool deep = true");
+                        }
+                        writer.write(");\n");
+                    }
                 }
             }
         } catch (IOException e)

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ServiceHeaderWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ServiceHeaderWriter.java?rev=386235&r1=386234&r2=386235&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
Wed Mar 15 17:24:11 2006
@@ -53,20 +53,20 @@
         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(" * 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");
@@ -110,7 +110,7 @@
                         + "\"\n");
             }
 
-            //writeFaultHeaders();			
+            //writeFaultHeaders();            
             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/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java?rev=386235&r1=386234&r2=386235&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
Wed Mar 15 17:24:11 2006
@@ -198,9 +198,9 @@
             elementName = param.getElementNameAsString();
             if (type != null && type.isSimpleType())
             { //schema defined simpleType possibly with restrictions
-            	if (param.isNillable() && 
-            			!(CUtils.isPointerType(type.getLanguageSpecificName())))
-            	{
+                if (param.isNillable() && 
+                        !(CUtils.isPointerType(type.getLanguageSpecificName())))
+                {
                 writer.write(
                     "\t"
                         + paraTypeName
@@ -213,11 +213,11 @@
                         + "(\""
                         + elementName
                         + "\",0);\n");
-            	}
-            	else
-            	{
-            	    
-            		writer.write(
+                }
+                else
+                {
+                    
+                    writer.write(
                             "\t"
                                 + paraTypeName
                                 + " v"
@@ -229,13 +229,13 @@
                                 + "(\""
                                 + elementName
                                 + "\",0));\n");
-            	}
+                }
             }
             else
             {
                 if ((CUtils.isSimpleType(param.getLangName())))
                 {
-                    //for simple types	
+                    //for simple types    
                     if (param.isArray())
                     { /*parameters that are declared as arrays in the wrapping element.*/
                         String containedType =
@@ -244,7 +244,7 @@
                         writer.write("\n\t" + containedType + "_Array * v" + i +" = new "
+ containedType + "_Array();\n");
                         writer.write(
                             "\t"
-                        		+ "Axis_Array * RetArray"
+                                + "Axis_Array * RetArray"
                                 + i
                                 + " = pIWSDZ->getBasicArray("
                                 + CUtils.getXSDTypeForBasicType(containedType)
@@ -256,50 +256,50 @@
                     }
                     else
                     {
-                    	if (CUtils.isPointerType(paraTypeName))
-                    	{
+                        if (CUtils.isPointerType(paraTypeName))
+                        {
 
-                    		writer.write("\n\t"
+                            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");
-                    	    }
-                    		writer.write("\t" + paraTypeName + " value" + i + " = pIWSDZ->"
+                            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");
+                            }
+                            writer.write("\t" + paraTypeName + " value" + i + " = pIWSDZ->"
                                 + CUtils.getParameterGetValueMethodName(
                                     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.getXSDTypeForBasicType(paraTypeName)
+ " );\n");
-                    		writer.write("\t}\n");
-                    		if (param.isOptional())
-                    		{
-                    		    writer.write("\t}\n");
-                    		}
-                    	}
-                    	else
-                    	{
-                    		if (param.isNillable()  || param.isOptional())
-                    		{
-                    		    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");
-                    		    }
-                    		    writer.write("\t" + paraTypeName + " * pValue" + i
+                            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.getXSDTypeForBasicType(paraTypeName) + " );\n");
+                            writer.write("\t}\n");
+                            if (param.isOptional())
+                            {
+                                writer.write("\t}\n");
+                            }
+                        }
+                        else
+                        {
+                            if (param.isNillable()  || param.isOptional())
+                            {
+                                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");
+                                }
+                                writer.write("\t" + paraTypeName + " * pValue" + i
                                         + " = pIWSDZ->"
                                         + CUtils.getParameterGetValueMethodName(
                                             paraTypeName,
@@ -307,34 +307,34 @@
                                         + "(\""
                                         + 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.getXSDTypeForBasicType(paraTypeName) + ");\n");
-                    		    writer.write("\t}\n");
-                    		    if (param.isOptional())
-                    		    {
-                    		        writer.write("\t}\n");
-                    		    }
-                    		}
-                    		else
-                    		{
-                    		    writer.write("\n\t" + paraTypeName + " v" + i);
-                    		    if (!"xsd__base64Binary".equals(paraTypeName) && !"xsd__hexBinary".equals(paraTypeName))
-                    		    {
-	                    		    writer.write(" = "
-	                                        + CUtils.getInitValue(paraTypeName));
-                    		    }
-                    		    writer.write(";\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.getXSDTypeForBasicType(paraTypeName) + ");\n");
+                                writer.write("\t}\n");
+                                if (param.isOptional())
+                                {
+                                    writer.write("\t}\n");
+                                }
+                            }
+                            else
+                            {
+                                writer.write("\n\t" + paraTypeName + " v" + i);
+                                if (!"xsd__base64Binary".equals(paraTypeName) &&
!"xsd__hexBinary".equals(paraTypeName))
+                                {
+                                    writer.write(" = "
+                                            + CUtils.getInitValue(paraTypeName));
+                                }
+                                writer.write(";\n");
                                 writer.write("\t"
                                         + paraTypeName
                                         + " * pValue"
                                         + i
                                         + " = pIWSDZ->"
                                         + CUtils.getParameterGetValueMethodName(
-	                                            paraTypeName,
-	                                            false) + "(\""
+                                                paraTypeName,
+                                                false) + "(\""
                                         + elementName + "\", 0);\n");
                                 writer.write("\tif (pValue" + i + ")\n");
                                 writer.write("\t{\n");
@@ -346,8 +346,8 @@
                                         + CUtils.getXSDTypeForBasicType(paraTypeName)
                                         + ");\n");
                                 writer.write("\t}\n");
-                    		}
-                    	}
+                            }
+                        }
                     }
                 }
                 else
@@ -364,7 +364,7 @@
                             writer.write("\n\t" + outparamType + "_Array * v" + i +" = new
" + outparamType + "_Array();\n");
                             writer.write(
                                 "\t"
-                            		+ "Axis_Array * RetArray"
+                                    + "Axis_Array * RetArray"
                                     + i
                                     + " = pIWSDZ->getBasicArray("
                                     + CUtils.getXSDTypeForBasicType(
@@ -385,7 +385,7 @@
                                 writer.write("\n\t" + outparamType + " * v" + i +" = new
" + outparamType + "();\n");
                                 writer.write(
                                     "\t"
-                                		+ "Axis_Array * RetArray"
+                                        + "Axis_Array * RetArray"
                                         + i
                                         + " = pIWSDZ->getBasicArray("
                                         + CUtils.getXSDTypeForBasicType(
@@ -402,7 +402,7 @@
                                 writer.write("\n\t" + paraTypeName + " * v" + i +" = new
" + paraTypeName + "();\n");
                                 writer.write(
                                     "\t"
-                                		+ "pIWSDZ->getCmplxArray(v" + i + ", (void*)Axis_DeSerialize_"
+                                        + "pIWSDZ->getCmplxArray(v" + i + ", (void*)Axis_DeSerialize_"
                                         + containedType
                                         + ",\n\t\t(void*)Axis_Create_"
                                         + containedType
@@ -470,7 +470,7 @@
             {
                 ParameterInfo param = (ParameterInfo) paramsC.get(i);
                 String typeName = WrapperUtils.getClassNameFromParamInfoConsideringArrays(
-                        			(ParameterInfo) paramsC.get(i), wscontext);
+                                    (ParameterInfo) paramsC.get(i), wscontext);
                 writer.write("\t" + typeName);
                 
                 if ( (param.isOptional() || param.isNillable()) && CUtils.isSimpleType(typeName)
&& !CUtils.isPointerType(typeName) && !param.isArray())
@@ -486,12 +486,12 @@
             returnParamName = returntype.getElementNameAsString();
             writer.write("\t\t" + outparamType);
             if ((outparamType.lastIndexOf ("_Array") > 0)||(!returntypeisarray 
-        		&& (!returntypeissimple
-            		|| (returntypeissimple		//Chinthana:This has been changed because XSDElementNill
Test failed.
-        				&& returntype.isNillable()
-						&& !(CUtils.isPointerType(retType.getLanguageSpecificName()))))))
+                && (!returntypeissimple
+                    || (returntypeissimple        //Chinthana:This has been changed because
XSDElementNill Test failed.
+                        && returntype.isNillable()
+                        && !(CUtils.isPointerType(retType.getLanguageSpecificName()))))))
             {
-            	writer.write(" *");
+                writer.write(" *");
             }
             
             //06-06-2005...................................................................
@@ -527,26 +527,26 @@
                 }
                 else
                 {
-                	String returnParamTypeName = retType.getLanguageSpecificName();
-                	if (returntype.isNillable()
-                			|| CUtils.isPointerType(returnParamTypeName))
-                	{
-	                    writer.write(
-	                        "\t\treturn pIWSSZ->addOutputParam(\""
-	                            + returnParamName
-	                            + "\", (void*)ret, "
-	                            + CUtils.getXSDTypeForBasicType(outparamType)
-	                            + ");\n");
-                	}
-                	else
-                	{
-                		writer.write(
-    	                        "\t\treturn pIWSSZ->addOutputParam(\""
-    	                            + returnParamName
-    	                            + "\", (void*)&ret, "
-    	                            + CUtils.getXSDTypeForBasicType(outparamType)
-    	                            + ");\n");
-                	}
+                    String returnParamTypeName = retType.getLanguageSpecificName();
+                    if (returntype.isNillable()
+                            || CUtils.isPointerType(returnParamTypeName))
+                    {
+                        writer.write(
+                            "\t\treturn pIWSSZ->addOutputParam(\""
+                                + returnParamName
+                                + "\", (void*)ret, "
+                                + CUtils.getXSDTypeForBasicType(outparamType)
+                                + ");\n");
+                    }
+                    else
+                    {
+                        writer.write(
+                                "\t\treturn pIWSSZ->addOutputParam(\""
+                                    + returnParamName
+                                    + "\", (void*)&ret, "
+                                    + CUtils.getXSDTypeForBasicType(outparamType)
+                                    + ");\n");
+                    }
                 }
             }
             else
@@ -691,21 +691,21 @@
                         }
                         else
                         {
-                        	/**
-                        	 * Dushshantha:
-                        	 * i commented out this code to correct wrong code generation for
out params
-                        	 */
-                        	
-                        	
-                        	if (CUtils.isPointerType(outparamType) || param.isOptional() ||
param.isNillable())
-                        	{
+                            /**
+                             * Dushshantha:
+                             * i commented out this code to correct wrong code generation
for out params
+                             */
+                            
+                            
+                            if (CUtils.isPointerType(outparamType) || param.isOptional()
|| param.isNillable())
+                            {
                                 if (param.isOptional())
                                 {
                                     writer.write("\tif (out" + i + ")\n");
                                     writer.write("\t{\n");
                                     writer.write("\t");
                                 }
-                        		writer.write(
+                                writer.write(
                                         "\tpIWSSZ->addOutputParam(\""
                                             + returnParamName.substring(returnParamName.lastIndexOf(">")+1)
                                             + "\", (void*)out"
@@ -713,22 +713,22 @@
                                             + ", "
                                             + CUtils.getXSDTypeForBasicType(outparamType)
                                             + ");\n");
-                        		if (param.isOptional())
-                        		{
-                        		    writer.write("\t}\n");
-                        		}
-                        	}
-                        	else
-                        	{
-                        		writer.write(
+                                if (param.isOptional())
+                                {
+                                    writer.write("\t}\n");
+                                }
+                            }
+                            else
+                            {
+                                writer.write(
                                         "\tpIWSSZ->addOutputParam(\""
-                        				    + returnParamName.substring(returnParamName.lastIndexOf(">")+1)
+                                            + returnParamName.substring(returnParamName.lastIndexOf(">")+1)
                                             + "\", (void*)&out"
                                             + i
                                             + ", "
                                             + CUtils.getXSDTypeForBasicType(outparamType)
                                             + ");\n");
-                        	}
+                            }
                             //10/05/2005..........................................................
                         }
                     }
@@ -904,7 +904,7 @@
                     + "\", \""
                     + wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()
                     + "\",\"AxisC++ Faultcode\", \"Custom Out of bound exception\");\n");
-            //	writer.write("\t\t"+faulttype+" pObjFault = new "+langName+"();\n");//damitha
		                 
+            //    writer.write("\t\t"+faulttype+" pObjFault = new "+langName+"();\n");//damitha
                            
             writer.write(
                 "\t\t\tpIWSSZ->addFaultDetail(pObjFault, (void*) Axis_Serialize_"
                     + langName



Mime
View raw message