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

svn commit: r406512 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/MultiOutClient.cpp

Author: nadiramra
Date: Sun May 14 20:19:33 2006
New Revision: 406512

URL: http://svn.apache.org/viewcvs?rev=406512&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/MultiOutClient.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/MultiOutClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/MultiOutClient.cpp?rev=406512&r1=406511&r2=406512&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/MultiOutClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/MultiOutClient.cpp Sun May 14 20:19:33 2006
@@ -13,6 +13,16 @@
 // 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 "MultiOut.hpp"
 #include "CommonClientTestCode.hpp"
 #include <axis/AxisException.hpp>
@@ -21,90 +31,87 @@
 
 int main(int argc, char* argv[])
 {
-        bool bSuccess = false;
-        int     iRetryIterationCount = 3;
-        do
+    bool bSuccess = false;
+    int     iRetryIterationCount = 3;
+    do
+    {
+        try
         {
-                try
-                {
-                        MultiOut ws(argv[1]);
-
-                        xsd__string OutValue0 = NULL;
-                        xsd__integer * pOutValue1 = NULL;
-                        xsd__int outValue2;
-                        xsd__long outValue3;
-                        xsd__short outValue4;
-                        xsd__decimal outValue5;
-                        xsd__float outValue6;
-                        xsd__double outValue7;
-                        xsd__boolean outValue8;
-                        xsd__byte outValue9;
-
-                        ws.get(&OutValue0,
-                                &pOutValue1,
-                                &outValue2,
-                                &outValue3,
-                                &outValue4,
-                                &outValue5,
-                                &outValue6,
-                                &outValue7,
-                                &outValue8,
-                                &outValue9);
-
-                        char sInteger[128], sLong[128];
-
-                        const char *sBool = (outValue8==false_)?"false":"true";
-
-                        cout << OutValue0 << endl;
-                        cout << *pOutValue1 << endl;
-                        cout << outValue2 << endl;
-                        cout << outValue3 << endl;
-                        cout << outValue4 << endl;
-                        cout << outValue5 << endl;
-                        cout << outValue6 << endl;
-                        cout << outValue7 << endl;
-                        cout << sBool << endl;
+            MultiOut ws(argv[1]);
+
+            xsd__string OutValue0 = NULL;
+            xsd__integer * pOutValue1 = NULL;
+            xsd__int outValue2;
+            xsd__long outValue3;
+            xsd__short outValue4;
+            xsd__decimal outValue5;
+            xsd__float outValue6;
+            xsd__double outValue7;
+            xsd__boolean outValue8;
+            xsd__byte outValue9;
+
+            ws.get(&OutValue0,
+                   &pOutValue1,
+                   &outValue2,
+                   &outValue3,
+                   &outValue4,
+                   &outValue5,
+                   &outValue6,
+                   &outValue7,
+                   &outValue8,
+                   &outValue9);
+
+            char sInteger[128], sLong[128];
+
+            const char *sBool = (outValue8==false_)?"false":"true";
+
+            cout << OutValue0 << endl;
+            cout << *pOutValue1 << endl;
+            cout << outValue2 << endl;
+            cout << outValue3 << endl;
+            cout << outValue4 << endl;
+            cout << outValue5 << endl;
+            cout << outValue6 << endl;
+            cout << outValue7 << endl;
+            cout << sBool << endl;
 #ifdef __OS400__
-                  if (outValue9 == 0x41) // Ascii 'A'
-                     outValue9 = 'A';    // Set to ebcdic A
+            if (outValue9 == 0x41) // Ascii 'A'
+                outValue9 = 'A';    // Set to ebcdic A
 #endif
-                        cout << outValue9 << endl;
+            cout << outValue9 << endl;
 
-                        delete [] OutValue0;
-                        delete pOutValue1;
+            delete [] OutValue0;
+            delete pOutValue1;
 
-                        bSuccess = true;
-                }
-                catch(AxisException& e)
-                {
-                        bool bSilent = false;
-                        if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
-                        {
-                                if( iRetryIterationCount > 0)
-                                {
-                                        bSilent = true;
-                                }
-                        }
-                        else
-                        {
-                                iRetryIterationCount = 0;
-                        }
+            bSuccess = true;
+        }
+        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 << "Exception : " << e.what() << endl;
-                        }
-                }
-                catch(exception& e)
-                {
-                    cout << "Unknown exception has occured" << e.what() << endl;
-                }
-                catch(...)
-                {
-                    cout << "Unknown exception has occured" << endl;
-                }
-                iRetryIterationCount--;
-        } while( iRetryIterationCount > 0 && !bSuccess);
-        cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
-        return 0;
+                cout << "Exception : " << e.what() << endl;
+        }
+        catch(exception& e)
+        {
+            cout << "Unknown exception has occured" << e.what() << endl;
+        }
+        catch(...)
+        {
+            cout << "Unknown exception has occured" << endl;
+        }
+        
+        iRetryIterationCount--;
+    }
+    while( iRetryIterationCount > 0 && !bSuccess);
+    
+    cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
+    return 0;
 }