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/16 00:55:55 UTC

svn commit: r406763 - in /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp: IAttributeTest1Client.cpp IAttributeTest2Client.cpp IAttributeTest3Client.cpp IAttributeTest4Client.cpp

Author: nadiramra
Date: Mon May 15 15:55:54 2006
New Revision: 406763

URL: http://svn.apache.org/viewcvs?rev=406763&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/IAttributeTest1Client.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest2Client.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest3Client.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest4Client.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest1Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest1Client.cpp?rev=406763&r1=406762&r2=406763&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest1Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest1Client.cpp Mon May 15 15:55:54 2006
@@ -17,6 +17,16 @@
    @Author : James Jose
 */
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* 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 "Calculator.hpp"
 #include <axis/AxisException.hpp>
 #include <ctype.h>
@@ -24,73 +34,79 @@
 
 int main(int argc, char* argv[])
 {
-        char endpoint[256];
-        const char* url="http://localhost:80/axis/Calculator";
-        const char* op = 0;
-        int i1=0, i2=0;
-        int iResult;
-        url = argv[1];
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/Calculator";
+    const char* op = 0;
+    int i1=0, i2=0;
+    int iResult;
+    url = argv[1];
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
+    
+    const char *name="Name";
+    
+    IHeaderBlock *phb;
+    IAttribute *attr, *attr1;
+    BasicNode *bn;
+    
 
-                do
-                {
+    do
+    {
         try
         {
-                sprintf(endpoint, "%s", url);
-                Calculator ws(endpoint);
-                const char *name="Name";
-                IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
-                IAttribute *attr=phb->createAttribute("NAME","ns","AXIS");
-                cout << attr->setLocalName(NULL)<<endl;
-                cout << attr->setLocalName(name)<<endl;
-                BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
-                IAttribute *attr1=bn->createAttribute("TYPE","Open Source");
-                attr1->setLocalName("Type");
-                cout << "Header Attribute Name = " << attr->getLocalName()<< endl ;
-                cout << "Child Node Attribute Name = " << attr1->getLocalName() << endl;
-                op = "add";
-                i1 = 2;
-                i2 = 3;
-                if (strcmp(op, "add") == 0)
-                {
-                        iResult = ws.add(i1, i2);
-                        cout << iResult << endl;
-                        bSuccess = true;
-                }
+            if (argc > 1)
+                url = argv[1];
+            sprintf(endpoint, "%s", url);
+            Calculator ws(endpoint);
+            
+            phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
+            attr=phb->createAttribute("NAME","ns","AXIS");
+            cout << attr->setLocalName(NULL)<<endl;
+            cout << attr->setLocalName(name)<<endl;
+            bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
+            attr1=bn->createAttribute("TYPE","Open Source");
+            attr1->setLocalName("Type");
+            cout << "Header Attribute Name = " << attr->getLocalName()<< endl ;
+            cout << "Child Node Attribute Name = " << attr1->getLocalName() << endl;
+            op = "add";
+            i1 = 2;
+            i2 = 3;
+            if (strcmp(op, "add") == 0)
+            {
+                iResult = ws.add(i1, i2);
+                cout << iResult << endl;
+                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)
         {
-                cout << "Unknown exception has occured" << endl;
+            cout << "Unknown exception has occured" << endl;
         }
         catch(...)
         {
-                cout << "Unspecified exception has occured" << endl;
+            cout << "Unspecified 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/IAttributeTest2Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest2Client.cpp?rev=406763&r1=406762&r2=406763&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest2Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest2Client.cpp Mon May 15 15:55:54 2006
@@ -18,6 +18,16 @@
 @ Author : James Jose
 */
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* 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 "Calculator.hpp"
 #include <axis/AxisException.hpp>
 #include <ctype.h>
@@ -25,75 +35,81 @@
 
 int main(int argc, char* argv[])
 {
-        char endpoint[256];
-        const char* url="http://localhost:80/axis/Calculator";
-        const char* op = 0;
-        int i1=0, i2=0;
-        int iResult;
-        url = argv[1];
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/Calculator";
+    const char* op = 0;
+    int i1=0, i2=0;
+    int iResult;
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
+    
+    const char *prefix="nsp";
+    
+    IHeaderBlock *phb;
+    IAttribute *attr1, *attr2;
+    BasicNode *bn;
 
-                do
-                {
+    do
+    {
         try
         {
-                sprintf(endpoint, "%s", url);
-                Calculator ws(endpoint);
-                const char *prefix="nsp";
-                IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","nsp");
-                IAttribute *attr1=phb->createAttribute("Name","ns","AXIS");
-                /* Tests for NULL Value */
-                cout<<attr1->setPrefix(NULL)<<endl;
-                cout<<attr1->setPrefix(prefix)<<endl;
-                BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
-                IAttribute *attr2=bn->createAttribute("TYPE","Open Source");
-                /* Tests for non declared namespace prefix */
-                cout<<attr2->setPrefix("nd")<<endl;
-                cout << "Header Attribute Prefix = " << attr1->getPrefix()<<endl;
-                cout << "Child Node Attribute Prefix = " << attr2->getPrefix()<<endl;
-                op = "add";
-                i1 = 2;
-                i2 = 3;
-                if (strcmp(op, "add") == 0)
-                {
-                        iResult = ws.add(i1, i2);
-                        cout  << iResult << endl;
-                        bSuccess = true;
-                }
+            if (argc > 1)
+                url = argv[1];
+            sprintf(endpoint, "%s", url);
+            Calculator ws(endpoint);
+            
+            phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","nsp");
+            attr1=phb->createAttribute("Name","ns","AXIS");
+            
+            /* Tests for NULL Value */
+            cout<<attr1->setPrefix(NULL)<<endl;
+            cout<<attr1->setPrefix(prefix)<<endl;
+            bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
+            attr2=bn->createAttribute("TYPE","Open Source");
+            
+            /* Tests for non declared namespace prefix */
+            cout<<attr2->setPrefix("nd")<<endl;
+            cout << "Header Attribute Prefix = " << attr1->getPrefix()<<endl;
+            cout << "Child Node Attribute Prefix = " << attr2->getPrefix()<<endl;
+            op = "add";
+            i1 = 2;
+            i2 = 3;
+            if (strcmp(op, "add") == 0)
+            {
+                iResult = ws.add(i1, i2);
+                cout  << iResult << endl;
+                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)
         {
-                cout << "Unknown exception has occured" << endl;
+            cout << "Unknown exception has occured" << endl;
         }
         catch(...)
         {
-                cout << "Unspecified exception has occured" << endl;
+            cout << "Unspecified 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/IAttributeTest3Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest3Client.cpp?rev=406763&r1=406762&r2=406763&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest3Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest3Client.cpp Mon May 15 15:55:54 2006
@@ -18,6 +18,14 @@
 @ Author : James Jose
 */
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* 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 "Calculator.hpp"
 #include <axis/AxisException.hpp>
@@ -26,75 +34,82 @@
 
 int main(int argc, char* argv[])
 {
-        char endpoint[256];
-        const char* url="http://localhost:80/axis/Calculator";
-        const char* op = 0;
-        int i1=0, i2=0;
-        int iResult;
-        url = argv[1];
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/Calculator";
+    const char* op = 0;
+    int i1=0, i2=0;
+    int iResult;
+
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
+    
+    const char *Value="AXIS";
+    
+    IHeaderBlock *phb;
+    IAttribute *attr1, *attr2;
+    BasicNode *bn;
 
-                do
-                {
+    do
+    {
         try
         {
-                sprintf(endpoint, "%s", url);
-                Calculator ws(endpoint);
-                const char *Value="AXIS";
-                IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
-                IAttribute *attr1=phb->createAttribute("Name","ns","axis");
-                /*Tests for NULL Value */
-                cout << attr1->setValue(NULL) << endl;
-                cout << attr1->setValue(Value)<< endl;
-                BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
-                IAttribute *attr2=bn->createAttribute("TYPE","OPEN SOURCE");
-                attr2->setValue("Open Source");
-                cout << "Header Attribute Value = " << attr1->getValue()<< endl;
-                cout << "Child Node Attribute Value = " << attr2->getValue()<<endl;
-                op = "add";
-                i1 = 2;
-                i2 = 3;
-                if (strcmp(op, "add") == 0)
-                {
-                        iResult = ws.add(i1, i2);
-                        cout << iResult << endl;
-                        bSuccess = true;
-                }
+            if (argc > 1)
+                url = argv[1];
+            sprintf(endpoint, "%s", url);
+            Calculator ws(endpoint);
+            
+            phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
+            attr1=phb->createAttribute("Name","ns","axis");
+            
+            /*Tests for NULL Value */
+            cout << attr1->setValue(NULL) << endl;
+            cout << attr1->setValue(Value)<< endl;
+            
+            bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
+            attr2=bn->createAttribute("TYPE","OPEN SOURCE");
+            attr2->setValue("Open Source");
+            cout << "Header Attribute Value = " << attr1->getValue()<< endl;
+            cout << "Child Node Attribute Value = " << attr2->getValue()<<endl;
+            op = "add";
+            i1 = 2;
+            i2 = 3;
+            if (strcmp(op, "add") == 0)
+            {
+                iResult = ws.add(i1, i2);
+                cout << iResult << endl;
+                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)
         {
-                cout << "Unknown exception has occured" << endl;
+            cout << "Unknown exception has occured" << endl;
         }
         catch(...)
         {
-                cout << "Unspecified exception has occured" << endl;
+            cout << "Unspecified 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/IAttributeTest4Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest4Client.cpp?rev=406763&r1=406762&r2=406763&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest4Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/IAttributeTest4Client.cpp Mon May 15 15:55:54 2006
@@ -18,6 +18,14 @@
 @ Author : James Jose
 */
 
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+/* 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 "Calculator.hpp"
 #include <axis/AxisException.hpp>
@@ -26,77 +34,83 @@
 
 int main(int argc, char* argv[])
 {
-        char endpoint[256];
-        const char* url="http://localhost:80/axis/Calculator";
-        const char* op = 0;
-        int i1=0, i2=0;
-        int iResult;
-        url = argv[1];
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    char endpoint[256];
+    const char* url="http://localhost:80/axis/Calculator";
+    const char* op = 0;
+    int i1=0, i2=0;
+    int iResult;
+    const char *uri="http://axis.apache.com";
+
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
+    
+    IHeaderBlock *phb;
+    INamespace *nsp;
+    IAttribute *attr1, *attr2;
+    BasicNode *bn;
 
-                do
-                {
+    do
+    {
         try
         {
-                sprintf(endpoint, "%s", url);
-                Calculator ws(endpoint);
-                const char *uri="http://axis.apache.com";
-                IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
-                INamespace *nsp=phb->createNamespaceDecl("nsp","http://apache.com");
-                IAttribute *attr1=phb->createAttribute("Name","nsp","axis");
-                cout<<attr1->setURI(NULL)<<endl;
-
-                /* Changing the URI associated with the attribute. Here the prefix should also will change. */
-                cout<<attr1->setURI("http://axis.apache.com")<<endl;
-                BasicNode *bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
-                IAttribute *attr2=bn->createAttribute("TYPE","OPEN SOURCE");
-                attr2->setURI(uri);
-                cout << "Header Attribute Uri = " << attr1->getURI()<<endl;
-                cout << "Child Node Attribute Uri = " << attr2->getURI()<<endl;
-                op = "add";
-                i1 = 2;
-                i2 = 3;
-                if (strcmp(op, "add") == 0)
-                {
-                        iResult = ws.add(i1, i2);
-                        cout << iResult << endl;
-                        bSuccess = true;
-                }
+            if (argc > 1)
+                url = argv[1];
+            sprintf(endpoint, "%s", url);
+            Calculator ws(endpoint);
+
+            phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/","ns");
+            nsp=phb->createNamespaceDecl("nsp","http://apache.com");
+            attr1=phb->createAttribute("Name","nsp","axis");
+            cout<<attr1->setURI(NULL)<<endl;
+
+            /* Changing the URI associated with the attribute. Here the prefix should also will change. */
+            cout<<attr1->setURI("http://axis.apache.com")<<endl;
+            bn=phb->createImmediateChild(ELEMENT_NODE,"Project","","","");
+            attr2=bn->createAttribute("TYPE","OPEN SOURCE");
+            attr2->setURI(uri);
+            
+            cout << "Header Attribute Uri = " << attr1->getURI()<<endl;
+            cout << "Child Node Attribute Uri = " << attr2->getURI()<<endl;
+            op = "add";
+            i1 = 2;
+            i2 = 3;
+            if (strcmp(op, "add") == 0)
+            {
+                iResult = ws.add(i1, i2);
+                cout << iResult << endl;
+                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)
         {
-                cout << "Unknown exception has occured" << endl;
+            cout << "Unknown exception has occured" << endl;
         }
         catch(...)
         {
-                cout << "Unspecified exception has occured" << endl;
+            cout << "Unspecified 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;
 }