axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: ws-axis/c/tests/auto_build/testcases/client/cpp XSDElementNilClient.cpp XSD_dateClient.cpp XSD_dateTimeClient.cpp XSD_gDayClient.cpp XSD_gMonthClient.cpp XSD_gMonthDayClient.cpp XSD_gYearClient.cpp XSD_gYearMonthClient.cpp XSD_timeClient.cpp
Date Tue, 05 Jul 2005 14:50:31 GMT
dicka       2005/07/05 07:50:30

  Modified:    c/src/soap/xsd NonPositiveInteger.cpp
               c/tests/auto_build/testcases/client/cpp
                        XSDElementNilClient.cpp XSD_dateClient.cpp
                        XSD_dateTimeClient.cpp XSD_gDayClient.cpp
                        XSD_gMonthClient.cpp XSD_gMonthDayClient.cpp
                        XSD_gYearClient.cpp XSD_gYearMonthClient.cpp
                        XSD_timeClient.cpp
  Log:
  Resolve some minor compilation problems in the new xsd testcases, which have been highlighted by the nightly builds.
  
  PR: AXISCPP-715, AXISCPP-653
  Submitted by: Adrian Dick
  
  Revision  Changes    Path
  1.10      +1 -1      ws-axis/c/src/soap/xsd/NonPositiveInteger.cpp
  
  Index: NonPositiveInteger.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/xsd/NonPositiveInteger.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- NonPositiveInteger.cpp	4 Jul 2005 16:43:58 -0000	1.9
  +++ NonPositiveInteger.cpp	5 Jul 2005 14:50:30 -0000	1.10
  @@ -199,7 +199,7 @@
       if (*value == 0)
       {
           serializedValue[0] = '0';
  -		serializedValue[1] = NULL;
  +		serializedValue[1] = 0;
       }
       else
       {
  
  
  
  1.9       +8 -0      ws-axis/c/tests/auto_build/testcases/client/cpp/XSDElementNilClient.cpp
  
  Index: XSDElementNilClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSDElementNilClient.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSDElementNilClient.cpp	23 Mar 2005 15:45:06 -0000	1.8
  +++ XSDElementNilClient.cpp	5 Jul 2005 14:50:30 -0000	1.9
  @@ -55,6 +55,14 @@
       os << buf;
       return os;
     }
  +
  +  std::ostream& operator<<(std::ostream& os, unsigned __int64 i )
  +  {
  +    char buf[20];
  +    sprintf(buf,"%I64u", i );
  +    os << buf;
  +    return os;
  +  }
   #endif
   
   int main(int argc, char* argv[])
  
  
  
  1.2       +80 -80    ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_dateClient.cpp
  
  Index: XSD_dateClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_dateClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_dateClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_dateClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -22,18 +22,16 @@
   
   int main(int argc, char* argv[])
   {
  -   char endpoint[256];
  -   const char* url="http://localhost:80/axis/XSD_date";
  +    char endpoint[256];
  +    const char* url="http://localhost:80/axis/XSD_date";
   
       if(argc>1)
           url = argv[1];
   
  -      // bool bSuccess = false;
  -
  -   try
  -   {
  -     sprintf(endpoint, "%s", url);
  -     XSD_date* ws = new XSD_date(endpoint);
  +    try
  +    {
  +        sprintf(endpoint, "%s", url);
  +        XSD_date* ws = new XSD_date(endpoint);
   
           char returnString[50];
           
  @@ -42,80 +40,81 @@
           struct tm time;
           memcpy(&time, temp, sizeof(struct tm));
   
  -       // Test non-nillable element
  -      xsd__date result = ws->asNonNillableElement(time);
  +        // Test non-nillable element
  +        xsd__date result = ws->asNonNillableElement(time);
           strftime(returnString, 50, "%a %b %d %Y", &result);
  -      cout << "non-nillable element=" << returnString << endl;
  +        cout << "non-nillable element=" << returnString << endl;
   
           // Test nillable element, with a value
           xsd__date* nillableInput = new xsd__date();
  -       *(nillableInput) = time;
  -      xsd__date* nillableResult = ws->asNillableElement(nillableInput);
  -     if (nillableResult)
  -       {
  +        *(nillableInput) = time;
  +        xsd__date* nillableResult = ws->asNillableElement(nillableInput);
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%a %b %d %Y", nillableResult);
               cout << "nillable element=" << returnString << endl;
  -          delete nillableResult;
  +            delete nillableResult;
           }
  -     else
  -      {
  -         cout << "nillable element=<nil>" << endl;
  -     }
  -       delete nillableInput;
  +        else
  +        {
  +            cout << "nillable element=<nil>" << endl;
  +        }
  +        delete nillableInput;
   
  -     // Test nillable element, with nil
  +        // Test nillable element, with nil
           nillableResult = ws->asNillableElement(NULL);
  -     if (nillableResult)
  -       {
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%a %b %d %Y", nillableResult);
               cout << "nil element=" << returnString << endl;
  -           delete nillableResult;
  +            delete nillableResult;
  +        }
  +        else
  +        {
  +            cout << "nil element=<nil>" << endl;
           }
  -     else
  -      {
  -         cout << "nil element=<nil>" << endl;
  -      }
   
  -       // Test required attribute
  +        // Test required attribute
           RequiredAttributeElement requiredAttributeInput;
  -      requiredAttributeInput.setrequiredAttribute(time);
  +        requiredAttributeInput.setrequiredAttribute(time);
           RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -     strftime(returnString, 50, "%a %b %d %Y", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +        strftime(returnString, 50, "%a %b %d %Y", &result);
           cout << "required attribute=" << returnString << endl;
  -       delete requiredAttributeResult;
  +        delete requiredAttributeResult;
   
   /* 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(time);
  +        OptionalAttributeElement optionalAttributeInput;
  +        optionalAttributeInput.setoptionalAttribute(time);
           OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -     if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%a %b %d %Y", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, with data=" << returnString << endl;
  -     }
  -     else
  -      {
  -         cout << "optional attribute, with data=<not present>" << endl;
  -        }
  -     delete optionalAttributeResult;
  -
  -     // Test optional attribute, not present
  -       //optionalAttributeInput.setattribute();
  -      optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -       if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +            cout << "optional attribute, with data=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, with data=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
  +
  +        // Test optional attribute, not present
  +        optionalAttributeInput.setattribute();
  +        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%a %b %d %Y", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, not present=" << returnString << endl;
  -       }
  -     else
  -      {
  -         cout << "optional attribute, not present=<not present>" << endl;
  -      }
  -     delete optionalAttributeResult;
  +            cout << "optional attribute, not present=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, not present=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
   */
  -       // Test array
  +        // Test array
           xsd__date_Array arrayInput;
           arrayInput.m_Array = new xsd__date*[2];
           xsd__date * array = new xsd__date[2];
  @@ -125,10 +124,10 @@
               array[inputIndex] = time;
               arrayInput.m_Array[inputIndex] = &array[inputIndex];
           }
  -     xsd__date_Array arrayResult = ws->asArray(arrayInput);
  +        xsd__date_Array arrayResult = ws->asArray(arrayInput);
           cout << "array of " << arrayResult.m_Size << " elements" << endl;
  -     for (int index = 0; index < arrayResult.m_Size ; index++)
  -     {
  +        for (int index = 0; index < arrayResult.m_Size ; index++)
  +        {
               strftime(returnString, 50, "%a %b %d %Y", arrayResult.m_Array[index]);
               cout << "  element[" << index << "]=" << returnString << endl;
               delete arrayResult.m_Array[index];
  @@ -137,32 +136,33 @@
           delete [] arrayInput.m_Array;
           delete [] arrayResult.m_Array;
   
  -      // Test complex type
  -      SimpleComplexType complexTypeInput;
  -       complexTypeInput.setcomplexTypeElement(time);
  -     SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%a %b %d %Y", &(complexTypeResult->getcomplexTypeElement()));
  -      cout << "within complex type=" << returnString << endl;
  -       delete complexTypeResult;
  +        // Test complex type
  +        SimpleComplexType complexTypeInput;
  +        complexTypeInput.setcomplexTypeElement(time);
  +        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%a %b %d %Y", &result);
  +        cout << "within complex type=" << returnString << endl;
  +        delete complexTypeResult;
   
          // Tests now complete
   
          delete ws;
       }
  - catch(AxisException& e)
  -   {
  -     cout << "Exception : " << e.what() << endl;
  -   }
  - catch(exception& e)
  -   {
  -     cout << "Unknown exception has occured: " << e.what() << endl;
  +    catch(AxisException& e)
  +    {
  +        cout << "Exception : " << e.what() << endl;
  +    }
  +    catch(exception& e)
  +    {
  +        cout << "Unknown exception has occured: " << e.what() << endl;
       }
  - catch(...)
  +    catch(...)
       {
  -     cout << "Unknown exception has occured" << endl;
  -  }
  +        cout << "Unknown exception has occured" << endl;
  +    }
   
  -   cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
  +    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
      
  -  return 0;
  +    return 0;
   }
  
  
  
  1.2       +4 -2      ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_dateTimeClient.cpp
  
  Index: XSD_dateTimeClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_dateTimeClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_dateTimeClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_dateTimeClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -80,7 +80,8 @@
   		RequiredAttributeElement requiredAttributeInput;
   		requiredAttributeInput.setrequiredAttribute(time);
   		RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -		strftime(returnString, 50, "%a %b %d %H:%M:%S %Y", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +		strftime(returnString, 50, "%a %b %d %H:%M:%S %Y", &result);
           cout << "required attribute=" << returnString << endl;
   		delete requiredAttributeResult;
   
  @@ -141,7 +142,8 @@
   		SimpleComplexType complexTypeInput;
   		complexTypeInput.setcomplexTypeElement(time);
   		SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%a %b %d %H:%M:%S %Y", &(complexTypeResult->getcomplexTypeElement()));
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%a %b %d %H:%M:%S %Y", &result);
   		cout << "within complex type=" << returnString << endl;
   		delete complexTypeResult;
   
  
  
  
  1.2       +82 -82    ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gDayClient.cpp
  
  Index: XSD_gDayClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gDayClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_gDayClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_gDayClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -22,18 +22,16 @@
   
   int main(int argc, char* argv[])
   {
  -   char endpoint[256];
  -   const char* url="http://localhost:80/axis/XSD_gDay";
  +    char endpoint[256];
  +    const char* url="http://localhost:80/axis/XSD_gDay";
   
       if(argc>1)
           url = argv[1];
   
  -      // bool bSuccess = false;
  -
  -   try
  -   {
  -     sprintf(endpoint, "%s", url);
  -     XSD_gDay* ws = new XSD_gDay(endpoint);
  +    try
  +    {
  +        sprintf(endpoint, "%s", url);
  +        XSD_gDay* ws = new XSD_gDay(endpoint);
   
           char returnString[50];
           
  @@ -42,80 +40,81 @@
           struct tm time;
           memcpy(&time, temp, sizeof(struct tm));
   
  -       // Test non-nillable element
  -      xsd__gDay result = ws->asNonNillableElement(time);
  +        // Test non-nillable element
  +        xsd__gDay result = ws->asNonNillableElement(time);
           strftime(returnString, 50, "%d", &result);
  -      cout << "non-nillable element=" << returnString << endl;
  +        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);
  -     if (nillableResult)
  -       {
  +        *(nillableInput) = time;
  +        xsd__gDay* nillableResult = ws->asNillableElement(nillableInput);
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%d", nillableResult);
               cout << "nillable element=" << returnString << endl;
  -          delete nillableResult;
  +            delete nillableResult;
           }
  -     else
  -      {
  -         cout << "nillable element=<nil>" << endl;
  -     }
  -       delete nillableInput;
  +        else
  +        {
  +            cout << "nillable element=<nil>" << endl;
  +        }
  +        delete nillableInput;
   
  -     // Test nillable element, with nil
  +        // Test nillable element, with nil
           nillableResult = ws->asNillableElement(NULL);
  -     if (nillableResult)
  -       {
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%d", nillableResult);
               cout << "nil element=" << returnString << endl;
  -           delete nillableResult;
  +            delete nillableResult;
  +        }
  +        else
  +        {
  +            cout << "nil element=<nil>" << endl;
           }
  -     else
  -      {
  -         cout << "nil element=<nil>" << endl;
  -      }
   
  -       // Test required attribute
  +        // Test required attribute
           RequiredAttributeElement requiredAttributeInput;
  -      requiredAttributeInput.setrequiredAttribute(time);
  +        requiredAttributeInput.setrequiredAttribute(time);
           RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -     strftime(returnString, 50, "%d", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +        strftime(returnString, 50, "%d", &result);
           cout << "required attribute=" << returnString << endl;
  -       delete requiredAttributeResult;
  +        delete requiredAttributeResult;
   
   /* 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(time);
  +        OptionalAttributeElement optionalAttributeInput;
  +        optionalAttributeInput.setoptionalAttribute(time);
           OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -     if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%d", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, with data=" << returnString << endl;
  -     }
  -     else
  -      {
  -         cout << "optional attribute, with data=<not present>" << endl;
  -        }
  -     delete optionalAttributeResult;
  -
  -     // Test optional attribute, not present
  -       //optionalAttributeInput.setattribute();
  -      optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -       if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +            cout << "optional attribute, with data=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, with data=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
  +
  +        // Test optional attribute, not present
  +        //optionalAttributeInput.setattribute();
  +        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%d", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, not present=" << returnString << endl;
  -       }
  -     else
  -      {
  -         cout << "optional attribute, not present=<not present>" << endl;
  -      }
  -     delete optionalAttributeResult;
  +            cout << "optional attribute, not present=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, not present=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
   */
  -       // Test array
  +        // Test array
           xsd__gDay_Array arrayInput;
           arrayInput.m_Array = new xsd__gDay*[2];
           xsd__gDay * array = new xsd__gDay[2];
  @@ -125,10 +124,10 @@
               array[inputIndex] = time;
               arrayInput.m_Array[inputIndex] = &array[inputIndex];
           }
  -     xsd__gDay_Array arrayResult = ws->asArray(arrayInput);
  +        xsd__gDay_Array arrayResult = ws->asArray(arrayInput);
           cout << "array of " << arrayResult.m_Size << " elements" << endl;
  -     for (int index = 0; index < arrayResult.m_Size ; index++)
  -     {
  +        for (int index = 0; index < arrayResult.m_Size ; index++)
  +        {
               strftime(returnString, 50, "%d", arrayResult.m_Array[index]);
               cout << "  element[" << index << "]=" << returnString << endl;
               delete arrayResult.m_Array[index];
  @@ -137,32 +136,33 @@
           delete [] arrayInput.m_Array;
           delete [] arrayResult.m_Array;
   
  -      // Test complex type
  -      SimpleComplexType complexTypeInput;
  -       complexTypeInput.setcomplexTypeElement(time);
  -     SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%d", &(complexTypeResult->getcomplexTypeElement()));
  -      cout << "within complex type=" << returnString << endl;
  -       delete complexTypeResult;
  +        // Test complex type
  +        SimpleComplexType complexTypeInput;
  +        complexTypeInput.setcomplexTypeElement(time);
  +        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%d", &result);
  +        cout << "within complex type=" << returnString << endl;
  +        delete complexTypeResult;
   
  -       // Tests now complete
  +        // Tests now complete
   
  -       delete ws;
  +        delete ws;
  +    }
  +    catch(AxisException& e)
  +    {
  +        cout << "Exception : " << e.what() << endl;
       }
  - catch(AxisException& e)
  -   {
  -     cout << "Exception : " << e.what() << endl;
  -   }
  - catch(exception& e)
  -   {
  -     cout << "Unknown exception has occured: " << e.what() << endl;
  +    catch(exception& e)
  +    {
  +        cout << "Unknown exception has occured: " << e.what() << endl;
       }
  - catch(...)
  +    catch(...)
       {
  -     cout << "Unknown exception has occured" << endl;
  -  }
  +        cout << "Unknown exception has occured" << endl;
  +    }
   
  -   cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
  +    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
      
  -  return 0;
  +    return 0;
   }
  
  
  
  1.2       +82 -82    ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gMonthClient.cpp
  
  Index: XSD_gMonthClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gMonthClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_gMonthClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_gMonthClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -22,18 +22,16 @@
   
   int main(int argc, char* argv[])
   {
  -   char endpoint[256];
  -   const char* url="http://localhost:80/axis/XSD_gMonth";
  +    char endpoint[256];
  +    const char* url="http://localhost:80/axis/XSD_gMonth";
   
       if(argc>1)
           url = argv[1];
   
  -      // bool bSuccess = false;
  -
  -   try
  -   {
  -     sprintf(endpoint, "%s", url);
  -     XSD_gMonth* ws = new XSD_gMonth(endpoint);
  +    try
  +    {
  +        sprintf(endpoint, "%s", url);
  +        XSD_gMonth* ws = new XSD_gMonth(endpoint);
   
           char returnString[50];
           
  @@ -42,80 +40,81 @@
           struct tm time;
           memcpy(&time, temp, sizeof(struct tm));
   
  -       // Test non-nillable element
  -      xsd__gMonth result = ws->asNonNillableElement(time);
  +        // Test non-nillable element
  +        xsd__gMonth result = ws->asNonNillableElement(time);
           strftime(returnString, 50, "%b", &result);
  -      cout << "non-nillable element=" << returnString << endl;
  +        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);
  -     if (nillableResult)
  -       {
  +        *(nillableInput) = time;
  +        xsd__gMonth* nillableResult = ws->asNillableElement(nillableInput);
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%b", nillableResult);
               cout << "nillable element=" << returnString << endl;
  -          delete nillableResult;
  +            delete nillableResult;
           }
  -     else
  -      {
  -         cout << "nillable element=<nil>" << endl;
  -     }
  -       delete nillableInput;
  +        else
  +        {
  +            cout << "nillable element=<nil>" << endl;
  +        }
  +        delete nillableInput;
   
  -     // Test nillable element, with nil
  +        // Test nillable element, with nil
           nillableResult = ws->asNillableElement(NULL);
  -     if (nillableResult)
  -       {
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%b", nillableResult);
               cout << "nil element=" << returnString << endl;
  -           delete nillableResult;
  +            delete nillableResult;
  +        }
  +        else
  +        {
  +            cout << "nil element=<nil>" << endl;
           }
  -     else
  -      {
  -         cout << "nil element=<nil>" << endl;
  -      }
   
  -       // Test required attribute
  +        // Test required attribute
           RequiredAttributeElement requiredAttributeInput;
  -      requiredAttributeInput.setrequiredAttribute(time);
  +        requiredAttributeInput.setrequiredAttribute(time);
           RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -     strftime(returnString, 50, "%b", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +        strftime(returnString, 50, "%b", &result);
           cout << "required attribute=" << returnString << endl;
  -       delete requiredAttributeResult;
  +        delete requiredAttributeResult;
   
   /* 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(time);
  +        OptionalAttributeElement optionalAttributeInput;
  +        optionalAttributeInput.setoptionalAttribute(time);
           OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -     if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%b", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, with data=" << returnString << endl;
  -     }
  -     else
  -      {
  -         cout << "optional attribute, with data=<not present>" << endl;
  -        }
  -     delete optionalAttributeResult;
  -
  -     // Test optional attribute, not present
  -       //optionalAttributeInput.setattribute();
  -      optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -       if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +            cout << "optional attribute, with data=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, with data=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
  +
  +        // Test optional attribute, not present
  +        optionalAttributeInput.setattribute();
  +        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%b", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, not present=" << returnString << endl;
  -       }
  -     else
  -      {
  -         cout << "optional attribute, not present=<not present>" << endl;
  -      }
  -     delete optionalAttributeResult;
  +            cout << "optional attribute, not present=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, not present=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
   */
  -       // Test array
  +        // Test array
           xsd__gMonth_Array arrayInput;
           arrayInput.m_Array = new xsd__gMonth*[2];
           xsd__gMonth * array = new xsd__gMonth[2];
  @@ -125,10 +124,10 @@
               array[inputIndex] = time;
               arrayInput.m_Array[inputIndex] = &array[inputIndex];
           }
  -     xsd__gMonth_Array arrayResult = ws->asArray(arrayInput);
  +        xsd__gMonth_Array arrayResult = ws->asArray(arrayInput);
           cout << "array of " << arrayResult.m_Size << " elements" << endl;
  -     for (int index = 0; index < arrayResult.m_Size ; index++)
  -     {
  +        for (int index = 0; index < arrayResult.m_Size ; index++)
  +        {
               strftime(returnString, 50, "%b", arrayResult.m_Array[index]);
               cout << "  element[" << index << "]=" << returnString << endl;
               delete arrayResult.m_Array[index];
  @@ -137,32 +136,33 @@
           delete [] arrayInput.m_Array;
           delete [] arrayResult.m_Array;
   
  -      // Test complex type
  -      SimpleComplexType complexTypeInput;
  -       complexTypeInput.setcomplexTypeElement(time);
  -     SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%b", &(complexTypeResult->getcomplexTypeElement()));
  -      cout << "within complex type=" << returnString << endl;
  -       delete complexTypeResult;
  +        // Test complex type
  +        SimpleComplexType complexTypeInput;
  +        complexTypeInput.setcomplexTypeElement(time);
  +        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%b", &result);
  +        cout << "within complex type=" << returnString << endl;
  +        delete complexTypeResult;
   
  -       // Tests now complete
  +        // Tests now complete
   
  -       delete ws;
  +        delete ws;
  +    }
  +    catch(AxisException& e)
  +    {
  +        cout << "Exception : " << e.what() << endl;
       }
  - catch(AxisException& e)
  -   {
  -     cout << "Exception : " << e.what() << endl;
  -   }
  - catch(exception& e)
  -   {
  -     cout << "Unknown exception has occured: " << e.what() << endl;
  +    catch(exception& e)
  +    {
  +        cout << "Unknown exception has occured: " << e.what() << endl;
       }
  - catch(...)
  +    catch(...)
       {
  -     cout << "Unknown exception has occured" << endl;
  -  }
  +        cout << "Unknown exception has occured" << endl;
  +    }
   
  -   cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
  +    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
      
  -  return 0;
  +    return 0;
   }
  
  
  
  1.2       +82 -82    ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gMonthDayClient.cpp
  
  Index: XSD_gMonthDayClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gMonthDayClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_gMonthDayClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_gMonthDayClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -22,18 +22,16 @@
   
   int main(int argc, char* argv[])
   {
  -   char endpoint[256];
  -   const char* url="http://localhost:80/axis/XSD_gMonthDay";
  +    char endpoint[256];
  +    const char* url="http://localhost:80/axis/XSD_gMonthDay";
   
       if(argc>1)
           url = argv[1];
   
  -      // bool bSuccess = false;
  -
  -   try
  -   {
  -     sprintf(endpoint, "%s", url);
  -     XSD_gMonthDay* ws = new XSD_gMonthDay(endpoint);
  +    try
  +    {
  +        sprintf(endpoint, "%s", url);
  +        XSD_gMonthDay* ws = new XSD_gMonthDay(endpoint);
   
           char returnString[50];
           
  @@ -42,80 +40,81 @@
           struct tm time;
           memcpy(&time, temp, sizeof(struct tm));
   
  -       // Test non-nillable element
  -      xsd__gMonthDay result = ws->asNonNillableElement(time);
  +        // Test non-nillable element
  +        xsd__gMonthDay result = ws->asNonNillableElement(time);
           strftime(returnString, 50, "%b %d", &result);
  -      cout << "non-nillable element=" << returnString << endl;
  +        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);
  -     if (nillableResult)
  -       {
  +        *(nillableInput) = time;
  +        xsd__gMonthDay* nillableResult = ws->asNillableElement(nillableInput);
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%b %d", nillableResult);
               cout << "nillable element=" << returnString << endl;
  -          delete nillableResult;
  +            delete nillableResult;
           }
  -     else
  -      {
  -         cout << "nillable element=<nil>" << endl;
  -     }
  -       delete nillableInput;
  +        else
  +        {
  +            cout << "nillable element=<nil>" << endl;
  +        }
  +        delete nillableInput;
   
  -     // Test nillable element, with nil
  +        // Test nillable element, with nil
           nillableResult = ws->asNillableElement(NULL);
  -     if (nillableResult)
  -       {
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%b %d", nillableResult);
               cout << "nil element=" << returnString << endl;
  -           delete nillableResult;
  +            delete nillableResult;
  +        }
  +        else
  +        {
  +            cout << "nil element=<nil>" << endl;
           }
  -     else
  -      {
  -         cout << "nil element=<nil>" << endl;
  -      }
   
  -       // Test required attribute
  +        // Test required attribute
           RequiredAttributeElement requiredAttributeInput;
  -      requiredAttributeInput.setrequiredAttribute(time);
  +        requiredAttributeInput.setrequiredAttribute(time);
           RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -     strftime(returnString, 50, "%b %d", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +        strftime(returnString, 50, "%b %d", &result);
           cout << "required attribute=" << returnString << endl;
  -       delete requiredAttributeResult;
  +        delete requiredAttributeResult;
   
   /* 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(time);
  +        OptionalAttributeElement optionalAttributeInput;
  +        optionalAttributeInput.setoptionalAttribute(time);
           OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -     if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%b %d", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, with data=" << returnString << endl;
  -     }
  -     else
  -      {
  -         cout << "optional attribute, with data=<not present>" << endl;
  -        }
  -     delete optionalAttributeResult;
  -
  -     // Test optional attribute, not present
  -       //optionalAttributeInput.setattribute();
  -      optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -       if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +            cout << "optional attribute, with data=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, with data=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
  +
  +        // Test optional attribute, not present
  +        optionalAttributeInput.setattribute();
  +        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%b %d", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, not present=" << returnString << endl;
  -       }
  -     else
  -      {
  -         cout << "optional attribute, not present=<not present>" << endl;
  -      }
  -     delete optionalAttributeResult;
  +            cout << "optional attribute, not present=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, not present=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
   */
  -       // Test array
  +        // Test array
           xsd__gMonthDay_Array arrayInput;
           arrayInput.m_Array = new xsd__gMonthDay*[2];
           xsd__gMonthDay * array = new xsd__gMonthDay[2];
  @@ -125,10 +124,10 @@
               array[inputIndex] = time;
               arrayInput.m_Array[inputIndex] = &array[inputIndex];
           }
  -     xsd__gMonthDay_Array arrayResult = ws->asArray(arrayInput);
  +        xsd__gMonthDay_Array arrayResult = ws->asArray(arrayInput);
           cout << "array of " << arrayResult.m_Size << " elements" << endl;
  -     for (int index = 0; index < arrayResult.m_Size ; index++)
  -     {
  +        for (int index = 0; index < arrayResult.m_Size ; index++)
  +        {
               strftime(returnString, 50, "%b %d", arrayResult.m_Array[index]);
               cout << "  element[" << index << "]=" << returnString << endl;
               delete arrayResult.m_Array[index];
  @@ -137,32 +136,33 @@
           delete [] arrayInput.m_Array;
           delete [] arrayResult.m_Array;
   
  -      // Test complex type
  -      SimpleComplexType complexTypeInput;
  -       complexTypeInput.setcomplexTypeElement(time);
  -     SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%b %d", &(complexTypeResult->getcomplexTypeElement()));
  -      cout << "within complex type=" << returnString << endl;
  -       delete complexTypeResult;
  +        // Test complex type
  +        SimpleComplexType complexTypeInput;
  +        complexTypeInput.setcomplexTypeElement(time);
  +        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%b %d", &result);
  +        cout << "within complex type=" << returnString << endl;
  +        delete complexTypeResult;
   
  -       // Tests now complete
  +        // Tests now complete
   
  -       delete ws;
  +        delete ws;
  +    }
  +    catch(AxisException& e)
  +    {
  +        cout << "Exception : " << e.what() << endl;
       }
  - catch(AxisException& e)
  -   {
  -     cout << "Exception : " << e.what() << endl;
  -   }
  - catch(exception& e)
  -   {
  -     cout << "Unknown exception has occured: " << e.what() << endl;
  +    catch(exception& e)
  +    {
  +        cout << "Unknown exception has occured: " << e.what() << endl;
       }
  - catch(...)
  +    catch(...)
       {
  -     cout << "Unknown exception has occured" << endl;
  -  }
  +        cout << "Unknown exception has occured" << endl;
  +    }
   
  -   cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
  +    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
      
  -  return 0;
  +    return 0;
   }
  
  
  
  1.2       +82 -82    ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gYearClient.cpp
  
  Index: XSD_gYearClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gYearClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_gYearClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_gYearClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -22,18 +22,16 @@
   
   int main(int argc, char* argv[])
   {
  -   char endpoint[256];
  -   const char* url="http://localhost:80/axis/XSD_gYear";
  +    char endpoint[256];
  +    const char* url="http://localhost:80/axis/XSD_gYear";
   
       if(argc>1)
           url = argv[1];
   
  -      // bool bSuccess = false;
  -
  -   try
  -   {
  -     sprintf(endpoint, "%s", url);
  -     XSD_gYear* ws = new XSD_gYear(endpoint);
  +    try
  +    {
  +        sprintf(endpoint, "%s", url);
  +        XSD_gYear* ws = new XSD_gYear(endpoint);
   
           char returnString[50];
           
  @@ -42,80 +40,81 @@
           struct tm time;
           memcpy(&time, temp, sizeof(struct tm));
   
  -       // Test non-nillable element
  -      xsd__gYear result = ws->asNonNillableElement(time);
  +        // Test non-nillable element
  +        xsd__gYear result = ws->asNonNillableElement(time);
           strftime(returnString, 50, "%Y", &result);
  -      cout << "non-nillable element=" << returnString << endl;
  +        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);
  -     if (nillableResult)
  -       {
  +        *(nillableInput) = time;
  +        xsd__gYear* nillableResult = ws->asNillableElement(nillableInput);
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%Y", nillableResult);
               cout << "nillable element=" << returnString << endl;
  -          delete nillableResult;
  +            delete nillableResult;
           }
  -     else
  -      {
  -         cout << "nillable element=<nil>" << endl;
  -     }
  -       delete nillableInput;
  +        else
  +        {
  +            cout << "nillable element=<nil>" << endl;
  +        }
  +        delete nillableInput;
   
  -     // Test nillable element, with nil
  +        // Test nillable element, with nil
           nillableResult = ws->asNillableElement(NULL);
  -     if (nillableResult)
  -       {
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%Y", nillableResult);
               cout << "nil element=" << returnString << endl;
  -           delete nillableResult;
  +            delete nillableResult;
  +        }
  +        else
  +        {
  +            cout << "nil element=<nil>" << endl;
           }
  -     else
  -      {
  -         cout << "nil element=<nil>" << endl;
  -      }
   
  -       // Test required attribute
  +        // Test required attribute
           RequiredAttributeElement requiredAttributeInput;
  -      requiredAttributeInput.setrequiredAttribute(time);
  +        requiredAttributeInput.setrequiredAttribute(time);
           RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -     strftime(returnString, 50, "%Y", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +        strftime(returnString, 50, "%Y", &result);
           cout << "required attribute=" << returnString << endl;
  -       delete requiredAttributeResult;
  +        delete requiredAttributeResult;
   
   /* 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(time);
  +        OptionalAttributeElement optionalAttributeInput;
  +        optionalAttributeInput.setoptionalAttribute(time);
           OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -     if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%Y", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, with data=" << returnString << endl;
  -     }
  -     else
  -      {
  -         cout << "optional attribute, with data=<not present>" << endl;
  -        }
  -     delete optionalAttributeResult;
  -
  -     // Test optional attribute, not present
  -      optionalAttributeInput.setattribute();
  -      optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -       if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +            cout << "optional attribute, with data=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, with data=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
  +
  +        // Test optional attribute, not present
  +        optionalAttributeInput.setattribute();
  +        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%Y", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, not present=" << returnString << endl;
  -       }
  -     else
  -      {
  -         cout << "optional attribute, not present=<not present>" << endl;
  -      }
  -     delete optionalAttributeResult;
  +            cout << "optional attribute, not present=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, not present=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
   */
  -       // Test array
  +        // Test array
           xsd__gYear_Array arrayInput;
           arrayInput.m_Array = new xsd__gYear*[2];
           xsd__gYear * array = new xsd__gYear[2];
  @@ -125,10 +124,10 @@
               array[inputIndex] = time;
               arrayInput.m_Array[inputIndex] = &array[inputIndex];
           }
  -     xsd__gYear_Array arrayResult = ws->asArray(arrayInput);
  +        xsd__gYear_Array arrayResult = ws->asArray(arrayInput);
           cout << "array of " << arrayResult.m_Size << " elements" << endl;
  -     for (int index = 0; index < arrayResult.m_Size ; index++)
  -     {
  +        for (int index = 0; index < arrayResult.m_Size ; index++)
  +        {
               strftime(returnString, 50, "%Y", arrayResult.m_Array[index]);
               cout << "  element[" << index << "]=" << returnString << endl;
               delete arrayResult.m_Array[index];
  @@ -137,32 +136,33 @@
           delete [] arrayInput.m_Array;
           delete [] arrayResult.m_Array;
   
  -      // Test complex type
  -      SimpleComplexType complexTypeInput;
  -       complexTypeInput.setcomplexTypeElement(time);
  -     SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%Y", &(complexTypeResult->getcomplexTypeElement()));
  -      cout << "within complex type=" << returnString << endl;
  -       delete complexTypeResult;
  +        // Test complex type
  +        SimpleComplexType complexTypeInput;
  +        complexTypeInput.setcomplexTypeElement(time);
  +        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%Y", &result);
  +        cout << "within complex type=" << returnString << endl;
  +        delete complexTypeResult;
   
  -       // Tests now complete
  +        // Tests now complete
   
  -       delete ws;
  +        delete ws;
  +    }
  +    catch(AxisException& e)
  +    {
  +        cout << "Exception : " << e.what() << endl;
       }
  - catch(AxisException& e)
  -   {
  -     cout << "Exception : " << e.what() << endl;
  -   }
  - catch(exception& e)
  -   {
  -     cout << "Unknown exception has occured: " << e.what() << endl;
  +    catch(exception& e)
  +    {
  +        cout << "Unknown exception has occured: " << e.what() << endl;
       }
  - catch(...)
  +    catch(...)
       {
  -     cout << "Unknown exception has occured" << endl;
  -  }
  +        cout << "Unknown exception has occured" << endl;
  +    }
   
  -   cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
  +    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
      
  -  return 0;
  +    return 0;
   }
  
  
  
  1.2       +82 -82    ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gYearMonthClient.cpp
  
  Index: XSD_gYearMonthClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_gYearMonthClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_gYearMonthClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_gYearMonthClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -22,18 +22,16 @@
   
   int main(int argc, char* argv[])
   {
  -   char endpoint[256];
  -   const char* url="http://localhost:80/axis/XSD_gYearMonth";
  +    char endpoint[256];
  +    const char* url="http://localhost:80/axis/XSD_gYearMonth";
   
       if(argc>1)
           url = argv[1];
   
  -      // bool bSuccess = false;
  -
  -   try
  -   {
  -     sprintf(endpoint, "%s", url);
  -     XSD_gYearMonth* ws = new XSD_gYearMonth(endpoint);
  +    try
  +    {
  +        sprintf(endpoint, "%s", url);
  +        XSD_gYearMonth* ws = new XSD_gYearMonth(endpoint);
   
           char returnString[50];
           
  @@ -42,80 +40,81 @@
           struct tm time;
           memcpy(&time, temp, sizeof(struct tm));
   
  -       // Test non-nillable element
  -      xsd__gYearMonth result = ws->asNonNillableElement(time);
  +        // Test non-nillable element
  +        xsd__gYearMonth result = ws->asNonNillableElement(time);
           strftime(returnString, 50, "%b %Y", &result);
  -      cout << "non-nillable element=" << returnString << endl;
  +        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);
  -     if (nillableResult)
  -       {
  +        *(nillableInput) = time;
  +        xsd__gYearMonth* nillableResult = ws->asNillableElement(nillableInput);
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%b %Y", nillableResult);
               cout << "nillable element=" << returnString << endl;
  -          delete nillableResult;
  +            delete nillableResult;
           }
  -     else
  -      {
  -         cout << "nillable element=<nil>" << endl;
  -     }
  -       delete nillableInput;
  +        else
  +        {
  +            cout << "nillable element=<nil>" << endl;
  +        }
  +        delete nillableInput;
   
  -     // Test nillable element, with nil
  +        // Test nillable element, with nil
           nillableResult = ws->asNillableElement(NULL);
  -     if (nillableResult)
  -       {
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%b %Y", nillableResult);
               cout << "nil element=" << returnString << endl;
  -           delete nillableResult;
  +            delete nillableResult;
  +        }
  +        else
  +        {
  +            cout << "nil element=<nil>" << endl;
           }
  -     else
  -      {
  -         cout << "nil element=<nil>" << endl;
  -      }
   
  -       // Test required attribute
  +        // Test required attribute
           RequiredAttributeElement requiredAttributeInput;
  -      requiredAttributeInput.setrequiredAttribute(time);
  +        requiredAttributeInput.setrequiredAttribute(time);
           RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -     strftime(returnString, 50, "%b %Y", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +        strftime(returnString, 50, "%b %Y", &result);
           cout << "required attribute=" << returnString << endl;
  -       delete requiredAttributeResult;
  +        delete requiredAttributeResult;
   
   /* 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(time);
  +        OptionalAttributeElement optionalAttributeInput;
  +        optionalAttributeInput.setoptionalAttribute(time);
           OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -     if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%b %Y", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, with data=" << returnString << endl;
  -     }
  -     else
  -      {
  -         cout << "optional attribute, with data=<not present>" << endl;
  -        }
  -     delete optionalAttributeResult;
  -
  -     // Test optional attribute, not present
  -       //optionalAttributeInput.setattribute();
  -      optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -       if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +            cout << "optional attribute, with data=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, with data=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
  +
  +        // Test optional attribute, not present
  +        optionalAttributeInput.setattribute();
  +        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%b %Y", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, not present=" << returnString << endl;
  -       }
  -     else
  -      {
  -         cout << "optional attribute, not present=<not present>" << endl;
  -      }
  -     delete optionalAttributeResult;
  +            cout << "optional attribute, not present=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, not present=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
   */
  -       // Test array
  +        // Test array
           xsd__gYearMonth_Array arrayInput;
           arrayInput.m_Array = new xsd__gYearMonth*[2];
           xsd__gYearMonth * array = new xsd__gYearMonth[2];
  @@ -125,10 +124,10 @@
               array[inputIndex] = time;
               arrayInput.m_Array[inputIndex] = &array[inputIndex];
           }
  -     xsd__gYearMonth_Array arrayResult = ws->asArray(arrayInput);
  +        xsd__gYearMonth_Array arrayResult = ws->asArray(arrayInput);
           cout << "array of " << arrayResult.m_Size << " elements" << endl;
  -     for (int index = 0; index < arrayResult.m_Size ; index++)
  -     {
  +        for (int index = 0; index < arrayResult.m_Size ; index++)
  +        {
               strftime(returnString, 50, "%b %Y", arrayResult.m_Array[index]);
               cout << "  element[" << index << "]=" << returnString << endl;
               delete arrayResult.m_Array[index];
  @@ -137,32 +136,33 @@
           delete [] arrayInput.m_Array;
           delete [] arrayResult.m_Array;
   
  -      // Test complex type
  -      SimpleComplexType complexTypeInput;
  -       complexTypeInput.setcomplexTypeElement(time);
  -     SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%b %Y", &(complexTypeResult->getcomplexTypeElement()));
  -      cout << "within complex type=" << returnString << endl;
  -       delete complexTypeResult;
  +        // Test complex type
  +        SimpleComplexType complexTypeInput;
  +        complexTypeInput.setcomplexTypeElement(time);
  +        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%b %Y", &result);
  +        cout << "within complex type=" << returnString << endl;
  +        delete complexTypeResult;
   
  -       // Tests now complete
  +        // Tests now complete
   
  -       delete ws;
  +        delete ws;
  +    }
  +    catch(AxisException& e)
  +    {
  +        cout << "Exception : " << e.what() << endl;
       }
  - catch(AxisException& e)
  -   {
  -     cout << "Exception : " << e.what() << endl;
  -   }
  - catch(exception& e)
  -   {
  -     cout << "Unknown exception has occured: " << e.what() << endl;
  +    catch(exception& e)
  +    {
  +        cout << "Unknown exception has occured: " << e.what() << endl;
       }
  - catch(...)
  +    catch(...)
       {
  -     cout << "Unknown exception has occured" << endl;
  -  }
  +        cout << "Unknown exception has occured" << endl;
  +    }
   
  -   cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
  +    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
      
  -  return 0;
  +    return 0;
   }
  
  
  
  1.2       +81 -81    ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_timeClient.cpp
  
  Index: XSD_timeClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/XSD_timeClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSD_timeClient.cpp	30 Jun 2005 16:26:12 -0000	1.1
  +++ XSD_timeClient.cpp	5 Jul 2005 14:50:30 -0000	1.2
  @@ -22,18 +22,16 @@
   
   int main(int argc, char* argv[])
   {
  -   char endpoint[256];
  -   const char* url="http://localhost:80/axis/XSD_time";
  +    char endpoint[256];
  +    const char* url="http://localhost:80/axis/XSD_time";
   
       if(argc>1)
           url = argv[1];
   
  -      // bool bSuccess = false;
  -
  -   try
  -   {
  -     sprintf(endpoint, "%s", url);
  -     XSD_time* ws = new XSD_time(endpoint);
  +    try
  +    {
  +        sprintf(endpoint, "%s", url);
  +        XSD_time* ws = new XSD_time(endpoint);
   
           char returnString[50];
           
  @@ -42,80 +40,81 @@
           struct tm time;
           memcpy(&time, temp, sizeof(struct tm));
   
  -       // Test non-nillable element
  -      xsd__time result = ws->asNonNillableElement(time);
  +        // Test non-nillable element
  +        xsd__time result = ws->asNonNillableElement(time);
           strftime(returnString, 50, "%H:%M:%S", &result);
  -      cout << "non-nillable element=" << returnString << endl;
  +        cout << "non-nillable element=" << returnString << endl;
   
           // Test nillable element, with a value
           xsd__time* nillableInput = new xsd__time();
  -       *(nillableInput) = time;
  -      xsd__time* nillableResult = ws->asNillableElement(nillableInput);
  -     if (nillableResult)
  -       {
  +        *(nillableInput) = time;
  +        xsd__time* nillableResult = ws->asNillableElement(nillableInput);
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%H:%M:%S", nillableResult);
               cout << "nillable element=" << returnString << endl;
  -          delete nillableResult;
  +            delete nillableResult;
           }
  -     else
  -      {
  -         cout << "nillable element=<nil>" << endl;
  -     }
  -       delete nillableInput;
  +        else
  +        {
  +            cout << "nillable element=<nil>" << endl;
  +        }
  +        delete nillableInput;
   
  -     // Test nillable element, with nil
  +        // Test nillable element, with nil
           nillableResult = ws->asNillableElement(NULL);
  -     if (nillableResult)
  -       {
  +        if (nillableResult)
  +        {
               strftime(returnString, 50, "%H:%M:%S", nillableResult);
               cout << "nil element=" << returnString << endl;
  -           delete nillableResult;
  +            delete nillableResult;
  +        }
  +        else
  +        {
  +            cout << "nil element=<nil>" << endl;
           }
  -     else
  -      {
  -         cout << "nil element=<nil>" << endl;
  -      }
   
  -       // Test required attribute
  +        // Test required attribute
           RequiredAttributeElement requiredAttributeInput;
  -      requiredAttributeInput.setrequiredAttribute(time);
  +        requiredAttributeInput.setrequiredAttribute(time);
           RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
  -     strftime(returnString, 50, "%H:%M:%S", &(requiredAttributeResult->getrequiredAttribute()));
  +        result = requiredAttributeResult->getrequiredAttribute();
  +        strftime(returnString, 50, "%H:%M:%S", &result);
           cout << "required attribute=" << returnString << endl;
  -       delete requiredAttributeResult;
  +        delete requiredAttributeResult;
   
   /* 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(time);
  +        OptionalAttributeElement optionalAttributeInput;
  +        optionalAttributeInput.setoptionalAttribute(time);
           OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -     if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%H:%M:%S", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, with data=" << returnString << endl;
  -     }
  -     else
  -      {
  -         cout << "optional attribute, with data=<not present>" << endl;
  -        }
  -     delete optionalAttributeResult;
  -
  -     // Test optional attribute, not present
  -       //optionalAttributeInput.setattribute();
  -      optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  -       if (optionalAttributeResult->getoptionalAttribute())
  -      {
  +            cout << "optional attribute, with data=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, with data=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
  +
  +        // Test optional attribute, not present
  +        optionalAttributeInput.setattribute();
  +        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
  +        if (optionalAttributeResult->getoptionalAttribute())
  +        {
               strftime(returnString, 50, "%H:%M:%S", optionalAttributeResult->getoptionalAttribute());
  -           cout << "optional attribute, not present=" << returnString << endl;
  -       }
  -     else
  -      {
  -         cout << "optional attribute, not present=<not present>" << endl;
  -      }
  -     delete optionalAttributeResult;
  +            cout << "optional attribute, not present=" << returnString << endl;
  +        }
  +        else
  +        {
  +            cout << "optional attribute, not present=<not present>" << endl;
  +        }
  +        delete optionalAttributeResult;
   */
  -       // Test array
  +        // Test array
           xsd__time_Array arrayInput;
           arrayInput.m_Array = new xsd__time*[2];
           xsd__time * array = new xsd__time[2];
  @@ -125,10 +124,10 @@
               array[inputIndex] = time;
               arrayInput.m_Array[inputIndex] = &array[inputIndex];
           }
  -     xsd__time_Array arrayResult = ws->asArray(arrayInput);
  +        xsd__time_Array arrayResult = ws->asArray(arrayInput);
           cout << "array of " << arrayResult.m_Size << " elements" << endl;
  -     for (int index = 0; index < arrayResult.m_Size ; index++)
  -     {
  +        for (int index = 0; index < arrayResult.m_Size ; index++)
  +        {
               strftime(returnString, 50, "%H:%M:%S", arrayResult.m_Array[index]);
               cout << "  element[" << index << "]=" << returnString << endl;
               delete arrayResult.m_Array[index];
  @@ -137,32 +136,33 @@
           delete [] arrayInput.m_Array;
           delete [] arrayResult.m_Array;
   
  -      // Test complex type
  -      SimpleComplexType complexTypeInput;
  -       complexTypeInput.setcomplexTypeElement(time);
  -     SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  -        strftime(returnString, 50, "%H:%M:%S", &(complexTypeResult->getcomplexTypeElement()));
  -      cout << "within complex type=" << returnString << endl;
  -       delete complexTypeResult;
  +        // Test complex type
  +        SimpleComplexType complexTypeInput;
  +        complexTypeInput.setcomplexTypeElement(time);
  +        SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
  +        result = complexTypeResult->getcomplexTypeElement();
  +        strftime(returnString, 50, "%H:%M:%S", &result);
  +        cout << "within complex type=" << returnString << endl;
  +        delete complexTypeResult;
   
  -       // Tests now complete
  +        // Tests now complete
   
          delete ws;
       }
  - catch(AxisException& e)
  -   {
  -     cout << "Exception : " << e.what() << endl;
  -   }
  - catch(exception& e)
  -   {
  -     cout << "Unknown exception has occured: " << e.what() << endl;
  +    catch(AxisException& e)
  +    {
  +        cout << "Exception : " << e.what() << endl;
  +    }
  +    catch(exception& e)
  +    {
  +        cout << "Unknown exception has occured: " << e.what() << endl;
       }
  - catch(...)
  +    catch(...)
       {
  -     cout << "Unknown exception has occured" << endl;
  -  }
  +        cout << "Unknown exception has occured" << endl;
  +    }
   
  -   cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
  +    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
      
  -  return 0;
  +    return 0;
   }
  
  
  

Mime
View raw message