axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r400126 - in /webservices/axis/trunk/c/tests/auto_build/testcases/client/c: XSD_IDClient.c XSD_NCNameClient.c XSD_NameClient.c
Date Fri, 05 May 2006 18:09:49 GMT
Author: nadiramra
Date: Fri May  5 11:09:46 2006
New Revision: 400126

URL: http://svn.apache.org/viewcvs?rev=400126&view=rev
Log:
C support fixes/enhancements. Testcases for C bindings.

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NCNameClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NameClient.c

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c?rev=400126&r1=400125&r2=400126&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_IDClient.c Fri May  5
11:09:46 2006
@@ -246,15 +246,16 @@
 /* Optional Attributes currently unsupported by WSDL2Ws
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
-        input = new char[25];
-        strcpy (input, simpleID);
+    {
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(input);
-        OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        OptionalAttributeElement* optionalAttributeResult;
+        
+        optionalAttributeInput.setoptionalAttribute = simpleID;
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("optional attribute, with data=" << optionalAttributeResult->getoptionalAttribute()
<< endl;
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("optional attribute, with data=%s\n", optionalAttributeResult->optionalAttribute);
             else
                 printf("optional attribute, with data=<empty>\n");
 
@@ -262,39 +263,38 @@
         else
             printf("optional attribute, with data=<not present>\n");
 
-        delete [] input;
-        delete optionalAttributeResult;
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
 
         // Test empty optional attribute
-        emptyInput = new char[1];
-        strcpy (emptyInput, emptyID);
-        optionalAttributeInput.setoptionalAttribute(emptyInput);
-        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        optionalAttributeInput.optionalAttribute = emptyInput;
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("empty optional attribute=" << optionalAttributeResult->getoptionalAttribute()
<< endl;
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("empty optional attribute=%s\n", optionalAttributeResult->optionalAttribute);
             else
                 printf("empty optional attribute=<empty>\n");
         }
         else
             printf("empty optional attribute=<not present>\n");
-        delete [] emptyInput;
-        delete optionalAttributeResult;
+
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
 
         // Test optional attribute, not present
         // optionalAttributeInput.setattribute();
-        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("optional attribute, not present=" << optionalAttributeResult->getoptionalAttribute()
<< endl;
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("optional attribute, not present=%s\n", optionalAttributeResult->optionalAttribute);
             else
                 printf("optional attribute, not present=<empty>\n");
         }
         else
             printf("optional attribute, not present=<not present>\n");
-        delete optionalAttributeResult;
+            
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
+    }
 */
 
     // Test array

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NCNameClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NCNameClient.c?rev=400126&r1=400125&r2=400126&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NCNameClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NCNameClient.c Fri May
 5 11:09:46 2006
@@ -187,55 +187,55 @@
 /* Optional Attributes currently unsupported by WSDL2Ws
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
-        input = new char[25];
-        strcpy (input, simpleNCName);
+   {
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(input);
-        OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        OptionalAttributeElement* optionalAttributeResult;
+        
+        optionalAttributeInput.optionalAttribute = simpleNCName;
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("optional attribute, with data=%s\n", optionalAttributeResult->getoptionalAttribute()
);
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("optional attribute, with data=%s\n", optionalAttributeResult->optionalAttribute);
             else
-                printf("optional attribute, with data=<empty>" );
+                printf("optional attribute, with data=<empty>\n" );
         }
         else
-            printf("optional attribute, with data=<not present>" );
+            printf("optional attribute, with data=<not present>\n" );
 
-        delete [] input;
-        delete optionalAttributeResult;
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
 
         // Test empty optional attribute
-        input = new char[1];
-        strcpy (input, emptyNCName);
-        optionalAttributeInput.setoptionalAttribute(input);
-        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        optionalAttributeInput.optionalAttribute = emptyNCName;
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        
+        if (optionalAttributeResult->optionalAttribute())
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("empty optional attribute=%s\n", optionalAttributeResult->getoptionalAttribute()
);
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("empty optional attribute=%s\n", optionalAttributeResult->optionalAttribute
);
             else
-                printf("empty optional attribute=<empty>" );
+                printf("empty optional attribute=<empty>\n" );
         }
         else
-            printf("empty optional attribute=<not present>" );
+            printf("empty optional attribute=<not present>\n" );
 
-        delete [] input;
-        delete optionalAttributeResult;
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
 
         // Test optional attribute, not present
-        // optionalAttributeInput.setattribute();
-        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("optional attribute, not present=%s\n", optionalAttributeResult->getoptionalAttribute()
);
+            if (*(optionalAttributeResult->getoptionalAttribute))
+                printf("optional attribute, not present=%s\n", optionalAttributeResult->optionalAttribute
);
             else
-                printf("optional attribute, not present=<empty>" );
+                printf("optional attribute, not present=<empty>\n" );
         }
         else
-            printf("optional attribute, not present=<not present>" );
-        delete optionalAttributeResult;
+            printf("optional attribute, not present=<not present>\n" );
+            
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
+    }
 */
 
     // Test array

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NameClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NameClient.c?rev=400126&r1=400125&r2=400126&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NameClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/XSD_NameClient.c Fri May
 5 11:09:46 2006
@@ -185,53 +185,54 @@
 /*  Optional Attributes currently unsupported by WSDL2Ws
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
+   {
         OptionalAttributeElement optionalAttributeInput;
+        OptionalAttributeElement* optionalAttributeResult;
+        
         optionalAttributeInput.optionalAttribute = simpleName;
-        OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        OptionalAttributeElement* optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("optional attribute, with data=" , optionalAttributeResult->getoptionalAttribute());
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("optional attribute, with data=%s\n" , optionalAttributeResult->optionalAttribute);
             else
-                printf("optional attribute, with data=<empty>");
+                printf("optional attribute, with data=<empty>\n");
         }
         else
-            printf("optional attribute, with data=<not present>");
+            printf("optional attribute, with data=<not present>\n");
 
-        delete [] input;
-        delete optionalAttributeResult;
+         Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
 
         // Test empty optional attribute
-        input = new char[1];
-        strcpy (input, emptyName);
-        optionalAttributeInput.setoptionalAttribute(input);
-        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        optionalAttributeInput.optionalAttribute = emptyName;
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("empty optional attribute=" , optionalAttributeResult->getoptionalAttribute());
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("empty optional attribute=%s\n" , optionalAttributeResult->optionalAttribute);
             else
-                printf("empty optional attribute=<empty>");
+                printf("empty optional attribute=<empty>\n");
         }
         else
-            printf("empty optional attribute=<not present>");
+            printf("empty optional attribute=<not present>\n");
 
-        delete [] input;
-        delete optionalAttributeResult;
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
 
         // Test optional attribute, not present
         // optionalAttributeInput.setattribute();
-        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
+        optionalAttributeResult = asOptionalAttribute(ws, &optionalAttributeInput);
+        if (optionalAttributeResult->optionalAttribute)
         {
-            if (*(optionalAttributeResult->getoptionalAttribute()))
-                printf("optional attribute, not present=" , optionalAttributeResult->getoptionalAttribute());
+            if (*(optionalAttributeResult->optionalAttribute))
+                printf("optional attribute, not present=%s\n" , optionalAttributeResult->optionalAttribute);
             else
-                printf("optional attribute, not present=<empty>");
+                printf("optional attribute, not present=<empty>\n");
         }
         else
-            printf("optional attribute, not present=<not present>");
-        delete optionalAttributeResult;
+            printf("optional attribute, not present=<not present>\n");
+            
+        Axis_Delete_OptionalAttributeElement(optionalAttributeResult, 0);
+    }
 */
 
     // Test array



Mime
View raw message