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 2007/01/14 08:57:13 UTC

svn commit: r496035 - in /webservices/axis/trunk/c/tests/auto_build/testcases: client/cpp/EmptyArrayOfStringClient.cpp output/EmptyArrayOfString.cpp.out output/EmptyArrayOfString_ServerResponse.expected tests/EmptyArrayOfString.xml unitTest.list

Author: nadiramra
Date: Sat Jan 13 23:57:11 2007
New Revision: 496035

URL: http://svn.apache.org/viewvc?view=rev&rev=496035
Log:
New test case to validate AXISCPP-891

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/EmptyArrayOfStringClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString.cpp.out
    webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString_ServerResponse.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/EmptyArrayOfString.xml
Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/EmptyArrayOfStringClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/EmptyArrayOfStringClient.cpp?view=auto&rev=496035
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/EmptyArrayOfStringClient.cpp (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/EmptyArrayOfStringClient.cpp Sat Jan 13 23:57:11 2007
@@ -0,0 +1,65 @@
+#include "EmptyArrayOfString.hpp"
+#include <iostream>
+
+// Test that a start/end element is handled correctly.
+
+int main( int argc, char * argv[])
+{
+	char *	pszEndpoint = "http://localhost:9020/UnitTest_EmptyArrayOfString";
+
+	// If there are arguments, replace the default URL with that specified on the
+	// command line.
+	if( argc > 1)
+	{
+		pszEndpoint = argv[1];
+	}
+
+	// Create the web service.
+	EmptyArrayOfString  ws( pszEndpoint, APTHTTP1_1);
+
+	try
+	{
+        // Issue we service require
+        NewOperationResponse_Param_NewOperationResponse* out = ws.NewOperation(20);
+        
+        // Dump output response
+        if (out == NULL)
+            cout << "Test failed, NULL response" << endl;
+        else
+        {
+            int arraySize = -1;
+            if (out->ListInfoString == NULL)
+                cout << "Test failed, Expecting data for field ListInfoString" << endl;
+            else if (out->ListInfoString->_string == NULL)
+                cout << "Test failed, Expecting data for field _string" << endl;
+            else if (out->ListInfoString->_string->get(arraySize) != NULL || arraySize != 0)
+                cout << "Test failed, Expecting zero-size array" << endl;
+                
+            if (out->SomeString == NULL)
+                cout << "Test failed, Expecting data for field SomeString" << endl;
+            else
+                cout << "SomeString = " << out->SomeString << endl;
+        }
+        
+        delete out;
+	}
+
+	// Catch those exceptions!
+	catch( AxisException& e)
+	{
+		cout << "Exception : " << e.what() << endl;
+	}
+	catch( exception& e)
+	{
+	    cout << "Unknown exception has occured: " << e.what() << endl;
+	}
+	catch( ...)
+	{
+	    cout << "Unknown exception has occured" << endl;
+	}
+
+	// Done!
+	cout << "---------------------- TEST COMPLETE -----------------------------" << endl;
+
+	return 0;
+}
\ No newline at end of file

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString.cpp.out?view=auto&rev=496035
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString.cpp.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString.cpp.out Sat Jan 13 23:57:11 2007
@@ -0,0 +1,2 @@
+SomeString = Testing start and end tags, empty element
+---------------------- TEST COMPLETE -----------------------------

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString_ServerResponse.expected?view=auto&rev=496035
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/EmptyArrayOfString_ServerResponse.expected Sat Jan 13 23:57:11 2007
@@ -0,0 +1,21 @@
+HTTP/1.1 200 OK
+Server: WebSphere Application Server/5.1
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-GB
+Transfer-Encoding: chunked
+
+###
+<?xml version="1.0" encoding="utf-8"?>                                    
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"     
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                     
+xmlns:xsd="http://www.w3.org/2001/XMLSchema">                             
+<soap:Body>
+<NewOperationResponse xmlns="http://startendelement.test.apache.org">                                                                  
+      <Param_NewOperationResponse>
+        <ListInfoString></ListInfoString>                                                   
+        <SomeString>Testing start and end tags, empty element</SomeString>                       
+      </Param_NewOperationResponse>                                               
+</NewOperationResponse>                                               
+</soap:Body>                                                            
+</soap:Envelope>         
+0

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/EmptyArrayOfString.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/EmptyArrayOfString.xml?view=auto&rev=496035
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/EmptyArrayOfString.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/EmptyArrayOfString.xml Sat Jan 13 23:57:11 2007
@@ -0,0 +1,16 @@
+<test>
+  <name>EmptyArrayOfString</name>
+  <description>EmptyArrayOfString</description>
+  <clientLang>cpp</clientLang>
+  <clientCode>EmptyArrayOfStringClient.cpp</clientCode>
+  <wsdl>EmptyArrayOfString.wsdl</wsdl>
+  <expected>
+    <output>
+      EmptyArrayOfString.cpp.out
+    </output>
+    <serverResponse>
+      EmptyArrayOfString_ServerResponse.expected
+    </serverResponse>
+  </expected>
+  <endpoint>http://localhost:80/EmptyArrayOfString</endpoint>
+</test>

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list?view=diff&rev=496035&r1=496034&r2=496035
==============================================================================
Binary files - no diff available.



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