axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r393793 - in /webservices/axis/trunk/c/tests/auto_build/testcases/dynamic: DynamicGet_AddAnyObjectTest/ DynamicGet_AddAnyObjectTestOutOfScope/
Date Thu, 13 Apr 2006 12:52:49 GMT
Author: dicka
Date: Thu Apr 13 05:51:46 2006
New Revision: 393793

URL: http://svn.apache.org/viewcvs?rev=393793&view=rev
Log:
Resolve problems in dynamic testcases which use xsd:any, so they aren't affected by the formatting
of the SOAP response message.

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.hpp
    webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.hpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.cpp?rev=393793&r1=393792&r2=393793&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.cpp
Thu Apr 13 05:51:46 2006
@@ -61,6 +61,26 @@
 	}
 }
 
+/**
+ * This method is written to step over any returned AnyObject containing just whitespace.
+ */
+AnyType * Calculator::getNextAnyTag(void)
+{
+	AnyType * any = NULL;
+	bool foundStart = false;
+	while (!foundStart)
+	{
+		any = (AnyType*)m_pCall->getAnyObject();
+		if (any!= NULL && any->_size > 0 && any->_array[0][0] != '<')
+		{
+			continue;
+		}
+		
+		foundStart = true;
+	}
+	return any;
+}
+
 xsd__int Calculator::div(xsd__int Value0, xsd__int Value1)
 {
 	AnyType *pAny = new AnyType();
@@ -85,7 +105,7 @@
 		{
 			if(AXIS_SUCCESS == m_pCall->checkMessage("divResponse", "http://localhost/axis/Calculator"))
 			{
-				AnyType *any = (AnyType*)m_pCall->getAnyObject();
+				AnyType *any = this->getNextAnyTag();
 				if(any!=NULL)
 				{
 					cout << any->_size<<endl;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.hpp?rev=393793&r1=393792&r2=393793&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.hpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTest/Calculator.hpp
Thu Apr 13 05:51:46 2006
@@ -39,6 +39,7 @@
 	STORAGE_CLASS_INFO xsd__int div(xsd__int Value0,xsd__int Value1);
 
 private:
+	AnyType * getNextAnyTag(void);
 	void includeSecure();
 	Call *m_pCall;
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.cpp?rev=393793&r1=393792&r2=393793&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.cpp
Thu Apr 13 05:51:46 2006
@@ -61,6 +61,26 @@
 	}
 }
 
+/**
+ * This method is written to step over any returned AnyObject containing just whitespace.
+ */
+AnyType * Calculator::getNextAnyTag(void)
+{
+	AnyType * any = NULL;
+	bool foundStart = false;
+	while (!foundStart)
+	{
+		any = (AnyType*)m_pCall->getAnyObject();
+		if (any!= NULL && any->_size > 0 && any->_array[0][0] != '<')
+		{
+			continue;
+		}
+		
+		foundStart = true;
+	}
+	return any;
+}
+
 xsd__int Calculator::div(xsd__int Value0, xsd__int Value1)
 {
 	xsd__int Ret = 0;
@@ -88,14 +108,16 @@
 	{
 		if(AXIS_SUCCESS == m_pCall->checkMessage("divResponse", "http://localhost/axis/Calculator"))
 		{
-			any = (AnyType*)m_pCall->getAnyObject();
+			any = this->getNextAnyTag();
+			
 			if(any!=NULL){
 				cout << any->_size<<endl;
 				cout << any->_array[0]<<endl;
 			}
-			any = (AnyType*)m_pCall->getAnyObject();	// Skip past </divResponse> tag
-//			any = (AnyType*)m_pCall->getAnyObject();	// Skip past </Body> tag
-//			any = (AnyType*)m_pCall->getAnyObject();	// Skip past </Envelope> tag
+
+			any = this->getNextAnyTag();	// Skip past </divResponse> tag
+//			any = this->getNextAnyTag();	// Skip past </Body> tag
+//			any = this->getNextAnyTag();	// Skip past </Envelope> tag
 
 			if( any != NULL)
 			{

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.hpp?rev=393793&r1=393792&r2=393793&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.hpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicGet_AddAnyObjectTestOutOfScope/Calculator.hpp
Thu Apr 13 05:51:46 2006
@@ -39,6 +39,7 @@
 	STORAGE_CLASS_INFO xsd__int div(xsd__int Value0,xsd__int Value1);
 
 private:
+	AnyType * getNextAnyTag(void);
 	void includeSecure();
 	Call *m_pCall;
 



Mime
View raw message