axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r385613 - in /webservices/axis/trunk/c/tests/auto_build/testcases: client/c/CalculatorDocClient.c client/c/CommonClientTestCode.h output/CalculatorDocC.c.out output/CalculatorDocC_ServerResponse.expected tests/CalculatorDocC.xml
Date Mon, 13 Mar 2006 18:30:45 GMT
Author: nadiramra
Date: Mon Mar 13 10:30:43 2006
New Revision: 385613

URL: http://svn.apache.org/viewcvs?rev=385613&view=rev
Log:
C support fixes/enhancements.

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC.c.out
    webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC_ServerResponse.expected
Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CalculatorDocClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CommonClientTestCode.h
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/CalculatorDocC.xml

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CalculatorDocClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CalculatorDocClient.c?rev=385613&r1=385612&r2=385613&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CalculatorDocClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CalculatorDocClient.c Mon
Mar 13 10:30:43 2006
@@ -13,25 +13,34 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include <axis/Axis.h>
+#include "CommonClientTestCode.h"
+
 #include "Calculator.h"
 
 #include <stdio.h>
 
-int main(int argc, char ** argv) {
-	AXISCHANDLE stub;
-	int ret = 0;
-	char *uri = "http://localhost:80/axis/Calculator";
-
-	if (argc>1) 
-		uri = argv[1];
-
-	stub = get_Calculator_stub(uri);
-	ret = add(stub,3,2);
-	if (get_Calculator_Status(stub) != AXISC_FAIL)
-		printf("%i\n",ret);
-		
-	destroy_Calculator_stub(stub);
+int main(int argc, char ** argv) 
+{
+    AXISCHANDLE stub;
+    int ret = 0;
+    char *uri = "http://localhost:80/axis/Calculator";
+
+    axiscRegisterExceptionHandler(exceptionHandler);
+
+    if (argc>1) 
+        uri = argv[1];
+
+    stub = get_Calculator_stub(uri);
+    ret = add(stub,3,2);
+    if (exceptionOccurred == C_TRUE ||
+        get_Calculator_Status(stub) == AXISC_FAIL)
+       printf("FAILED\n");
+    else
+       printf("%i\n",ret);
+        
+    destroy_Calculator_stub(stub);
 
-	printf("---------------------- TEST COMPLETE -----------------------------\n");
+    printf("---------------------- TEST COMPLETE -----------------------------\n");
 }
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CommonClientTestCode.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CommonClientTestCode.h?rev=385613&r1=385612&r2=385613&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CommonClientTestCode.h (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/CommonClientTestCode.h Mon
Mar 13 10:30:43 2006
@@ -9,15 +9,11 @@
 
 char *c_strdup(char *s)
 {
-	char * ret = (char *)malloc(strlen(s)+1);
-	strcpy(ret, s);
-	return ret;
+    char * ret = (char *)malloc(strlen(s)+1);
+    strcpy(ret, s);
+    return ret;
 }
 
-// Prototype
-C_BOOL parse_args(int *argc, char *argv[], char **endpoint);
-void shift_args_up(int i, int *argc, char *argv[]);
-
 #ifdef WIN32
       #define LONGLONGVALUE(value) value##I64
       #define UNSIGNED_LONGLONGVALUE(value) value##UI64
@@ -113,14 +109,14 @@
    char * pch = pString;
 
    if( pString == NULL)
-	   return NULL;
+       return NULL;
  
    /* while not EOL... */
    while( *pch != '\0' && iCount < iLength)
    {
          *pch = ASCIItoEBCDIC[*pch];
          pch++;
-		 iCount++;
+         iCount++;
    }
 
    *pch = '\0';
@@ -135,7 +131,7 @@
 char * asciiToStringOfLength( char * pString, int iLength)
 {
    if( pString == NULL)
-	   return NULL;
+       return NULL;
  
    pString[iLength] = '\0';
    return pString;
@@ -143,11 +139,12 @@
 
 #endif
 
-
+static C_BOOL exceptionOccurred = C_FALSE;
 void exceptionHandler(int errorCode, const char *errorString)
 {
-	printf("TEST EXCEPTION HANDLER: ERROR-CODE=%d, ERROR-STRING=%s\n", 
-	       errorCode, errorString);
+    exceptionOccurred = C_TRUE;    
+    printf("TEST EXCEPTION HANDLER: ERROR-CODE=%d, ERROR-STRING=%s\n", 
+           errorCode, errorString);
 }
 
 #endif

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC.c.out
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC.c.out?rev=385613&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC.c.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC.c.out Mon Mar
13 10:30:43 2006
@@ -0,0 +1,2 @@
+5
+---------------------- TEST COMPLETE -----------------------------

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC_ServerResponse.expected?rev=385613&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC_ServerResponse.expected
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/CalculatorDocC_ServerResponse.expected
Mon Mar 13 10:30:43 2006
@@ -0,0 +1,11 @@
+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
+
+1ad
+<?xml version="1.0" encoding="utf-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body><addResponse
xmlns="http://localhost/axis/Calculator"><addReturn>5</addReturn></addResponse></soapenv:Body></soapenv:Envelope>
+0
+

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/tests/CalculatorDocC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/CalculatorDocC.xml?rev=385613&r1=385612&r2=385613&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/CalculatorDocC.xml (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/CalculatorDocC.xml Mon Mar 13
10:30:43 2006
@@ -1,15 +1,15 @@
 <test>
     <name>CalculatorDocC</name>
-    <description>CalculatorDoc</description>
+    <description>CalculatorDocC</description>
     <clientLang>c</clientLang>
     <clientCode>CalculatorDocClient.c</clientCode>
     <wsdl>CalculatorDoc.wsdl</wsdl>
     <expected>
         <output>
-            CalculatorDoc.cpp.out
+            CalculatorDocC.c.out
         </output>
         <serverResponse>
-		CalculatorDoc_ServerResponse.expected
+		CalculatorDocC_ServerResponse.expected
         </serverResponse>
     </expected>
 	<endpoint>http://localhost:80/axis/CalculatorDoc</endpoint>



Mime
View raw message