You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2006/05/10 04:43:03 UTC

svn commit: r405600 - in /webservices/axis/trunk/c/tests/auto_build/testcases: client/c/ client/cpp/ tests/

Author: nadiramra
Date: Tue May  9 19:43:01 2006
New Revision: 405600

URL: http://svn.apache.org/viewcvs?rev=405600&view=rev
Log:
C support fixes/enhancements. Testcases for C bindings.

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gDayClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthDayClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearMonthClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gDayC.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthC.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthDayC.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearC.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearMonthC.xml
Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gDayClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthDayClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearMonthClient.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c?rev=405600&r1=405599&r2=405600&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c Tue May  9 19:43:01 2006
@@ -226,9 +226,6 @@
 
     requiredAttributeInput.requiredAttribute = input;
     requiredAttributeResult = asRequiredAttribute(ws, &requiredAttributeInput);
-    if (exceptionOccurred == C_TRUE
-        || get_XSD_IDPort_Status(ws) == AXISC_FAIL )
-        printf ("Failed\n");
     
     if (requiredAttributeResult->requiredAttribute)
     {

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gDayClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gDayClient.c?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gDayClient.c (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gDayClient.c Tue May  9 19:43:01 2006
@@ -0,0 +1,172 @@
+// 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 <stdlib.h>
+#include <stdio.h>
+
+#include "CommonClientTestCode.h"
+#include "XSD_gDay.h"
+
+
+int main(int argc, char* argv[])
+{
+    AXISCHANDLE ws;
+    
+    xsdc__gDay result;
+    xsdc__gDay input;
+    xsdc__gDay* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+    
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/XSD_gDay";
+
+    if(argc>1)
+        url = argv[1];
+
+    sprintf(endpoint, "%s", url);
+    ws = get_XSD_gDay_stub(endpoint);
+    
+    timeToTest = 1100246323;
+    temp = gmtime(&timeToTest);
+    memcpy(&input, temp, sizeof(struct tm));
+
+    // Test non-nillable element
+    result = asNonNillableElement(ws, input);
+    strftime(returnString, 50, "%d", &result);
+    printf( "non-nillable element=%s\n" , returnString );
+
+    // Test nillable element, with a value
+    nillableResult = asNillableElement(ws, &input);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%d", nillableResult);
+        printf( "nillable element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GDAY);
+    }
+    else
+        printf( "nillable element=<nil>\n" );
+
+    // Test nillable element, with nil
+    nillableResult = asNillableElement(ws, NULL);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%d", nillableResult);
+        printf( "nil element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GDAY);
+    }
+    else
+        printf( "nil element=<nil>\n" );
+
+    // Test required attribute
+    {
+        RequiredAttributeElement requiredAttributeInput;
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.requiredAttribute = input;
+        requiredAttributeResult = asRequiredAttribute(ws, &requiredAttributeInput);
+        result = requiredAttributeResult->requiredAttribute;
+        strftime(returnString, 50, "%d", &result);
+        printf( "required attribute=%s\n" , returnString );
+        Axis_Delete_RequiredAttributeElement(requiredAttributeResult, 0);
+    }
+
+/* Optional Attributes currently unsupported by WSDL2Ws
+ * Exact coding of this section may change depending on chosen implementation
+        // Test optional attribute, with a value
+        OptionalAttributeElement optionalAttributeInput;
+        optionalAttributeInput.setoptionalAttribute(input);
+        OptionalAttributeElement* optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%d", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, with data=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, with data=<not present>\n" );
+        delete optionalAttributeResult;
+
+        // Test optional attribute, not present
+        //optionalAttributeInput.setattribute();
+        optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%d", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, not present=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, not present=<not present>\n" );
+        delete optionalAttributeResult;
+*/
+
+    // Test array
+    {
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
+        xsdc__gDay_Array arrayInput;
+        xsdc__gDay_Array* arrayResult;
+        xsdc__gDay * array[ARRAY_SIZE];
+        const xsdc__gDay ** output;
+        
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] = &input;
+                
+        arrayInput.m_Array = array;
+        arrayInput.m_Size  = ARRAY_SIZE;
+        arrayInput.m_Type  = XSDC_GDAY;
+        
+        arrayResult = asArray(ws, &arrayInput);
+
+        if (arrayResult)
+        {
+           output     = arrayResult->m_Array;
+           outputSize = arrayResult->m_Size;
+        }
+    
+        printf("array of %d elements\n" , outputSize );   
+
+        for (i = 0; i < outputSize ; i++)
+        {
+            strftime(returnString, 50, "%d", output[i]);
+            printf( "  element[%d]=%s\n" , i, returnString );
+        }
+        axiscAxisDelete(arrayResult, XSDC_ARRAY);
+    }
+        
+    // Test complex type
+    {
+        SimpleComplexType complexTypeInput;
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.complexTypeElement = input;
+        complexTypeResult = asComplexType(ws, &complexTypeInput);
+        result = complexTypeResult->complexTypeElement;
+        strftime(returnString, 50, "%d", &result);
+        printf( "within complex type=%s\n" , returnString );
+        Axis_Delete_SimpleComplexType(complexTypeResult, 0);
+    }
+
+    // Tests now complete
+
+    destroy_XSD_gDay_stub(ws);
+
+
+    printf( "---------------------- TEST COMPLETE -----------------------------\n");
+   
+    return 0;
+}

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthClient.c?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthClient.c (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthClient.c Tue May  9 19:43:01 2006
@@ -0,0 +1,173 @@
+// 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 <stdlib.h>
+#include <stdio.h>
+
+#include "CommonClientTestCode.h"
+#include "XSD_gMonth.h"
+
+
+int main(int argc, char* argv[])
+{
+    AXISCHANDLE ws;
+    
+    xsdc__gMonth result;
+    xsdc__gMonth input;
+    xsdc__gMonth* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+        
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/XSD_gMonth";
+
+    if(argc>1)
+        url = argv[1];
+
+    sprintf(endpoint, "%s", url);
+    ws = get_XSD_gMonth_stub(endpoint);
+    
+    timeToTest = 1100246323;
+    temp = gmtime(&timeToTest);
+    memcpy(&input, temp, sizeof(struct tm));
+
+    // Test non-nillable element
+    result = asNonNillableElement(ws, input);
+    strftime(returnString, 50, "%b", &result);
+    printf( "non-nillable element=%s\n" , returnString );
+
+    // Test nillable element, with a value
+    nillableResult = asNillableElement(ws, &input);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%b", nillableResult);
+        printf( "nillable element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GMONTH);
+    }
+    else
+        printf( "nillable element=<nil>\n" );
+
+    // Test nillable element, with nil
+    nillableResult = asNillableElement(ws, NULL);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%b", nillableResult);
+        printf( "nil element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GMONTH);
+    }
+    else
+        printf( "nil element=<nil>\n" );
+
+    // Test required attribute
+    {
+        RequiredAttributeElement requiredAttributeInput;
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.requiredAttribute = input;
+        requiredAttributeResult = asRequiredAttribute(ws, &requiredAttributeInput);
+        result = requiredAttributeResult->requiredAttribute;
+        strftime(returnString, 50, "%b", &result);
+        printf( "required attribute=%s\n" , returnString );
+        Axis_Delete_RequiredAttributeElement(requiredAttributeResult, 0);
+    }
+
+/* Optional Attributes currently unsupported by WSDL2Ws
+ * Exact coding of this section may change depending on chosen implementation
+        // Test optional attribute, with a value
+        OptionalAttributeElement optionalAttributeInput;
+        optionalAttributeInput.setoptionalAttribute(input);
+        OptionalAttributeElement* optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%b", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, with data=%s\n" , returnString );
+        }
+        else
+        {
+            printf( "optional attribute, with data=<not present>\n" );
+        }
+        delete optionalAttributeResult;
+
+        // Test optional attribute, not present
+        optionalAttributeInput.setattribute();
+        optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%b", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, not present=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, not present=<not present>\n" );
+        delete optionalAttributeResult;
+*/
+    // Test array
+    {
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
+        xsdc__gMonth_Array arrayInput;
+        xsdc__gMonth_Array* arrayResult;        
+        xsdc__gMonth * array[ARRAY_SIZE];
+        const xsdc__gMonth ** output;
+        
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] = &input;
+                
+        arrayInput.m_Array = array;
+        arrayInput.m_Size  = ARRAY_SIZE;
+        arrayInput.m_Type  = XSDC_GMONTH;
+        
+        arrayResult = asArray(ws, &arrayInput);
+
+        if (arrayResult)
+        {
+           output     = arrayResult->m_Array;
+           outputSize = arrayResult->m_Size;
+        }
+    
+        printf("array of %d elements\n" , outputSize );   
+
+        for (i = 0; i < outputSize ; i++)
+        {
+            strftime(returnString, 50, "%b", output[i]);
+            printf( "  element[%d]=%s\n" , i, returnString );
+        }
+        axiscAxisDelete(arrayResult, XSDC_ARRAY);
+    }
+
+    // Test complex type
+    {
+        SimpleComplexType complexTypeInput;
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.complexTypeElement =input;
+        complexTypeResult = asComplexType(ws, &complexTypeInput);
+        result = complexTypeResult->complexTypeElement;
+        strftime(returnString, 50, "%b", &result);
+        printf( "within complex type=%s\n" , returnString );
+        Axis_Delete_SimpleComplexType(complexTypeResult, 0);
+    }
+
+    // Tests now complete
+
+    destroy_XSD_gMonth_stub(ws);
+
+
+    printf( "---------------------- TEST COMPLETE -----------------------------\n");
+   
+    return 0;
+}

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthDayClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthDayClient.c?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthDayClient.c (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gMonthDayClient.c Tue May  9 19:43:01 2006
@@ -0,0 +1,171 @@
+// 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 <stdlib.h>
+#include <stdio.h>
+
+#include "CommonClientTestCode.h"
+#include "XSD_gMonthDay.h"
+
+
+
+int main(int argc, char* argv[])
+{
+    AXISCHANDLE ws ;
+    
+    xsdc__gMonthDay result;
+    xsdc__gMonthDay input;
+    xsdc__gMonthDay* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+        
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/XSD_gMonthDay";
+
+    if(argc>1)
+        url = argv[1];
+
+    sprintf(endpoint, "%s", url);
+    ws = get_XSD_gMonthDay_stub(endpoint);
+    
+    timeToTest = 1100246323;
+    temp = gmtime(&timeToTest);
+    memcpy(&input, temp, sizeof(struct tm));
+
+    // Test non-nillable element
+    result = asNonNillableElement(ws, input);
+    strftime(returnString, 50, "%b %d", &result);
+    printf( "non-nillable element=%s\n" , returnString );
+
+    // Test nillable element, with a value
+    nillableResult = asNillableElement(ws, &input);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%b %d", nillableResult);
+        printf( "nillable element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GMONTHDAY);
+    }
+    else
+        printf( "nillable element=<nil>\n" );
+
+    // Test nillable element, with nil
+    nillableResult = asNillableElement(ws, NULL);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%b %d", nillableResult);
+        printf( "nil element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GMONTHDAY);
+    }
+    else
+        printf( "nil element=<nil>\n" );
+
+    // Test required attribute
+    {
+        RequiredAttributeElement requiredAttributeInput;
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.requiredAttribute = input;
+        requiredAttributeResult = asRequiredAttribute(ws, &requiredAttributeInput);
+        result = requiredAttributeResult->requiredAttribute;
+        strftime(returnString, 50, "%b %d", &result);
+        printf( "required attribute=%s\n" , returnString );
+        Axis_Delete_RequiredAttributeElement(requiredAttributeResult, 0);
+    }
+
+/* Optional Attributes currently unsupported by WSDL2Ws
+ * Exact coding of this section may change depending on chosen implementation
+        // Test optional attribute, with a value
+        OptionalAttributeElement optionalAttributeInput;
+        optionalAttributeInput.setoptionalAttribute(input);
+        OptionalAttributeElement* optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%b %d", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, with data=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, with data=<not present>\n" );
+        delete optionalAttributeResult;
+
+        // Test optional attribute, not present
+        optionalAttributeInput.setattribute();
+        optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%b %d", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, not present=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, not present=<not present>\n" );
+        delete optionalAttributeResult;
+*/
+    // Test array
+    {
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
+        xsdc__gMonthDay_Array arrayInput;
+        xsdc__gMonthDay_Array* arrayResult;
+        xsdc__gMonthDay * array[ARRAY_SIZE]; 
+        const xsdc__gMonthDay ** output;   
+            
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] = &input;
+                
+        arrayInput.m_Array = array;
+        arrayInput.m_Size  = ARRAY_SIZE;
+        arrayInput.m_Type  = XSDC_GMONTHDAY;
+        
+        arrayResult = asArray(ws, &arrayInput);
+
+        if (arrayResult)
+        {
+           output     = arrayResult->m_Array;
+           outputSize = arrayResult->m_Size;
+        }
+    
+        printf("array of %d elements\n" , outputSize );   
+
+        for (i = 0; i < outputSize ; i++)
+        {
+            strftime(returnString, 50, "%b %d", output[i]);
+            printf( "  element[%d]=%s\n" , i, returnString );
+        }
+        axiscAxisDelete(arrayResult, XSDC_ARRAY);
+    }
+
+    // Test complex type
+    {
+        SimpleComplexType complexTypeInput;
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.complexTypeElement =input;
+        complexTypeResult = asComplexType(ws, &complexTypeInput);
+        result = complexTypeResult->complexTypeElement;
+        strftime(returnString, 50, "%b %d", &result);
+        printf( "within complex type=%s\n" , returnString );
+        Axis_Delete_SimpleComplexType(complexTypeResult, 0);
+    }
+
+    // Tests now complete
+
+    destroy_XSD_gMonthDay_stub(ws);
+
+    printf( "---------------------- TEST COMPLETE -----------------------------\n");
+   
+    return 0;
+}

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearClient.c?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearClient.c (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearClient.c Tue May  9 19:43:01 2006
@@ -0,0 +1,172 @@
+// 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 <stdlib.h>
+#include <stdio.h>
+
+#include "CommonClientTestCode.h"
+#include "XSD_gYear.h"
+
+
+int main(int argc, char* argv[])
+{
+    AXISCHANDLE ws;
+    
+    xsdc__gYear result;
+    xsdc__gYear input;
+    xsdc__gYear* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+        
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/XSD_gYear";
+
+    if(argc>1)
+        url = argv[1];
+
+    sprintf(endpoint, "%s", url);
+    ws = get_XSD_gYear_stub(endpoint);
+
+    timeToTest = 1100246323;
+    temp = gmtime(&timeToTest);
+    memcpy(&input, temp, sizeof(struct tm));
+
+    // Test non-nillable element
+    result = asNonNillableElement(ws, input);
+    strftime(returnString, 50, "%Y", &result);
+    printf( "non-nillable element=%s\n" , returnString );
+
+    // Test nillable element, with a value
+    nillableResult = asNillableElement(ws, &input);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%Y", nillableResult);
+        printf( "nillable element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GYEAR);
+    }
+    else
+        printf( "nillable element=<nil>\n" );
+
+    // Test nillable element, with nil
+    nillableResult = asNillableElement(ws, NULL);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%Y", nillableResult);
+        printf( "nil element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GYEAR);
+    }
+    else
+        printf( "nil element=<nil>\n" );
+
+    // Test required attribute
+    {
+        RequiredAttributeElement requiredAttributeInput;
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.requiredAttribute = input;
+        requiredAttributeResult = asRequiredAttribute(ws, &requiredAttributeInput);
+        result = requiredAttributeResult->requiredAttribute;
+        strftime(returnString, 50, "%Y", &result);
+        printf( "required attribute=%s\n" , returnString );
+        Axis_Delete_RequiredAttributeElement(requiredAttributeResult, 0);
+    }
+
+/* Optional Attributes currently unsupported by WSDL2Ws
+ * Exact coding of this section may change depending on chosen implementation
+        // Test optional attribute, with a value
+        OptionalAttributeElement optionalAttributeInput;
+        optionalAttributeInput.setoptionalAttribute(input);
+        OptionalAttributeElement* optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%Y", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, with data=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, with data=<not present>\n" );
+        delete optionalAttributeResult;
+
+        // Test optional attribute, not present
+        optionalAttributeInput.setattribute();
+        optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%Y", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, not present=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, not present=<not present>\n" );
+        delete optionalAttributeResult;
+*/
+    // Test array
+    {
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
+        xsdc__gYear_Array arrayInput;
+        xsdc__gYear_Array* arrayResult;
+        xsdc__gYear * array[ARRAY_SIZE];
+        const xsdc__gYear **output;
+        
+        for (i=0 ; i < 2 ; i++)
+            array[i] = &input;
+                
+        arrayInput.m_Array = array;
+        arrayInput.m_Size  = ARRAY_SIZE;
+        arrayInput.m_Type  = XSDC_GYEAR;
+        
+        arrayResult = asArray(ws, &arrayInput);
+
+        if (arrayResult)
+        {
+           output     = arrayResult->m_Array;
+           outputSize = arrayResult->m_Size;
+        }
+    
+        printf("array of %d elements\n" , outputSize );   
+
+        for (i = 0; i < outputSize ; i++)
+        {
+            strftime(returnString, 50, "%Y", output[i]);
+            printf( "  element[%d]=%s\n" , i, returnString );
+        }
+        axiscAxisDelete(arrayResult, XSDC_ARRAY);
+    }
+
+
+    // Test complex type
+    {
+        SimpleComplexType complexTypeInput;
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.complexTypeElement =input;
+        complexTypeResult = asComplexType(ws, &complexTypeInput);
+        result = complexTypeResult->complexTypeElement;
+        strftime(returnString, 50, "%Y", &result);
+        printf( "within complex type=%s\n" , returnString );
+        Axis_Delete_SimpleComplexType(complexTypeResult, 0);
+    }
+
+    // Tests now complete
+    destroy_XSD_gYear_stub(ws);
+
+
+    printf( "---------------------- TEST COMPLETE -----------------------------\n");
+   
+    return 0;
+}

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearMonthClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearMonthClient.c?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearMonthClient.c (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_gYearMonthClient.c Tue May  9 19:43:01 2006
@@ -0,0 +1,171 @@
+// 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 <stdlib.h>
+#include <stdio.h>
+
+#include "CommonClientTestCode.h"
+#include "XSD_gYearMonth.h"
+
+
+int main(int argc, char* argv[])
+{
+    AXISCHANDLE ws;
+    
+    xsdc__gYearMonth result;
+    xsdc__gYearMonth input;
+    xsdc__gYearMonth* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+    
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/XSD_gYearMonth";
+
+    if(argc>1)
+        url = argv[1];
+
+    sprintf(endpoint, "%s", url);
+    ws = get_XSD_gYearMonth_stub(endpoint);
+
+    timeToTest = 1100246323;
+    temp = gmtime(&timeToTest);
+    memcpy(&input, temp, sizeof(struct tm));
+
+    // Test non-nillable element
+    result = asNonNillableElement(ws, input);
+    strftime(returnString, 50, "%b %Y", &result);
+    printf( "non-nillable element=%s\n" , returnString );
+
+    // Test nillable element, with a value
+    nillableResult = asNillableElement(ws, &input);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%b %Y", nillableResult);
+        printf( "nillable element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GYEARMONTH);
+    }
+    else
+        printf( "nillable element=<nil>\n" );
+
+    // Test nillable element, with nil
+    nillableResult = asNillableElement(ws, NULL);
+    if (nillableResult)
+    {
+        strftime(returnString, 50, "%b %Y", nillableResult);
+        printf( "nil element=%s\n" , returnString );
+        axiscAxisDelete(nillableResult, XSDC_GYEARMONTH);
+    }
+    else
+        printf( "nil element=<nil>\n" );
+
+    // Test required attribute
+    {
+        RequiredAttributeElement requiredAttributeInput;
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.requiredAttribute = input;
+        requiredAttributeResult = asRequiredAttribute(ws, &requiredAttributeInput);
+        result = requiredAttributeResult->requiredAttribute;
+        strftime(returnString, 50, "%b %Y", &result);
+        printf( "required attribute=%s\n" , returnString );
+        Axis_Delete_RequiredAttributeElement(requiredAttributeResult, 0);
+    }
+
+/* Optional Attributes currently unsupported by WSDL2Ws
+ * Exact coding of this section may change depending on chosen implementation
+        // Test optional attribute, with a value
+        OptionalAttributeElement optionalAttributeInput;
+        optionalAttributeInput.setoptionalAttribute(input);
+        OptionalAttributeElement* optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%b %Y", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, with data=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, with data=<not present>\n" );
+        delete optionalAttributeResult;
+
+        // Test optional attribute, not present
+        optionalAttributeInput.setattribute();
+        optionalAttributeResult = asOptionalAttribute(&optionalAttributeInput);
+        if (optionalAttributeResult->getoptionalAttribute())
+        {
+            strftime(returnString, 50, "%b %Y", optionalAttributeResult->getoptionalAttribute());
+            printf( "optional attribute, not present=%s\n" , returnString );
+        }
+        else
+            printf( "optional attribute, not present=<not present>\n" );
+        delete optionalAttributeResult;
+*/
+    // Test array
+    {
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
+        xsdc__gYearMonth_Array arrayInput;
+        xsdc__gYearMonth_Array* arrayResult;
+        xsdc__gYearMonth * array[ARRAY_SIZE];
+        const xsdc__gYearMonth **output;
+        
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] = &input;
+                
+        arrayInput.m_Array = array;
+        arrayInput.m_Size  = ARRAY_SIZE;
+        arrayInput.m_Type  = XSDC_GYEARMONTH;
+        
+        arrayResult = asArray(ws, &arrayInput);
+
+        if (arrayResult)
+        {
+           output     = arrayResult->m_Array;
+           outputSize = arrayResult->m_Size;
+        }
+    
+        printf("array of %d elements\n" , outputSize );   
+
+        for (i = 0; i < outputSize ; i++)
+        {
+            strftime(returnString, 50, "%b %Y", output[i]);
+            printf( "  element[%d]=%s\n" , i, returnString );
+        }
+
+        axiscAxisDelete(arrayResult, XSDC_ARRAY);
+    }
+
+
+    // Test complex type
+    {
+        SimpleComplexType complexTypeInput;
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.complexTypeElement = input;
+        complexTypeResult = asComplexType(ws, &complexTypeInput);
+        result = complexTypeResult->complexTypeElement;
+        strftime(returnString, 50, "%b %Y", &result);
+        printf( "within complex type=%s\n" , returnString );
+        Axis_Delete_SimpleComplexType(complexTypeResult, 0);
+    }
+
+    // Tests now complete
+    destroy_XSD_gYearMonth_stub(ws);
+
+    printf( "---------------------- TEST COMPLETE -----------------------------\n");
+   
+    return 0;
+}

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gDayClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gDayClient.cpp?rev=405600&r1=405599&r2=405600&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gDayClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gDayClient.cpp Tue May  9 19:43:01 2006
@@ -14,6 +14,15 @@
 // limitations under the License.
 
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* CHANGES TO THIS FILE MAY ALSO REQUIRE CHANGES TO THE               */
+/* C-EQUIVALENT FILE. PLEASE ENSURE THAT IT IS DONE.                  */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
 #include "XSD_gDay.hpp"
 #include <axis/AxisException.hpp>
 #include <ctype.h>
@@ -22,6 +31,16 @@
 
 int main(int argc, char* argv[])
 {
+    XSD_gDay* ws;
+    
+    xsd__gDay result;
+    xsd__gDay input;
+    xsd__gDay* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+    
     char endpoint[256];
     const char* url="http://localhost:80/axis/XSD_gDay";
 
@@ -31,24 +50,19 @@
     try
     {
         sprintf(endpoint, "%s", url);
-        XSD_gDay* ws = new XSD_gDay(endpoint);
-
-        char returnString[50];
+        ws = new XSD_gDay(endpoint);
         
-        time_t timeToTest = 1100246323;
-        struct tm *temp = gmtime(&timeToTest);
-        struct tm time;
-        memcpy(&time, temp, sizeof(struct tm));
+        timeToTest = 1100246323;
+        temp = gmtime(&timeToTest);
+        memcpy(&input, temp, sizeof(struct tm));
 
         // Test non-nillable element
-        xsd__gDay result = ws->asNonNillableElement(time);
+        result = ws->asNonNillableElement(input);
         strftime(returnString, 50, "%d", &result);
         cout << "non-nillable element=" << returnString << endl;
 
         // Test nillable element, with a value
-        xsd__gDay* nillableInput = new xsd__gDay();
-        *(nillableInput) = time;
-        xsd__gDay* nillableResult = ws->asNillableElement(nillableInput);
+        nillableResult = ws->asNillableElement(&input);
         if (nillableResult)
         {
             strftime(returnString, 50, "%d", nillableResult);
@@ -56,10 +70,7 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nillable element=<nil>" << endl;
-        }
-        delete nillableInput;
 
         // Test nillable element, with nil
         nillableResult = ws->asNillableElement(NULL);
@@ -70,14 +81,14 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nil element=<nil>" << endl;
-        }
 
         // Test required attribute
         RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(time);
-        RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.setrequiredAttribute(input);
+        requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
         result = requiredAttributeResult->getrequiredAttribute();
         strftime(returnString, 50, "%d", &result);
         cout << "required attribute=" << returnString << endl;
@@ -87,7 +98,7 @@
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(time);
+        optionalAttributeInput.setoptionalAttribute(input);
         OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
         if (optionalAttributeResult->getoptionalAttribute())
         {
@@ -95,9 +106,7 @@
             cout << "optional attribute, with data=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, with data=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 
         // Test optional attribute, not present
@@ -109,45 +118,43 @@
             cout << "optional attribute, not present=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, not present=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 */
 
         // Test array
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
         xsd__gDay_Array arrayInput;
-                int arraySize=2;
-                xsd__gDay ** array = new xsd__gDay*[arraySize];
+        xsd__gDay_Array* arrayResult;
+        xsd__gDay * array[ARRAY_SIZE];
+        const xsd__gDay ** output;
         
-        for (int inputIndex=0 ; inputIndex < 2 ; inputIndex++)
-        {
-            array[inputIndex] = new xsd__gDay(time);
-           
-        }
-                arrayInput.set(array,arraySize);
-        xsd__gDay_Array* arrayResult = ws->asArray(&arrayInput);
-                int outputSize=0;
-                const xsd__gDay ** output = arrayResult->get(outputSize);
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] = new xsd__gDay(input);
+        arrayInput.set(array,ARRAY_SIZE);
+        
+        arrayResult = ws->asArray(&arrayInput);
+        if (arrayResult)
+            output = arrayResult->get(outputSize);
         cout << "array of " << outputSize << " elements" << endl;
-        for (int index = 0; index < outputSize ; index++)
+        for (i = 0; i < outputSize ; i++)
         {
-            strftime(returnString, 50, "%d", output[index]);
-            cout << "  element[" << index << "]=" << returnString << endl;
-           
+            strftime(returnString, 50, "%d", output[i]);
+            cout << "  element[" << i << "]=" << returnString << endl;
         }
         // Clear up input array        
-        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
-        {
-            delete array[deleteIndex];
-        }
-        delete [] array;
+        for (i = 0 ; i < ARRAY_SIZE ; i++ )
+            delete array[i];
         delete arrayResult;
 
         // Test complex type
         SimpleComplexType complexTypeInput;
-        complexTypeInput.setcomplexTypeElement(time);
-        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.setcomplexTypeElement(input);
+        complexTypeResult = ws->asComplexType(&complexTypeInput);
         result = complexTypeResult->getcomplexTypeElement();
         strftime(returnString, 50, "%d", &result);
         cout << "within complex type=" << returnString << endl;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthClient.cpp?rev=405600&r1=405599&r2=405600&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthClient.cpp Tue May  9 19:43:01 2006
@@ -14,6 +14,15 @@
 // limitations under the License.
 
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* CHANGES TO THIS FILE MAY ALSO REQUIRE CHANGES TO THE               */
+/* C-EQUIVALENT FILE. PLEASE ENSURE THAT IT IS DONE.                  */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
 #include "XSD_gMonth.hpp"
 #include <axis/AxisException.hpp>
 #include <ctype.h>
@@ -22,6 +31,16 @@
 
 int main(int argc, char* argv[])
 {
+    XSD_gMonth* ws;
+    
+    xsd__gMonth result;
+    xsd__gMonth input;
+    xsd__gMonth* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+        
     char endpoint[256];
     const char* url="http://localhost:80/axis/XSD_gMonth";
 
@@ -31,24 +50,19 @@
     try
     {
         sprintf(endpoint, "%s", url);
-        XSD_gMonth* ws = new XSD_gMonth(endpoint);
-
-        char returnString[50];
+        ws = new XSD_gMonth(endpoint);
         
-        time_t timeToTest = 1100246323;
-        struct tm *temp = gmtime(&timeToTest);
-        struct tm time;
-        memcpy(&time, temp, sizeof(struct tm));
+        timeToTest = 1100246323;
+        temp = gmtime(&timeToTest);
+        memcpy(&input, temp, sizeof(struct tm));
 
         // Test non-nillable element
-        xsd__gMonth result = ws->asNonNillableElement(time);
+        result = ws->asNonNillableElement(input);
         strftime(returnString, 50, "%b", &result);
         cout << "non-nillable element=" << returnString << endl;
 
         // Test nillable element, with a value
-        xsd__gMonth* nillableInput = new xsd__gMonth();
-        *(nillableInput) = time;
-        xsd__gMonth* nillableResult = ws->asNillableElement(nillableInput);
+        nillableResult = ws->asNillableElement(&input);
         if (nillableResult)
         {
             strftime(returnString, 50, "%b", nillableResult);
@@ -56,10 +70,7 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nillable element=<nil>" << endl;
-        }
-        delete nillableInput;
 
         // Test nillable element, with nil
         nillableResult = ws->asNillableElement(NULL);
@@ -70,14 +81,14 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nil element=<nil>" << endl;
-        }
 
         // Test required attribute
         RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(time);
-        RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.setrequiredAttribute(input);
+        requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
         result = requiredAttributeResult->getrequiredAttribute();
         strftime(returnString, 50, "%b", &result);
         cout << "required attribute=" << returnString << endl;
@@ -87,7 +98,7 @@
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(time);
+        optionalAttributeInput.setoptionalAttribute(input);
         OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
         if (optionalAttributeResult->getoptionalAttribute())
         {
@@ -109,43 +120,43 @@
             cout << "optional attribute, not present=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, not present=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 */
         // Test array
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
         xsd__gMonth_Array arrayInput;
-                int arraySize =2;
-                xsd__gMonth ** array = new xsd__gMonth*[arraySize];
+        xsd__gMonth_Array* arrayResult;        
+        xsd__gMonth * array[ARRAY_SIZE];
+        const xsd__gMonth ** output;
         
-        for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++)
-        {
-            array[inputIndex] = new xsd__gMonth(time);
-           
-        }
-                arrayInput.set(array,arraySize);
-        xsd__gMonth_Array* arrayResult = ws->asArray(&arrayInput);
-                int outputSize = 0;
-                const xsd__gMonth ** output = arrayResult->get(outputSize);
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] = new xsd__gMonth(input);
+        arrayInput.set(array,ARRAY_SIZE);
+        
+        arrayResult = ws->asArray(&arrayInput);
+        
+        if (arrayResult)
+           output = arrayResult->get(outputSize);
         cout << "array of " << outputSize << " elements" << endl;
-        for (int index = 0; index < outputSize ; index++)
+        for (i = 0; i < outputSize ; i++)
         {
-            strftime(returnString, 50, "%b", output[index]);
-            cout << "  element[" << index << "]=" << returnString << endl;            
+            strftime(returnString, 50, "%b", output[i]);
+            cout << "  element[" << i << "]=" << returnString << endl;            
         }
         // Clear up input array        
-        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
-        {
-            delete array[deleteIndex];
-        }
-        delete [] array;
+        for (i = 0 ; i < ARRAY_SIZE ; i++ )
+            delete array[i];
         delete arrayResult;
 
         // Test complex type
         SimpleComplexType complexTypeInput;
-        complexTypeInput.setcomplexTypeElement(time);
-        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.setcomplexTypeElement(input);
+        complexTypeResult = ws->asComplexType(&complexTypeInput);
         result = complexTypeResult->getcomplexTypeElement();
         strftime(returnString, 50, "%b", &result);
         cout << "within complex type=" << returnString << endl;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthDayClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthDayClient.cpp?rev=405600&r1=405599&r2=405600&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthDayClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gMonthDayClient.cpp Tue May  9 19:43:01 2006
@@ -14,6 +14,15 @@
 // limitations under the License.
 
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* CHANGES TO THIS FILE MAY ALSO REQUIRE CHANGES TO THE               */
+/* C-EQUIVALENT FILE. PLEASE ENSURE THAT IT IS DONE.                  */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
 #include "XSD_gMonthDay.hpp"
 #include <axis/AxisException.hpp>
 #include <ctype.h>
@@ -22,6 +31,16 @@
 
 int main(int argc, char* argv[])
 {
+    XSD_gMonthDay* ws ;
+    
+    xsd__gMonthDay result;
+    xsd__gMonthDay input;
+    xsd__gMonthDay* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+        
     char endpoint[256];
     const char* url="http://localhost:80/axis/XSD_gMonthDay";
 
@@ -31,24 +50,19 @@
     try
     {
         sprintf(endpoint, "%s", url);
-        XSD_gMonthDay* ws = new XSD_gMonthDay(endpoint);
-
-        char returnString[50];
+        ws = new XSD_gMonthDay(endpoint);
         
-        time_t timeToTest = 1100246323;
-        struct tm *temp = gmtime(&timeToTest);
-        struct tm time;
-        memcpy(&time, temp, sizeof(struct tm));
+        timeToTest = 1100246323;
+        temp = gmtime(&timeToTest);
+        memcpy(&input, temp, sizeof(struct tm));
 
         // Test non-nillable element
-        xsd__gMonthDay result = ws->asNonNillableElement(time);
+        result = ws->asNonNillableElement(input);
         strftime(returnString, 50, "%b %d", &result);
         cout << "non-nillable element=" << returnString << endl;
 
         // Test nillable element, with a value
-        xsd__gMonthDay* nillableInput = new xsd__gMonthDay();
-        *(nillableInput) = time;
-        xsd__gMonthDay* nillableResult = ws->asNillableElement(nillableInput);
+        nillableResult = ws->asNillableElement(&input);
         if (nillableResult)
         {
             strftime(returnString, 50, "%b %d", nillableResult);
@@ -56,10 +70,7 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nillable element=<nil>" << endl;
-        }
-        delete nillableInput;
 
         // Test nillable element, with nil
         nillableResult = ws->asNillableElement(NULL);
@@ -70,14 +81,14 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nil element=<nil>" << endl;
-        }
 
         // Test required attribute
         RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(time);
-        RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.setrequiredAttribute(input);
+        requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
         result = requiredAttributeResult->getrequiredAttribute();
         strftime(returnString, 50, "%b %d", &result);
         cout << "required attribute=" << returnString << endl;
@@ -87,7 +98,7 @@
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(time);
+        optionalAttributeInput.setoptionalAttribute(input);
         OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
         if (optionalAttributeResult->getoptionalAttribute())
         {
@@ -95,9 +106,7 @@
             cout << "optional attribute, with data=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, with data=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 
         // Test optional attribute, not present
@@ -109,43 +118,43 @@
             cout << "optional attribute, not present=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, not present=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 */
         // Test array
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
         xsd__gMonthDay_Array arrayInput;
-                int arraySize = 2;
-                xsd__gMonthDay ** array = new xsd__gMonthDay*[arraySize];        
-        for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++)
-        {
-            array[inputIndex] = new xsd__gMonthDay(time);
+        xsd__gMonthDay_Array* arrayResult;
+        xsd__gMonthDay * array[ARRAY_SIZE]; 
+        const xsd__gMonthDay ** output;   
             
-        }
-                arrayInput.set(array,arraySize);
-        xsd__gMonthDay_Array* arrayResult = ws->asArray(&arrayInput);
-                int outputSize = 0;
-                const xsd__gMonthDay ** output = arrayResult->get(outputSize);
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] = new xsd__gMonthDay(input);
+        arrayInput.set(array,ARRAY_SIZE);
+        
+        arrayResult = ws->asArray(&arrayInput);
+        
+        if (arrayResult)
+            output = arrayResult->get(outputSize);
         cout << "array of " << outputSize << " elements" << endl;
-        for (int index = 0; index < outputSize ; index++)
+        for (i = 0; i < outputSize ; i++)
         {
-            strftime(returnString, 50, "%b %d", output[index]);
-            cout << "  element[" << index << "]=" << returnString << endl;
-            
+            strftime(returnString, 50, "%b %d", output[i]);
+            cout << "  element[" << i << "]=" << returnString << endl;
         }
         // Clear up input array        
-        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
-        {
-            delete array[deleteIndex];
-        }
-        delete [] array;
+        for (i = 0 ; i < ARRAY_SIZE ; i++ )
+            delete array[i];
         delete arrayResult;
 
         // Test complex type
         SimpleComplexType complexTypeInput;
-        complexTypeInput.setcomplexTypeElement(time);
-        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.setcomplexTypeElement(input);
+        complexTypeResult = ws->asComplexType(&complexTypeInput);
         result = complexTypeResult->getcomplexTypeElement();
         strftime(returnString, 50, "%b %d", &result);
         cout << "within complex type=" << returnString << endl;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearClient.cpp?rev=405600&r1=405599&r2=405600&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearClient.cpp Tue May  9 19:43:01 2006
@@ -14,6 +14,15 @@
 // limitations under the License.
 
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* CHANGES TO THIS FILE MAY ALSO REQUIRE CHANGES TO THE               */
+/* C-EQUIVALENT FILE. PLEASE ENSURE THAT IT IS DONE.                  */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
 #include "XSD_gYear.hpp"
 #include <axis/AxisException.hpp>
 #include <ctype.h>
@@ -22,6 +31,16 @@
 
 int main(int argc, char* argv[])
 {
+    XSD_gYear* ws;
+    
+    xsd__gYear result;
+    xsd__gYear input;
+    xsd__gYear* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+        
     char endpoint[256];
     const char* url="http://localhost:80/axis/XSD_gYear";
 
@@ -31,24 +50,19 @@
     try
     {
         sprintf(endpoint, "%s", url);
-        XSD_gYear* ws = new XSD_gYear(endpoint);
+        ws = new XSD_gYear(endpoint);
 
-        char returnString[50];
-        
-        time_t timeToTest = 1100246323;
-        struct tm *temp = gmtime(&timeToTest);
-        struct tm time;
-        memcpy(&time, temp, sizeof(struct tm));
+        timeToTest = 1100246323;
+        temp = gmtime(&timeToTest);
+        memcpy(&input, temp, sizeof(struct tm));
 
         // Test non-nillable element
-        xsd__gYear result = ws->asNonNillableElement(time);
+        xsd__gYear result = ws->asNonNillableElement(input);
         strftime(returnString, 50, "%Y", &result);
         cout << "non-nillable element=" << returnString << endl;
 
         // Test nillable element, with a value
-        xsd__gYear* nillableInput = new xsd__gYear();
-        *(nillableInput) = time;
-        xsd__gYear* nillableResult = ws->asNillableElement(nillableInput);
+        nillableResult = ws->asNillableElement(&input);
         if (nillableResult)
         {
             strftime(returnString, 50, "%Y", nillableResult);
@@ -56,10 +70,7 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nillable element=<nil>" << endl;
-        }
-        delete nillableInput;
 
         // Test nillable element, with nil
         nillableResult = ws->asNillableElement(NULL);
@@ -70,14 +81,14 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nil element=<nil>" << endl;
-        }
 
         // Test required attribute
         RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(time);
-        RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.setrequiredAttribute(input);
+        requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
         result = requiredAttributeResult->getrequiredAttribute();
         strftime(returnString, 50, "%Y", &result);
         cout << "required attribute=" << returnString << endl;
@@ -87,7 +98,7 @@
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(time);
+        optionalAttributeInput.setoptionalAttribute(input);
         OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
         if (optionalAttributeResult->getoptionalAttribute())
         {
@@ -95,9 +106,7 @@
             cout << "optional attribute, with data=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, with data=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 
         // Test optional attribute, not present
@@ -109,45 +118,44 @@
             cout << "optional attribute, not present=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, not present=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 */
         // Test array
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
         xsd__gYear_Array arrayInput;
-                int arraySize = 2;
-                xsd__gYear ** array = new xsd__gYear*[arraySize];
+        xsd__gYear_Array* arrayResult;
+        xsd__gYear * array[ARRAY_SIZE];
+        const xsd__gYear **output;
         
-        for (int inputIndex=0 ; inputIndex < 2 ; inputIndex++)
-        {
-            array[inputIndex] = new xsd__gYear(time);
-            
-        }
-                arrayInput.set(array,arraySize);
-        xsd__gYear_Array* arrayResult = ws->asArray(&arrayInput);
-                int outputSize = 0;
-                const xsd__gYear **output = arrayResult->get(outputSize);
+        for (i=0 ; i < 2 ; i++)
+            array[i] = new xsd__gYear(input);
+        arrayInput.set(array,ARRAY_SIZE);
+        
+        arrayResult = ws->asArray(&arrayInput);
+
+        if (arrayResult)
+            output = arrayResult->get(outputSize);
         cout << "array of " << outputSize << " elements" << endl;
-        for (int index = 0; index < outputSize ; index++)
+        for (i = 0; i < outputSize ; i++)
         {
-            strftime(returnString, 50, "%Y", output[index]);
-            cout << "  element[" << index << "]=" << returnString << endl;
-            
+            strftime(returnString, 50, "%Y", output[i]);
+            cout << "  element[" << i << "]=" << returnString << endl;
         }
         // Clear up input array        
-        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
-        {
-            delete array[deleteIndex];
-        }
-        delete [] array;
+        for (i = 0 ; i < ARRAY_SIZE ; i++ )
+            delete array[i];
         delete arrayResult;
 
 
         // Test complex type
         SimpleComplexType complexTypeInput;
-        complexTypeInput.setcomplexTypeElement(time);
-        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.setcomplexTypeElement(input);
+        complexTypeResult = ws->asComplexType(&complexTypeInput);
         result = complexTypeResult->getcomplexTypeElement();
         strftime(returnString, 50, "%Y", &result);
         cout << "within complex type=" << returnString << endl;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearMonthClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearMonthClient.cpp?rev=405600&r1=405599&r2=405600&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearMonthClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_gYearMonthClient.cpp Tue May  9 19:43:01 2006
@@ -14,6 +14,15 @@
 // limitations under the License.
 
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* ----------------------------------------------------------------   */
+/* CHANGES TO THIS FILE MAY ALSO REQUIRE CHANGES TO THE               */
+/* C-EQUIVALENT FILE. PLEASE ENSURE THAT IT IS DONE.                  */
+/* ----------------------------------------------------------------   */
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE   */
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
 #include "XSD_gYearMonth.hpp"
 #include <axis/AxisException.hpp>
 #include <ctype.h>
@@ -22,6 +31,16 @@
 
 int main(int argc, char* argv[])
 {
+    XSD_gYearMonth* ws;
+    
+    xsd__gYearMonth result;
+    xsd__gYearMonth input;
+    xsd__gYearMonth* nillableResult;
+    
+    char returnString[50];
+    time_t timeToTest;
+    struct tm *temp;
+    
     char endpoint[256];
     const char* url="http://localhost:80/axis/XSD_gYearMonth";
 
@@ -31,24 +50,19 @@
     try
     {
         sprintf(endpoint, "%s", url);
-        XSD_gYearMonth* ws = new XSD_gYearMonth(endpoint);
+        ws = new XSD_gYearMonth(endpoint);
 
-        char returnString[50];
-        
-        time_t timeToTest = 1100246323;
-        struct tm *temp = gmtime(&timeToTest);
-        struct tm time;
-        memcpy(&time, temp, sizeof(struct tm));
+        timeToTest = 1100246323;
+        temp = gmtime(&timeToTest);
+        memcpy(&input, temp, sizeof(struct tm));
 
         // Test non-nillable element
-        xsd__gYearMonth result = ws->asNonNillableElement(time);
+        result = ws->asNonNillableElement(input);
         strftime(returnString, 50, "%b %Y", &result);
         cout << "non-nillable element=" << returnString << endl;
 
         // Test nillable element, with a value
-        xsd__gYearMonth* nillableInput = new xsd__gYearMonth();
-        *(nillableInput) = time;
-        xsd__gYearMonth* nillableResult = ws->asNillableElement(nillableInput);
+        nillableResult = ws->asNillableElement(&input);
         if (nillableResult)
         {
             strftime(returnString, 50, "%b %Y", nillableResult);
@@ -56,10 +70,7 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nillable element=<nil>" << endl;
-        }
-        delete nillableInput;
 
         // Test nillable element, with nil
         nillableResult = ws->asNillableElement(NULL);
@@ -70,14 +81,14 @@
             delete nillableResult;
         }
         else
-        {
             cout << "nil element=<nil>" << endl;
-        }
 
         // Test required attribute
         RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(time);
-        RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
+        RequiredAttributeElement* requiredAttributeResult;
+        
+        requiredAttributeInput.setrequiredAttribute(input);
+        requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
         result = requiredAttributeResult->getrequiredAttribute();
         strftime(returnString, 50, "%b %Y", &result);
         cout << "required attribute=" << returnString << endl;
@@ -87,7 +98,7 @@
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(time);
+        optionalAttributeInput.setoptionalAttribute(input);
         OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
         if (optionalAttributeResult->getoptionalAttribute())
         {
@@ -95,9 +106,7 @@
             cout << "optional attribute, with data=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, with data=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 
         // Test optional attribute, not present
@@ -109,45 +118,44 @@
             cout << "optional attribute, not present=" << returnString << endl;
         }
         else
-        {
             cout << "optional attribute, not present=<not present>" << endl;
-        }
         delete optionalAttributeResult;
 */
         // Test array
+#define ARRAY_SIZE 2                    
+        int i, outputSize=0;
+                
         xsd__gYearMonth_Array arrayInput;
-                int arraySize =2;
-                xsd__gYearMonth ** array = new xsd__gYearMonth*[arraySize];
+        xsd__gYearMonth_Array* arrayResult;
+        xsd__gYearMonth * array[ARRAY_SIZE];
+        const xsd__gYearMonth **output;
         
-        for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++)
-        {
-            array[inputIndex] =new xsd__gYearMonth(time);
-            
-        }
-                arrayInput.set(array,arraySize);
-        xsd__gYearMonth_Array* arrayResult = ws->asArray(&arrayInput);
-                int outputSize = 0;
-                const xsd__gYearMonth **output = arrayResult->get(outputSize);
+        for (i=0 ; i < ARRAY_SIZE ; i++)
+            array[i] =new xsd__gYearMonth(input);
+        arrayInput.set(array,ARRAY_SIZE);
+        
+        arrayResult = ws->asArray(&arrayInput);
+
+        if (arrayResult)
+           output = arrayResult->get(outputSize);
         cout << "array of " << outputSize << " elements" << endl;
-        for (int index = 0; index < outputSize ; index++)
-        {
-            strftime(returnString, 50, "%b %Y", output[index]);
-            cout << "  element[" << index << "]=" << returnString << endl;
-           
-        }
-       // Clear up input array        
-        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
+        for (i = 0; i < outputSize ; i++)
         {
-            delete array[deleteIndex];
+            strftime(returnString, 50, "%b %Y", output[i]);
+            cout << "  element[" << i << "]=" << returnString << endl;
         }
-        delete [] array;
+        // Clear up input array        
+        for (i = 0 ; i < ARRAY_SIZE ; i++ )
+            delete array[i];
         delete arrayResult;
 
 
         // Test complex type
         SimpleComplexType complexTypeInput;
-        complexTypeInput.setcomplexTypeElement(time);
-        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
+        SimpleComplexType* complexTypeResult;
+        
+        complexTypeInput.setcomplexTypeElement(input);
+        complexTypeResult = ws->asComplexType(&complexTypeInput);
         result = complexTypeResult->getcomplexTypeElement();
         strftime(returnString, 50, "%b %Y", &result);
         cout << "within complex type=" << returnString << endl;

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gDayC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gDayC.xml?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gDayC.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gDayC.xml Tue May  9 19:43:01 2006
@@ -0,0 +1,17 @@
+<test>
+    <name>XSD_gDayC</name>
+    <description>Test serialization and deserialization of the XSD built-in simple type gDay</description>
+    <clientLang>c</clientLang>
+    <clientCode>XSD_gDayClient.c</clientCode>
+    <wsdl>XSD_gDay.wsdl</wsdl>
+    <expected>
+        <output>
+            XSD_gDay.expected
+        </output>
+		<serverResponse>
+			XSD_gDay_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/XSD_gDay</endpoint>
+</test>
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthC.xml?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthC.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthC.xml Tue May  9 19:43:01 2006
@@ -0,0 +1,17 @@
+<test>
+    <name>XSD_gMonthC</name>
+    <description>Test serialization and deserialization of the XSD built-in simple type gMonth</description>
+    <clientLang>c</clientLang>
+    <clientCode>XSD_gMonthClient.c</clientCode>
+    <wsdl>XSD_gMonth.wsdl</wsdl>
+    <expected>
+        <output>
+            XSD_gMonth.expected
+        </output>
+		<serverResponse>
+			XSD_gMonth_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/XSD_gMonth</endpoint>
+</test>
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthDayC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthDayC.xml?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthDayC.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gMonthDayC.xml Tue May  9 19:43:01 2006
@@ -0,0 +1,17 @@
+<test>
+    <name>XSD_gMonthDayC</name>
+    <description>Test serialization and deserialization of the XSD built-in simple type gMonthDay</description>
+    <clientLang>c</clientLang>
+    <clientCode>XSD_gMonthDayClient.c</clientCode>
+    <wsdl>XSD_gMonthDay.wsdl</wsdl>
+    <expected>
+        <output>
+            XSD_gMonthDay.expected
+        </output>
+		<serverResponse>
+			XSD_gMonthDay_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/XSD_gMonthDay</endpoint>
+</test>
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearC.xml?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearC.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearC.xml Tue May  9 19:43:01 2006
@@ -0,0 +1,17 @@
+<test>
+    <name>XSD_gYearC</name>
+    <description>Test serialization and deserialization of the XSD built-in simple type gYear</description>
+    <clientLang>c</clientLang>
+    <clientCode>XSD_gYearClient.c</clientCode>
+    <wsdl>XSD_gYear.wsdl</wsdl>
+    <expected>
+        <output>
+            XSD_gYear.expected
+        </output>
+		<serverResponse>
+			XSD_gYear_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/XSD_gYear</endpoint>
+</test>
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearMonthC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearMonthC.xml?rev=405600&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearMonthC.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_gYearMonthC.xml Tue May  9 19:43:01 2006
@@ -0,0 +1,17 @@
+<test>
+    <name>XSD_gYearMonthC</name>
+    <description>Test serialization and deserialization of the XSD built-in simple type gYearMonth</description>
+    <clientLang>c</clientLang>
+    <clientCode>XSD_gYearMonthClient.c</clientCode>
+    <wsdl>XSD_gYearMonth.wsdl</wsdl>
+    <expected>
+        <output>
+            XSD_gYearMonth.expected
+        </output>
+		<serverResponse>
+			XSD_gYearMonth_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/XSD_gYearMonth</endpoint>
+</test>
+