You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2006/05/20 05:02:10 UTC

svn commit: r407945 - in /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp: SimpleArrayDocClient.cpp SimpleArraysClient.cpp SimpleXSDAnyClient.cpp

Author: nadiramra
Date: Fri May 19 20:02:09 2006
New Revision: 407945

URL: http://svn.apache.org/viewvc?rev=407945&view=rev
Log:
C support fixes/enhancements. Cleanup C++ testcase for porting to C.

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArraysClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleXSDAnyClient.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp?rev=407945&r1=407944&r2=407945&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp Fri May 19 20:02:09 2006
@@ -15,6 +15,15 @@
 
 // ArrayClient.cpp : Defines the entry point for the console application.i
 //
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* 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 <string>
 using namespace std;
 
@@ -26,67 +35,56 @@
 
 int main(int argc, char* argv[])
 {
-        int x;
-        char buffer1[100];
-        char endpoint[256];
-        const char* url="http://localhost:80/axis/MathOps";
-        const char* server="localhost";
-        const char* port="80";
-        url = argv[1];
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    int x;
+    char buffer1[100];
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/MathOps";
+    const char* server="localhost";
+    const char* port="80";
+    url = argv[1];
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
 
-                do
-                {
+    do
+    {
         try
         {
-                sprintf(endpoint, "%s", url);
-                ArrayTestPortType ws(endpoint);
-                //testing echoIntArray
-                intArrayType arrin;
-                intArrayType* arrout;
-                xsd__int_Array arrayInput;              
-        int ** array= new int*[ARRAYSIZE];              
-                for (x=0;x<ARRAYSIZE;x++)
-                {
-            array[x] = new int(x + 1000);
-                        //arrin.intItem.m_Array[x] = &intArray[x];
-                }
-                arrayInput.set(array,ARRAYSIZE);
-                arrin.setintItem(&arrayInput);          
-                cout << "invoking echoIntArray..."<<endl;
-                int outputSize=0;
-                arrout=ws.echoIntArray(&arrin);
-                for(x=0;x<ARRAYSIZE;x++)
-                   cout << *(arrout->intItem->get(outputSize)[x])<<endl;                
-                 // Clear up input array        
-        for (int deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
-        {
-            delete array[deleteIndex];
-        }
-        delete [] array;
-                bSuccess = true;
+            sprintf(endpoint, "%s", url);
+            ArrayTestPortType ws(endpoint);
+            //testing echoIntArray
+            intArrayType arrin;
+            intArrayType* arrout;
+            xsd__int_Array arrayInput;
+            int * array[ARRAYSIZE];
+            for (x=0;x<ARRAYSIZE;x++)
+                array[x] = new int(x + 1000);
+            arrayInput.set(array,ARRAYSIZE);
+            arrin.setintItem(&arrayInput);
+            cout << "invoking echoIntArray..."<<endl;
+            int outputSize=0;
+            arrout=ws.echoIntArray(&arrin);
+            for(x=0;x<ARRAYSIZE;x++)
+                cout << *(arrout->intItem->get(outputSize)[x])<<endl;
+            
+            // Clear up input array
+            for (int deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
+                delete array[deleteIndex];
+            bSuccess = true;
         }
         catch(AxisException& e)
         {
-                        bool bSilent = false;
+            bool bSilent = false;
 
-                        if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
-                        {
-                                if( iRetryIterationCount > 0)
-                                {
-                                        bSilent = true;
-                                }
-                        }
-                        else
-                        {
-                                iRetryIterationCount = 0;
-                        }
+            if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+            {
+                if( iRetryIterationCount > 0)
+                    bSilent = true;
+            }
+            else
+                iRetryIterationCount = 0;
 
             if( !bSilent)
-                        {
-                                cout << "Exception : " << e.what() << endl;
-                        }
+                cout << "Exception : " << e.what() << endl;
         }
         catch(exception& e)
         {
@@ -96,8 +94,10 @@
         {
             cout << "Unknown exception has occured"<<endl;
         }
-                iRetryIterationCount--;
-                } while( iRetryIterationCount > 0 && !bSuccess);
-        cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
-        return 0;
+        iRetryIterationCount--;
+    }
+    while( iRetryIterationCount > 0 && !bSuccess);
+    
+    cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
+    return 0;
 }

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArraysClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArraysClient.cpp?rev=407945&r1=407944&r2=407945&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArraysClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleArraysClient.cpp Fri May 19 20:02:09 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 "SimpleArrays.hpp"
 #include <axis/AxisException.hpp>
 #include <iostream>
@@ -24,67 +33,67 @@
 
 int main(int argc, char* argv[])
 {
-        const char* url="http://localhost:80/axis/SimpleArrays";
-        char endpoint[256];
+    const char* url="http://localhost:80/axis/SimpleArrays";
+    char endpoint[256];
 
-        if(argc>1)
-                url = argv[1];
+    if(argc>1)
+        url = argv[1];
 
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
 
-                do
-                {
+    do
+    {
         try
         {
-        int deleteIndex = 0;
-                sprintf(endpoint, "%s", url);
-                SimpleArrays ws(endpoint);
-
-                xsd__boolean_Array boolean_in;
-                xsd__boolean_Array* boolean_out;
-                xsd__short_Array short_in;
-                //xsd__byte_Array byte_in;
-                //xsd__byte_Array byte_out;
-                xsd__short_Array* short_out;
-                xsd__int_Array int_in;
-                xsd__int_Array* int_out;
-                xsd__long_Array long_in;
-                xsd__long_Array* long_out;
-                xsd__float_Array float_in;
-                xsd__float_Array* float_out;
-                xsd__double_Array double_in;
-                xsd__double_Array* double_out;
-                xsd__string_Array string_in;
-                xsd__string_Array* string_out;
-
-
-                /* Test a boolean array */
-                xsd__boolean ** booleanInArray = new xsd__boolean*[ARRAYSIZE];
-                int x = 0;
-                for (x=0; x<ARRAYSIZE; x++)
-                {
-            booleanInArray[x] = new xsd__boolean((xsd__boolean)x);                      
-                }
-                boolean_in.set(booleanInArray,ARRAYSIZE);
-                cout << "invoking echoBooleanArray..."<<endl;
-                boolean_out = ws.echoBooleanArray(&boolean_in);
-                int outputSize=0;
-                const xsd__boolean ** booleanOutArray = boolean_out->get(outputSize);
-                if(outputSize > 0)
-                        if(*( booleanOutArray[0]) == (xsd__boolean)0)
-                                cout << "successful "<<endl;
-                        else
-                                cout << "failed "<<endl;                
+            int deleteIndex = 0;
+            sprintf(endpoint, "%s", url);
+            SimpleArrays ws(endpoint);
+
+            xsd__boolean_Array boolean_in;
+            xsd__boolean_Array* boolean_out;
+            xsd__short_Array short_in;
+            //xsd__byte_Array byte_in;
+            //xsd__byte_Array byte_out;
+            xsd__short_Array* short_out;
+            xsd__int_Array int_in;
+            xsd__int_Array* int_out;
+            xsd__long_Array long_in;
+            xsd__long_Array* long_out;
+            xsd__float_Array float_in;
+            xsd__float_Array* float_out;
+            xsd__double_Array double_in;
+            xsd__double_Array* double_out;
+            xsd__string_Array string_in;
+            xsd__string_Array* string_out;
+
+
+            /* Test a boolean array */
+            xsd__boolean ** booleanInArray = new xsd__boolean*[ARRAYSIZE];
+            int x = 0;
+            for (x=0; x<ARRAYSIZE; x++)
+            {
+                booleanInArray[x] = new xsd__boolean((xsd__boolean)x);
+            }
+            boolean_in.set(booleanInArray,ARRAYSIZE);
+            cout << "invoking echoBooleanArray..."<<endl;
+            boolean_out = ws.echoBooleanArray(&boolean_in);
+            int outputSize=0;
+            const xsd__boolean ** booleanOutArray = boolean_out->get(outputSize);
+            if(outputSize > 0)
+                if(*( booleanOutArray[0]) == (xsd__boolean)0)
+                    cout << "successful "<<endl;
                 else
-                        cout << "failed "<<endl;
-
-                 // Clear up input array        
-        for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
-        {
-            delete booleanInArray[deleteIndex];
-        }
-        delete [] booleanInArray;
+                    cout << "failed "<<endl;
+            else
+                cout << "failed "<<endl;
+
+            // Clear up input array
+            for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
+            {
+                delete booleanInArray[deleteIndex];
+            }
+            delete [] booleanInArray;
 
                 /* Test a byte array - that is directly rather than as base64Binary */
                 /*byte_in.m_Array = new xsd__byte[ARRAYSIZE];
@@ -121,158 +130,158 @@
                 else
                         cout << "failed "<<endl;                
                 */
-                /* Test an int array */
-                xsd__int ** intInArray = new xsd__int*[ARRAYSIZE];              
-                for (x=0; x<ARRAYSIZE; x++)
-                {
-            intInArray[x] = new xsd__int(x+1);
-                        
-                }
-                int_in.set(intInArray,ARRAYSIZE);
-                cout << "invoking echoIntArray..."<<endl;
-                int_out = ws.echoIntArray(&int_in);
-                outputSize = 0;
-                const xsd__int **intOutArray =int_out->get(outputSize);
-                if(outputSize > 0)
-                        if(*(intOutArray[0]) == 1)
-                                cout << "successful "<<endl;
-                        else
-                                cout << "failed "<<endl;                
+            /* Test an int array */
+            xsd__int ** intInArray = new xsd__int*[ARRAYSIZE];
+            for (x=0; x<ARRAYSIZE; x++)
+            {
+                intInArray[x] = new xsd__int(x+1);
+
+            }
+            int_in.set(intInArray,ARRAYSIZE);
+            cout << "invoking echoIntArray..."<<endl;
+            int_out = ws.echoIntArray(&int_in);
+            outputSize = 0;
+            const xsd__int **intOutArray =int_out->get(outputSize);
+            if(outputSize > 0)
+                if(*(intOutArray[0]) == 1)
+                    cout << "successful "<<endl;
                 else
-                        cout << "failed "<<endl;
-
-                for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
-        {
-            delete intInArray[deleteIndex];
-        }
-        delete [] intInArray;
-
-
-                /* Test a long array */
-                xsd__long ** longInArray = new xsd__long*[ARRAYSIZE];        
-                for (x=0; x<ARRAYSIZE; x++)
-                {
-            longInArray[x] = new xsd__long(x+ 200001);
-                        
-                }
-                long_in.set(longInArray,ARRAYSIZE);
-                cout << "invoking echoLongArray..."<<endl;
-                long_out = ws.echoLongArray(&long_in);
-                outputSize = 0;
-                const xsd__long **longOutArray = long_out->get(outputSize);
-                if(outputSize > 0)
-                        if(*(longOutArray[0]) == (xsd__long)200001)
-                                cout << "successful "<<endl;
-                        else
-                                cout << "failed "<<endl;                
+                    cout << "failed "<<endl;
+            else
+                cout << "failed "<<endl;
+
+            for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
+            {
+                delete intInArray[deleteIndex];
+            }
+            delete [] intInArray;
+
+
+            /* Test a long array */
+            xsd__long ** longInArray = new xsd__long*[ARRAYSIZE];
+            for (x=0; x<ARRAYSIZE; x++)
+            {
+                longInArray[x] = new xsd__long(x+ 200001);
+
+            }
+            long_in.set(longInArray,ARRAYSIZE);
+            cout << "invoking echoLongArray..."<<endl;
+            long_out = ws.echoLongArray(&long_in);
+            outputSize = 0;
+            const xsd__long **longOutArray = long_out->get(outputSize);
+            if(outputSize > 0)
+                if(*(longOutArray[0]) == (xsd__long)200001)
+                    cout << "successful "<<endl;
                 else
-                        cout << "failed "<<endl;                
-
-                // Clear up input array        
-        for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
-        {
-            delete longInArray[deleteIndex];
-        }
-        delete [] longInArray;
-
-                /* Test a float array */
-                xsd__float **floatInArray = new xsd__float*[ARRAYSIZE];
-        
-                for (x=0; x<ARRAYSIZE; x++)
-                {
-            floatInArray[x] = new xsd__float(x+ 11.111);
-                        
-                }
-        float_in.set(floatInArray,ARRAYSIZE);
-                cout << "invoking echoFloatArray..."<<endl;
-                float_out = ws.echoFloatArray(&float_in);
-                outputSize =0;
-                const xsd__float **floatOutArray=float_out->get(outputSize);
-                if(outputSize > 0)
-                        if(*(floatOutArray[0]) == (xsd__float)11.111)
-                                cout << "successful "<<endl;
-                        else
-                                cout << "failed "<<endl;                
+                    cout << "failed "<<endl;
+            else
+                cout << "failed "<<endl;
+
+            // Clear up input array
+            for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
+            {
+                delete longInArray[deleteIndex];
+            }
+            delete [] longInArray;
+
+            /* Test a float array */
+            xsd__float **floatInArray = new xsd__float*[ARRAYSIZE];
+
+            for (x=0; x<ARRAYSIZE; x++)
+            {
+                floatInArray[x] = new xsd__float(x+ 11.111);
+
+            }
+            float_in.set(floatInArray,ARRAYSIZE);
+            cout << "invoking echoFloatArray..."<<endl;
+            float_out = ws.echoFloatArray(&float_in);
+            outputSize =0;
+            const xsd__float **floatOutArray=float_out->get(outputSize);
+            if(outputSize > 0)
+                if(*(floatOutArray[0]) == (xsd__float)11.111)
+                    cout << "successful "<<endl;
                 else
-                        cout << "failed "<<endl;        
-
-                // Clear up input array        
-        for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
-        {
-            delete floatInArray[deleteIndex];
-        }
-        delete [] floatInArray;
-
-                /* Test a double array */
-                xsd__double ** doubleInArray=new xsd__double*[ARRAYSIZE];
-                
-                for (x=0; x<ARRAYSIZE; x++)
-                {
-            doubleInArray[x] = new xsd__double(x+71.15656);
-                        
-                }
-                double_in.set(doubleInArray,ARRAYSIZE);
-                cout << "invoking echoDoubleArray..."<<endl;
-                double_out = ws.echoDoubleArray(&double_in);
-                outputSize = 0;
-                const xsd__double ** doubleOutArray = double_out->get(outputSize);
-
-                if(outputSize > 0)
-                        if(*(doubleOutArray[0]) == (xsd__double)71.15656)
-                                cout << "successful "<<endl;
-                        else
-                                cout << "failed "<<endl;                
+                    cout << "failed "<<endl;
+            else
+                cout << "failed "<<endl;
+
+            // Clear up input array
+            for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
+            {
+                delete floatInArray[deleteIndex];
+            }
+            delete [] floatInArray;
+
+            /* Test a double array */
+            xsd__double ** doubleInArray=new xsd__double*[ARRAYSIZE];
+
+            for (x=0; x<ARRAYSIZE; x++)
+            {
+                doubleInArray[x] = new xsd__double(x+71.15656);
+
+            }
+            double_in.set(doubleInArray,ARRAYSIZE);
+            cout << "invoking echoDoubleArray..."<<endl;
+            double_out = ws.echoDoubleArray(&double_in);
+            outputSize = 0;
+            const xsd__double ** doubleOutArray = double_out->get(outputSize);
+
+            if(outputSize > 0)
+                if(*(doubleOutArray[0]) == (xsd__double)71.15656)
+                    cout << "successful "<<endl;
                 else
-                        cout << "failed "<<endl;        
-
-                // Clear up input array        
-        for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
-        {
-            delete doubleInArray[deleteIndex];
-        }
-        delete [] doubleInArray;
-
-                /* Test a string array */
-                static char* str1 = "Apache";
-                static char* str2 = "Axis C++";
-                xsd__string * stringInArray = new xsd__string[ARRAYSIZE];               
-                stringInArray[0] = "Apache";
-                stringInArray[1] = "Axis C++";
-                string_in.set(stringInArray,ARRAYSIZE);
-                cout << "invoking echoStringArray..."<<endl;
-                string_out = ws.echoStringArray(&string_in);
-                outputSize =0;
-                const xsd__string * stringOutArray = string_out->get(outputSize);
-                if(outputSize > 0)
-                        if(strcmp(stringOutArray[0], str1) == 0)
-                                cout << "successful "<<endl;
-                        else
-                                cout << "failed "<<endl;                
+                    cout << "failed "<<endl;
+            else
+                cout << "failed "<<endl;
+
+            // Clear up input array
+            for (deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
+            {
+                delete doubleInArray[deleteIndex];
+            }
+            delete [] doubleInArray;
+
+            /* Test a string array */
+            static char* str1 = "Apache";
+            static char* str2 = "Axis C++";
+            xsd__string * stringInArray = new xsd__string[ARRAYSIZE];
+            stringInArray[0] = "Apache";
+            stringInArray[1] = "Axis C++";
+            string_in.set(stringInArray,ARRAYSIZE);
+            cout << "invoking echoStringArray..."<<endl;
+            string_out = ws.echoStringArray(&string_in);
+            outputSize =0;
+            const xsd__string * stringOutArray = string_out->get(outputSize);
+            if(outputSize > 0)
+                if(strcmp(stringOutArray[0], str1) == 0)
+                    cout << "successful "<<endl;
                 else
-                        cout << "failed "<<endl;                
+                    cout << "failed "<<endl;
+            else
+                cout << "failed "<<endl;
 
-                                bSuccess = true;
+            bSuccess = true;
         }
         catch(AxisException& e)
         {
-                        bool bSilent = false;
+            bool bSilent = false;
 
-                        if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
-                        {
-                                if( iRetryIterationCount > 0)
-                                {
-                                        bSilent = true;
-                                }
-                        }
-                        else
-                        {
-                                iRetryIterationCount = 0;
-                        }
+            if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+            {
+                if( iRetryIterationCount > 0)
+                {
+                    bSilent = true;
+                }
+            }
+            else
+            {
+                iRetryIterationCount = 0;
+            }
 
             if( !bSilent)
-                        {
-                                cout << "Exception : " << e.what() << endl;
-                        }
+            {
+                cout << "Exception : " << e.what() << endl;
+            }
         }
         catch(exception& e)
         {
@@ -282,9 +291,9 @@
         {
             cout << "Unknown exception has occured"<<endl;
         }
-                iRetryIterationCount--;
-                } while( iRetryIterationCount > 0 && !bSuccess);
-        cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
-        return 0;
+        iRetryIterationCount--;
+    } while( iRetryIterationCount > 0 && !bSuccess);
+    cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
+    return 0;
 }
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleXSDAnyClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleXSDAnyClient.cpp?rev=407945&r1=407944&r2=407945&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleXSDAnyClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/SimpleXSDAnyClient.cpp Fri May 19 20:02:09 2006
@@ -13,6 +13,15 @@
 // See the License for the specific language governing permissions and
 // 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 <axis/AxisException.hpp>
 #include "XSD_byte.hpp" 
 
@@ -31,112 +40,116 @@
 void setLogOptions(const char *output_filename);
 
 int main(int argc, char* argv[])
-{ 
-  XSD_byte *ws;
+{
+    XSD_byte *ws;
 
-  char *endpoint = WSDL_DEFAULT_ENDPOINT;
-  bool endpoint_set = false;
-  int returnValue = 1; // Assume Failure
+    char *endpoint = WSDL_DEFAULT_ENDPOINT;
+    bool endpoint_set = false;
+    int returnValue = 1; // Assume Failure
 
-  endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
+    endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
 
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
 
-                do
-                {
-  try {
-    if(endpoint_set) {
-      ws = new XSD_byte(endpoint, APTHTTP1_1);
-      free(endpoint);
-      endpoint_set = false;
-    } else
-      ws = new XSD_byte();
-
-    SimpleComplexType1* input = new SimpleComplexType1();
-
-        AnyType* any1 = new AnyType();
-
-        AnyType *pAny = new AnyType();
-    pAny->_size = 1;
-    pAny->_array = new char*[1];
-        pAny->_array[0]=strdup("<mybook>WSCC</mybook>");
-
-        input->setany1(pAny);
-        input->setfield2("WebServices");
-        input->setfield3(123);
-    
-    SimpleComplexType1* result = NULL;
-    result = ws->asComplexType(input);
-
-        if( result == NULL )
-                        cout << "result object is NULL" << endl;
-
-        AnyType* pAnyReturn = result->getany1();
-        xsd__string f2 = result->getfield2();
-        xsd__int f3 = result->getfield3();
+    do
+    {
+        try {
+            if(endpoint_set) {
+                ws = new XSD_byte(endpoint, APTHTTP1_1);
+                free(endpoint);
+                endpoint_set = false;
+            } else
+                ws = new XSD_byte();
 
-        char * p = strstr( pAnyReturn->_array[0], "<mybook");
+            SimpleComplexType1* input = new SimpleComplexType1();
 
-        if( p && strstr( p, ">WSCC</mybook>"))
-        {
-            cout << "Result field1 is = <mybook>WSCC</mybook>" << endl;
-        }
-        else
-        {
-            cout << "Result field1 is = " << pAnyReturn->_array[0] << endl;
-        }
+            AnyType* any1 = new AnyType();
+
+            AnyType *pAny = new AnyType();
+            pAny->_size = 1;
+            pAny->_array = new char*[1];
+            pAny->_array[0]=strdup("<mybook>WSCC</mybook>");
+
+            input->setany1(pAny);
+            input->setfield2("WebServices");
+            input->setfield3(123);
+
+            SimpleComplexType1* result = NULL;
+            result = ws->asComplexType(input);
+
+            if( result == NULL )
+                cout << "result object is NULL" << endl;
+
+            AnyType* pAnyReturn = result->getany1();
+            xsd__string f2 = result->getfield2();
+            xsd__int f3 = result->getfield3();
+
+            char * p = strstr( pAnyReturn->_array[0], "<mybook");
+
+            if( p && strstr( p, ">WSCC</mybook>"))
+            {
+                cout << "Result field1 is = <mybook>WSCC</mybook>" << endl;
+            }
+            else
+            {
+                cout << "Result field1 is = " << pAnyReturn->_array[0] << endl;
+            }
+
+            cout << "Result field2 is = " << f2 << endl;
+            cout << "Result field3 is = " << f3 << endl;
 
-        cout << "Result field2 is = " << f2 << endl;
-        cout << "Result field3 is = " << f3 << endl;
+            bSuccess = true;
 
-        bSuccess = true;
+            returnValue = 0; // Success
 
-    returnValue = 0; // Success
-
-  } catch(AxisException &e) {
-                        bool bSilent = false;
-
-                        if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
-                        {
-                                if( iRetryIterationCount > 0)
-                                {
-                                        bSilent = true;
-                                }
-                        }
-                        else
-                        {
-                                iRetryIterationCount = 0;
-                        }
+        }
+        catch(AxisException &e)
+        {
+            bool bSilent = false;
+
+            if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+            {
+                if( iRetryIterationCount > 0)
+                {
+                    bSilent = true;
+                }
+            }
+            else
+            {
+                iRetryIterationCount = 0;
+            }
 
             if( !bSilent)
-                        {
-    cout << e.what() << endl;
-                        }
-  } catch(...) {
-    cout << "Unknown Exception occured." << endl;
-  }
-  
-  // Samisa : clean up memory allocated for stub
-  try
-  {
-          delete ws; 
-  }
-  catch(exception& exception)
-  {
-        cout << "Exception on clean up of ws : " << exception.what()<<endl;
-  }
-  catch(...)
-  {
-        cout << "Unknown exception on clean up of ws : " << endl;
-  }
-                iRetryIterationCount--;
-                } while( iRetryIterationCount > 0 && !bSuccess);
+            {
+                cout << e.what() << endl;
+            }
+        }
+        catch(...)
+        {
+            cout << "Unknown Exception occured." << endl;
+        }
+
+        // Samisa : clean up memory allocated for stub
+        try
+        {
+            delete ws;
+        }
+        catch(exception& exception)
+        {
+            cout << "Exception on clean up of ws : " << exception.what()<<endl;
+        }
+        catch(...)
+        {
+            cout << "Unknown exception on clean up of ws : " << endl;
+        }
+        iRetryIterationCount--;
+    } while( iRetryIterationCount > 0 && !bSuccess);
     if(endpoint_set)
-      free(endpoint);
-  cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
+        free(endpoint);
+    cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
 
-  return returnValue;
+    return returnValue;
 }
 
 /* Spin through args list and check for -e -p and -s options.



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org