You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/12/07 17:05:15 UTC

svn commit: r354787 - in /webservices/axis/trunk/c: src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ tests/auto_build/testcases/ tests/auto_build/testcases/client/cpp/ tests/auto_build/testcases/output/ tests/auto_build/testcases/tests/ tests/auto_bu...

Author: dicka
Date: Wed Dec  7 08:04:57 2005
New Revision: 354787

URL: http://svn.apache.org/viewcvs?rev=354787&view=rev
Log:
Modify generated complex types to allow for deep or shallow copying of simple types (defaulting to deep copy).

To ensure correct behaviour a new test case has been added: ShallowAndDeepCopyingInComplexTypeOfSimpleTypes

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ShallowAndDeepCopyingInComplexTypeOfSimpleTypesClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes_ServerResponse.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyInComplexTypesOfSimpleTypes.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes.wsdl
Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
    webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java?rev=354787&r1=354786&r2=354787&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java Wed Dec  7 08:04:57 2005
@@ -202,9 +202,34 @@
 	
 	                    writer.write("\n" + "void " + classname + "::set"
 	                            + methodName + "(" + properParamName
-	                            + " * pInValue)\n{\n");
+	                            + " * pInValue, bool deep)\n{\n");
 	
-	                    writer.write("\t" + parameterName + " = pInValue ; \n");
+	                    writer.write("\tif (" + parameterName + " != NULL)\n");
+                        writer.write("\t{\n");
+                        writer.write("\t\tif (__axis_deepcopy_" + parameterName + ")\n");
+                        writer.write("\t\t{\n");
+                        writer.write("\t\t\tdelete " + parameterName + ";\n");
+                        writer.write("\t\t}\n");
+                        writer.write("\t\t" + parameterName + " = NULL;\n");
+                        writer.write("\t}\n");
+                        writer.write("\tif (pInValue != NULL)\n");
+                        writer.write("\t{\n");
+                        writer.write("\t\tif (deep)\n");
+                        writer.write("\t\t{\n");
+                        writer.write("\t\t\t" + parameterName + " = new " + properParamName + "();\n");
+                        writer.write("\t\t\t*" + parameterName + " = *pInValue;\n");
+                        writer.write("\t\t}\n");
+                        writer.write("\t\telse\n");
+                        writer.write("\t\t{\n");
+                        writer.write("\t\t\t" + parameterName + " = pInValue;\n");
+                        writer.write("\t\t}\n");
+                        writer.write("\t}\n");
+                        writer.write("\telse\n");
+                        writer.write("\t{\n");
+                        writer.write("\t\t" + parameterName + " = NULL;\n");
+                        writer.write("\t}\n");
+                        writer.write("\t__axis_deepcopy_" + parameterName + " = deep;\n");
+
 	
 	                    if (attribs[i].getChoiceElement())
 	                    {
@@ -259,10 +284,46 @@
 	                            + methodName
 	                            + "("
 	                            + properParamName
-	                            + " InValue)\n{\n");
-	
-	                    writer.write("\t" + parameterName
-	                            + " = InValue ; \n");
+	                            + " InValue");
+	                    if(CUtils.isPointerType(properParamName))
+	                    {
+	                        writer.write(", bool deep");
+	                    }
+	                    writer.write(")\n{\n");
+	                    
+	                    if(CUtils.isPointerType(properParamName))
+	                    {
+	                        writer.write("\tif (" + parameterName + " != NULL)\n");
+	                        writer.write("\t{\n");
+	                        writer.write("\t\tif (__axis_deepcopy_" + parameterName + ")\n");
+	                        writer.write("\t\t{\n");
+	                        writer.write("\t\t\tdelete [] " + parameterName + ";\n");
+	                        writer.write("\t\t}\n");
+	                        writer.write("\t\t" + parameterName + " = NULL;\n");
+	                        writer.write("\t}\n\n");
+	                        writer.write("\tif(InValue != NULL)\n");
+	                        writer.write("\t{\n");
+	                        writer.write("\t\tif (deep)\n");
+	                        writer.write("\t\t{\n");
+	                        writer.write("\t\t\t" + parameterName + " = new char[strlen(InValue) + 1];\n");
+	                        writer.write("\t\t\tstrcpy(" + parameterName + ", InValue);\n");
+	                        writer.write("\t\t}\n");
+	                        writer.write("\t\telse\n");
+	                        writer.write("\t\t{\n");
+	                        writer.write("\t\t\t" + parameterName + " = InValue;\n");
+	                        writer.write("\t\t}\n");
+	                        writer.write("\t}\n");
+	                        writer.write("\telse\n");
+	                        writer.write("\t{\n");
+	                        writer.write("\t\t" + parameterName + " = NULL;\n");
+	                        writer.write("\t}\n");
+	                        writer.write("\t__axis_deepcopy_" + parameterName + " = deep;\n");
+	                    }
+	                    else
+	                    {
+			                writer.write("\t" + parameterName
+		                            + " = InValue ; \n");
+	                    }
 	
 	                    if (attribs[i].getChoiceElement())
 	                    {
@@ -1136,17 +1197,20 @@
                 }
                 else
                 {
-	                if (attribs[i].isSimpleType() && CUtils.isPointerType(attribs[i].getTypeName()))
+	                if (attribs[i].isSimpleType() && (CUtils.isPointerType(attribs[i].getTypeName()) || attribs[i].isOptional() || attribs[i].isNillable()))
 	                {
-	                    writer.write("\tif(original." + attribs[i].getParamName() + " != NULL)\n");
-	                    writer.write("\t{\n");
-	                    writer.write("\t\t" + attribs[i].getParamName() + " = new char[strlen(original." + attribs[i].getParamName() + ") + 1];\n");
-	                    writer.write("\t\tstrcpy(" + attribs[i].getParamName() + ", original." + attribs[i].getParamName() + ");\n");
-	                    writer.write("\t}\n");
-	                    writer.write("\telse\n");
-	                    writer.write("\t{\n");
-	                    writer.write("\t\t" + attribs[i].getParamName() + " = NULL;\n");
-	                    writer.write("\t}\n");
+	                    writer.write("\t" + attribs[i].getParamName() + " = NULL;\n");
+	                    String methodName = attribs[i].getParamNameWithoutSymbols();
+	                    if( methodName.endsWith( "_"))
+	                    {
+	                        String localMethodName = methodName.substring( 0, methodName.length() - 1);
+	                        
+	                        if( localMethodName.equals( classname))
+	                        {
+	                            methodName = localMethodName; 
+	                        }
+	                    }
+	                    writer.write("\tset" + methodName + "(original." + attribs[i].getParamName() + ", original.__axis_deepcopy_" + attribs[i].getParamName() + ");\n\n");
 	                }
 	                else
 	                {
@@ -1211,7 +1275,7 @@
                 	            + "= NULL;\n");
                 	}
                 }
-                else if (isElementNillable(i))
+                else if (isElementNillable(i) || isElementOptional(i))
                 {
                     writer.write("\t" + attribs[i].getParamNameAsMember()
                             + " = NULL;\n");
@@ -1286,12 +1350,20 @@
                     writer.write("\t\t" + name + " = NULL;\n");
                     writer.write("\t}\n");
                 }
-                else if (CUtils.isPointerType(typename))
+                else if (CUtils.isPointerType(typename) || isElementNillable(i) || isElementOptional(i))
                 {
                     // found pointer type
-                    writer.write("\tif (" + name + "!= NULL)\n");
+                    writer.write("\tif (" + name + " != NULL)\n");
                     writer.write("\t{\n");
-                    writer.write("\t\tdelete [] " + name + ";\n");
+                    writer.write("\t\tif(__axis_deepcopy_" + name + ")\n");
+                    writer.write("\t\t{\n");
+                    writer.write("\t\t\tdelete ");
+                    if (CUtils.isPointerType(typename))
+                    {
+                        writer.write("[] ");
+                    }
+                    writer.write(name + ";\n");
+                    writer.write("\t\t}\n");
                     writer.write("\t\t" + name + " = NULL;\n");
                     writer.write("\t}\n");
                 }

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=354787&r1=354786&r2=354787&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 Dec  7 08:04:57 2005
@@ -85,6 +85,7 @@
                 //..................................
                 writeConstructors();
                 writeDestructors();
+                writeDeepCopyFlags();
                 this.writer.write("};\n\n");
             }
             this.writer.write("#endif /* !defined(__" + classname.toUpperCase()
@@ -101,6 +102,43 @@
         }
     }
 
+    /**
+     * 
+     */
+    private void writeDeepCopyFlags() throws WrapperFault
+    {
+        if (type.isArray())
+        {
+            return;
+        }
+        
+        if (attribs.length == 0)
+        {
+            return;
+        }
+        
+        try
+        {
+            boolean foundDeepCopyType = false;
+        	for (int i = 0 ; i < attribs.length ; i++)
+        	{
+        	    if (CUtils.isSimpleType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])) && !attribs[i].isArray() &&(isElementNillable(i) || isElementOptional(i) || CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]))))
+        	    {
+        	        if (!foundDeepCopyType)
+        	        {
+        	            writer.write("\nprivate:\n");
+        	            foundDeepCopyType = true;
+        	        }
+        	        writer.write("\tbool __axis_deepcopy_" + attribs[i].getParamNameWithoutSymbols() + ";\n");
+        	    }
+        	}
+        }
+        catch (IOException e)
+        {
+            throw new WrapperFault(e);
+        }
+    }
+
     protected void writeSimpleTypeWithEnumerations() throws WrapperFault
     {
         try
@@ -392,7 +430,12 @@
                                   + methodName
                                   + "("
                                   + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                                  + " * pInValue);\n");
+                                  + " * pInValue");
+						if (isElementNillable(i) || isElementOptional(i))
+						{
+						    writer.write(", bool deep = true");
+						}
+						writer.write(");\n");
 					}
                 }
                 else
@@ -440,7 +483,12 @@
                                     + methodName
                                     + "("
                                     + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                                    + " InValue);\n");
+                                    + " InValue");
+						if (CUtils.isPointerType(getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])))
+						{
+						    writer.write(", bool deep = true");
+						}
+						writer.write(");\n");
 					}
                 }
             }

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ShallowAndDeepCopyingInComplexTypeOfSimpleTypesClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ShallowAndDeepCopyingInComplexTypeOfSimpleTypesClient.cpp?rev=354787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ShallowAndDeepCopyingInComplexTypeOfSimpleTypesClient.cpp (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ShallowAndDeepCopyingInComplexTypeOfSimpleTypesClient.cpp Wed Dec  7 08:04:57 2005
@@ -0,0 +1,204 @@
+// Copyright 2003-2004 The Apache Software Foundation.
+// (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//        http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "ElementFormDefaultTest.hpp"
+#include "CommonClientTestCode.hpp"
+#include <axis/AxisException.hpp>
+#include <ctype.h>
+#include <iostream>
+#include <signal.h>
+
+void sig_handler(int);
+void PrintUsage();
+bool IsNumber(const char* p);
+void testDeepCopyUsingDefault();
+void testDeepCopyUsingFlag();
+void testShallowCopy();
+
+int main(int argc, char* argv[])
+{
+    signal(SIGILL, sig_handler);
+    signal(SIGABRT, sig_handler);
+    signal(SIGSEGV, sig_handler);
+    //signal(SIGQUIT, sig_handler);
+    //signal(SIGBUS, sig_handler);
+    signal(SIGFPE, sig_handler);
+	
+	testDeepCopyUsingDefault();
+	testDeepCopyUsingFlag();
+	testShallowCopy();
+
+       
+    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
+ 
+  return 0;
+}
+
+void PrintUsage()
+{
+  printf("Usage :\n Calculator <url>\n\n");
+ exit(1);
+}
+
+bool IsNumber(const char* p)
+{
+    for (unsigned int x=0; x < strlen(p); x++)
+ {
+     if (!isdigit(p[x])) return false;
+ }
+ return true;
+}
+
+void sig_handler(int sig) {
+    signal(sig, sig_handler);
+    cout << "SIGNAL RECEIVED " << sig << endl;
+ exit(1);
+}
+
+void testDeepCopyUsingDefault()
+{
+	ElementFormDefaultIsQualified * complexType = new ElementFormDefaultIsQualified();
+	// Test for string based types
+	complexType->setaStringType("Hello!");
+	complexType->setaStringType("Goodbye!");
+	xsd__string aStringType = new char[9];
+	strcpy(aStringType, "Welcome!");
+	complexType->setaStringType(aStringType);
+	delete [] aStringType;
+	complexType->setaStringType(NULL);
+	
+
+	// Test for nillable numeric types
+	xsd__integer * aNillableIntegerType = new xsd__integer(123);
+	complexType->setaNillableIntegerType(aNillableIntegerType);
+	delete aNillableIntegerType;
+	xsd__integer * aSecondNillableIntegerType = new xsd__integer(456);
+	complexType->setaNillableIntegerType(aSecondNillableIntegerType);
+	delete aSecondNillableIntegerType;
+	complexType->setaNillableIntegerType(NULL);
+
+	// Test for optional numeric types
+	xsd__integer * anOptionalIntegerType = new xsd__integer(789);
+	complexType->setanOptionalIntegerType(anOptionalIntegerType);
+	delete anOptionalIntegerType;
+	xsd__integer * aSecondOptionalIntegerType = new xsd__integer(54321);
+	complexType->setanOptionalIntegerType(aSecondOptionalIntegerType);
+	delete aSecondOptionalIntegerType;
+	complexType->setanOptionalIntegerType(NULL);
+
+	// Test correct copying (so repopulate values)
+	complexType->setaStringType("Welcome!");
+	xsd__integer * optionalInteger = new xsd__integer(9876);
+	complexType->setanOptionalIntegerType(optionalInteger);
+	delete optionalInteger;
+	xsd__integer * nillableInteger = new xsd__integer(321);
+	complexType->setaNillableIntegerType(nillableInteger);
+	delete nillableInteger;
+	ElementFormDefaultIsQualified * aSecondComplexType = new ElementFormDefaultIsQualified(*complexType);
+
+	delete complexType;
+	delete aSecondComplexType;
+}
+
+void testDeepCopyUsingFlag()
+{
+	ElementFormDefaultIsQualified * complexType = new ElementFormDefaultIsQualified();
+	// Test for string based types
+	complexType->setaStringType("Hello!", true);
+	complexType->setaStringType("Goodbye!", true);
+	xsd__string aStringType = new char[9];
+	strcpy(aStringType, "Welcome!");
+	complexType->setaStringType(aStringType, true);
+	delete [] aStringType;
+	complexType->setaStringType(NULL, true);
+	
+
+	// Test for nillable numeric types
+	xsd__integer * aNillableIntegerType = new xsd__integer(123);
+	complexType->setaNillableIntegerType(aNillableIntegerType, true);
+	delete aNillableIntegerType;
+	xsd__integer * aSecondNillableIntegerType = new xsd__integer(456);
+	complexType->setaNillableIntegerType(aSecondNillableIntegerType, true);
+	delete aSecondNillableIntegerType;
+	complexType->setaNillableIntegerType(NULL, true);
+
+	// Test for optional numeric types
+	xsd__integer * anOptionalIntegerType = new xsd__integer(789);
+	complexType->setanOptionalIntegerType(anOptionalIntegerType, true);
+	delete anOptionalIntegerType;
+	xsd__integer * aSecondOptionalIntegerType = new xsd__integer(54321);
+	complexType->setanOptionalIntegerType(aSecondOptionalIntegerType, true);
+	delete aSecondOptionalIntegerType;
+	complexType->setanOptionalIntegerType(NULL, true);
+
+	// Test correct copying (so repopulate values)
+	complexType->setaStringType("Welcome!", true);
+	xsd__integer * optionalInteger = new xsd__integer(9876);
+	complexType->setanOptionalIntegerType(optionalInteger, true);
+	delete optionalInteger;
+	xsd__integer * nillableInteger = new xsd__integer(321);
+	complexType->setaNillableIntegerType(nillableInteger, true);
+	delete nillableInteger;
+	ElementFormDefaultIsQualified * aSecondComplexType = new ElementFormDefaultIsQualified(*complexType);
+
+	delete complexType;
+	delete aSecondComplexType;
+}
+
+
+void testShallowCopy()
+{
+	ElementFormDefaultIsQualified * complexType = new ElementFormDefaultIsQualified();
+
+	// Test for string based types
+	complexType->setaStringType("Hello!", false);
+	complexType->setaStringType("Goodbye!", false);
+	xsd__string aStringType = new char[9];
+	strcpy(aStringType, "Welcome!");
+	complexType->setaStringType(aStringType, false);
+	complexType->setaStringType(NULL, false);
+
+	// Test for nillable numeric types
+	xsd__integer * aNillableIntegerType = new xsd__integer(123);
+	complexType->setaNillableIntegerType(aNillableIntegerType, false);
+	xsd__integer * aSecondNillableIntegerType = new xsd__integer(456);
+	complexType->setaNillableIntegerType(aSecondNillableIntegerType, false);
+	complexType->setaNillableIntegerType(NULL, false);
+
+	// Test for optional numeric types
+	xsd__integer * anOptionalIntegerType = new xsd__integer(789);
+	complexType->setanOptionalIntegerType(anOptionalIntegerType, false);
+	xsd__integer * aSecondOptionalIntegerType = new xsd__integer(54321);
+	complexType->setanOptionalIntegerType(aSecondOptionalIntegerType, false);
+	complexType->setanOptionalIntegerType(NULL, false);
+	
+	// Test correct copying (so repopulate values)
+	complexType->setaStringType("Welcome!", false);
+	xsd__integer * optionalInteger = new xsd__integer(9876);
+	complexType->setanOptionalIntegerType(optionalInteger, false);
+	xsd__integer * nillableInteger = new xsd__integer(321);
+	complexType->setaNillableIntegerType(nillableInteger, false);
+	ElementFormDefaultIsQualified * aSecondComplexType = new ElementFormDefaultIsQualified(*complexType);
+
+	delete [] aStringType;
+	delete aNillableIntegerType;
+	delete aSecondNillableIntegerType;
+	delete anOptionalIntegerType;
+	delete aSecondOptionalIntegerType;
+	delete optionalInteger;
+	delete nillableInteger;
+	delete complexType;
+	delete aSecondComplexType;
+}
\ No newline at end of file

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.expected?rev=354787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.expected Wed Dec  7 08:04:57 2005
@@ -0,0 +1 @@
+---------------------- TEST COMPLETE -----------------------------

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes_ServerResponse.expected?rev=354787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes_ServerResponse.expected Wed Dec  7 08:04:57 2005
@@ -0,0 +1,11 @@
+HTTP/1.1 200 OK
+Server: WebSphere Application Server/5.1
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-GB
+Transfer-Encoding: chunked
+
+###
+<?xml version="1.0" encoding="utf-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body></SOAP-ENV:Body></SOAP-ENV:Envelope>
+0
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyInComplexTypesOfSimpleTypes.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyInComplexTypesOfSimpleTypes.xml?rev=354787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyInComplexTypesOfSimpleTypes.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyInComplexTypesOfSimpleTypes.xml Wed Dec  7 08:04:57 2005
@@ -0,0 +1,20 @@
+<test>
+    <name>ElementFormDefaultTest</name>
+    <description>Test correct serialization when the attribute form is qualified or unqualified</description>
+    <clientLang>cpp</clientLang>
+    <clientCode>ElementFormDefaultTestClient.cpp</clientCode>
+    <wsdl>ElementFormDefaultTest.wsdl</wsdl>
+    <expected>
+        <output>
+            ElementFormDefaultTest.expected
+        </output>
+		<request>
+			ElementFormDefaultTestRequest.out
+		</request>
+		<serverResponse>
+			ElementFormDefaultTest_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/ElementFormDefaultTest</endpoint>
+</test>
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.xml?rev=354787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.xml Wed Dec  7 08:04:57 2005
@@ -0,0 +1,17 @@
+<test>
+    <name>ShallowAndDeepCopyingInComplexTypeOfSimpleTypes</name>
+    <description>Test correct behaviour of deep and shallow copying of simple types within generated complex types</description>
+    <clientLang>cpp</clientLang>
+    <clientCode>ShallowAndDeepCopyingInComplexTypeOfSimpleTypesClient.cpp</clientCode>
+    <wsdl>ElementFormDefaultTest.wsdl</wsdl>
+    <expected>
+        <output>
+            ShallowAndDeepCopyingInComplexTypeOfSimpleTypes.expected
+        </output>
+		<serverResponse>
+			ShallowAndDeepCopyingInComplexTypeOfSimpleTypes_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/ElementFormDefaultTest</endpoint>
+</test>
+

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list?rev=354787&r1=354786&r2=354787&view=diff
==============================================================================
Binary files - no diff available.

Added: webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes.wsdl?rev=354787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes.wsdl (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes.wsdl Wed Dec  7 08:04:57 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes" targetNamespace="http://tempuri.org/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes/">
+  <wsdl:types>
+    <xsd:schema targetNamespace="http://tempuri.org/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+	  <xsd:complexType name="ComplexType>
+		<xsd:sequence>
+		  <xsd:element name="stringType" type="xsd:string"/>
+          <xsd:element name="intType" type="xsd:int"/>
+          <xsd:element name="optionalIntType" type="xsd
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:element name="NewOperationResponse">
+      	<xsd:complexType>
+      		<xsd:sequence></xsd:sequence>
+      	</xsd:complexType>
+      </xsd:element>
+      <xsd:element name="NewOperationRequest">
+      	<xsd:complexType>
+      		<xsd:sequence></xsd:sequence>
+      	</xsd:complexType>
+      </xsd:element>
+    </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="NewOperationResponse">
+    <wsdl:part element="tns:NewOperationResponse" name="NewOperationResponse"/>
+  </wsdl:message>
+  <wsdl:message name="NewOperationRequest">
+    <wsdl:part element="tns:NewOperationRequest" name="NewOperationRequest"/>
+  </wsdl:message>
+  <wsdl:portType name="ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes">
+    <wsdl:operation name="NewOperation">
+      <wsdl:input message="tns:NewOperationRequest"/>
+      <wsdl:output message="tns:NewOperationResponse"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="ShallowAndDeepCopyOfSimpleTypesWithinComplexTypesSOAP" type="tns:ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="NewOperation">
+      <soap:operation soapAction="http://tempuri.org/ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes/NewOperation"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="ShallowAndDeepCopyOfSimpleTypesWithinComplexTypes">
+    <wsdl:port binding="tns:ShallowAndDeepCopyOfSimpleTypesWithinComplexTypesSOAP" name="ShallowAndDeepCopyOfSimpleTypesWithinComplexTypesSOAP">
+      <soap:address location="http://tempuri.org"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>