axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r396784 - in /webservices/axis/trunk/c/tests/auto_build/testcases: client/c/SimpleTypeInnerUnboundedInOutputClient.c tests/SimpleTypeInnerUnboundedC.xml tests/SimpleTypeInnerUnboundedInOutputC.xml
Date Tue, 25 Apr 2006 06:33:25 GMT
Author: nadiramra
Date: Mon Apr 24 23:33:22 2006
New Revision: 396784

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

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedC.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedInOutputC.xml
Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedInOutputClient.c

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedInOutputClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedInOutputClient.c?rev=396784&r1=396783&r2=396784&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedInOutputClient.c
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedInOutputClient.c
Mon Apr 24 23:33:22 2006
@@ -13,32 +13,61 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+#include "CommonClientTestCode.h"
 #include "SimpleTypeInnerUnboundedInOutputWS.h" 
 
+#define WSDL_DEFAULT_ENDPOINT "http://localhost:9080/SimpleTypeInnerUnboundedInOutput/services/sampleWS"
+
+
 int main(int argc, char* argv[])
 { 
-  int i;
-  int size;
-  void * pStub = get_SimpleTypeInnerUnboundedInOutputWS_stub ();
-
-  Type1* result;
-
-  size = 10;
-
-  result = getInput(pStub,size);
-
-  if ( result == NULL )
-   printf ("NULL\n");
-  else {
-    Type1_ident* pTemp = result->ident.m_Array;
-    for ( i = 0; i < result->ident.m_Size; i++ ) {
-      printf ("Result [%d] : %s\n",i,pTemp[i]);
-    }
-  }
+    AXISCHANDLE ws;
+    
+    int returnValue = 1; // Assume failure
+    char *endpoint = WSDL_DEFAULT_ENDPOINT;
+    
+    Type1* result;
+    int i;
+    xsdc__int size = 10;
+    
+    axiscAxisRegisterExceptionHandler(exceptionHandler);
+
+    if (argc>2 && strcmp(argv[1], "-e") == 0) 
+        endpoint = argv[2];      
+        
+    ws = get_SimpleTypeInnerUnboundedInOutputWS_stub(endpoint);
+
+    result = getInput(ws, &size);
+
+    if (exceptionOccurred == C_TRUE ||
+        get_SimpleTypeInnerUnboundedInOutputWS_Status(ws) == AXISC_FAIL ||
+        result == NULL)
+       printf("FAILED\n");    
+    else 
+    {  
+        xsdc__string_Array * output = result->ident;
+        int size = output->m_Size;
+        const xsdc__string* array = output->m_Array;
+        if (array != NULL)
+        {
+            if (size > 0)
+                for ( i = 0 ; i < size ; i++)
+                    printf("Result [%d] : %s\n", i, array[i]);
+            else
+                printf("empty array\n");
+        }
+        else
+            printf("NULL array\n");
 
-  Axis_Delete_Type1(result,0,0);
+      returnValue = 0; // Success
+    }
 
-  destroy_SimpleTypeInnerUnboundedInOutputWS_stub(pStub);
+  destroy_SimpleTypeInnerUnboundedInOutputWS_stub(ws);
   
-  return 0;
+  printf("---------------------- TEST COMPLETE -----------------------------\n");
+  return returnValue;
 }

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedC.xml?rev=396784&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedC.xml
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedC.xml
Mon Apr 24 23:33:22 2006
@@ -0,0 +1,13 @@
+<test>
+    <name>SimpleTypeInnerUnboundedC</name>
+    <description>SimpleTypeInnerUnboundedC</description>
+    <clientLang>c</clientLang>
+    <clientCode>SimpleTypeInnerUnboundedClient.c</clientCode>
+    <wsdl>SimpleTypeInnerUnbounded.wsdl</wsdl>
+    <expected>
+        <output>
+            SimpleTypeInnerUnbounded.cpp.out
+        </output>
+    </expected>
+	<endpoint>-e http://localhost:80/axis/SimpleTypeInnerUnbounded</endpoint>
+</test>

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedInOutputC.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedInOutputC.xml?rev=396784&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedInOutputC.xml
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/SimpleTypeInnerUnboundedInOutputC.xml
Mon Apr 24 23:33:22 2006
@@ -0,0 +1,13 @@
+<test>
+    <name>SimpleTypeInnerUnboundedInOutputC</name>
+    <description>SimpleTypeInnerUnboundedInOutputC</description>
+    <clientLang>c</clientLang>
+    <clientCode>SimpleTypeInnerUnboundedInOutputClient.c</clientCode>
+    <wsdl>SimpleTypeInnerUnboundedInOutput.wsdl</wsdl>
+    <expected>
+        <output>
+            SimpleTypeInnerUnboundedInOutput.cpp.out
+        </output>
+    </expected>
+	<endpoint>-e http://localhost:80/axis/SimpleTypeInnerUnboundedInOutput</endpoint>
+</test>



Mime
View raw message