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 ja...@apache.org on 2005/11/17 11:00:04 UTC

svn commit: r345216 - /webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicCheckFaultTest/Calculator.cpp

Author: jamejose
Date: Thu Nov 17 01:59:52 2005
New Revision: 345216

URL: http://svn.apache.org/viewcvs?rev=345216&view=rev
Log:
Changed SOAPVersion from 1.2 to 1.1

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicCheckFaultTest/Calculator.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicCheckFaultTest/Calculator.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicCheckFaultTest/Calculator.cpp?rev=345216&r1=345215&r2=345216&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicCheckFaultTest/Calculator.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicCheckFaultTest/Calculator.cpp Thu Nov 17 01:59:52 2005
@@ -43,17 +43,6 @@
 	m_pCall=NULL;
 }
 
-void Calculator::checkFault(const AxisChar* pName, const AxisChar* pNamespace){
-	try{ 
-       ISoapFault * sf=(ISoapFault *)m_pCall->checkFault(pName,pNamespace);
-	   string s=sf->getFaultcode();
-	   string str=sf->getFaultstring();
-       cout << "Fault Code = " << s.c_str() << endl;
-	   cout << "Fault String = " << str.c_str()<< endl;	  
-	}catch(AxisException &e){
-       cout << e.what();
-	}
-}
 
 /*
  * This method wrap the service methoddiv
@@ -66,7 +55,7 @@
 	{	
 	m_pCall->initialize(CPP_DOC_PROVIDER);
 	m_pCall->setTransportProperty(SOAPACTION_HEADER , "Calculator#div");
-	m_pCall->setSOAPVersion(SOAP_VER_1_2);
+	m_pCall->setSOAPVersion(SOAP_VER_1_1);
 	m_pCall->setOperation("div", "http://localhost/axis/Calculator");
 	includeSecure();
 	char cPrefixAndParamName0[17];
@@ -88,7 +77,19 @@
 	}
 	catch(AxisException& e)
 	{
-		throw;
+		cout << "Exception : " << e.what()<< endl;
+		try{ 
+			ISoapFault * sf=(ISoapFault *)m_pCall->checkFault("Fault","");
+			string s=sf->getFaultcode();
+			string str=sf->getFaultstring();
+			cout << "Fault Code = " << s.c_str() << endl;
+			cout << "Fault String = " << str.c_str()<< endl;	  
+		}catch(exception &e){
+			cout << e.what();
+		}catch(...){
+			cout << "Unspecified exception has occured" << endl;
+		}
+		
 	}
 }
 
@@ -133,12 +134,12 @@
 	}
 	catch(AxisException& e)
 	{
-	    cout << "Exception : " << e.what()<< endl;
-		ws.checkFault("Fault","");
+	   cout << "Exception : " << e.what()<< endl;
+		
 	}
 	catch(exception& e)
 	{
-	    cout << "Unknown exception has occured" << endl;
+	   cout << "Unknown exception has occured" << endl;
 	}
 	catch(...)
 	{