axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r356787 [2/2] - in /webservices/axis/trunk/c: include/axis/ src/common/ src/engine/ src/soap/ src/soap/xsd/ src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ tests/auto_build/testcases/ tests/auto_build/testcases/client/cpp/ tests/auto_bui...
Date Wed, 14 Dec 2005 15:06:47 GMT
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp?rev=356787&r1=356786&r2=356787&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp
Wed Dec 14 07:06:03 2005
@@ -38,14 +38,15 @@
 
         xsd__unsignedByte* testUB = (xsd__unsignedByte*)stringToAscii("<test><xml>some
dod&y string</xml></test>");
 
-        input.__ptr=testUB;
-        input.__size=41;
+        input.set(testUB, 41);
 
         // Test non-nillable element
         xsd__hexBinary result = ws->asNonNillableElement(input);
         cout << "non-nillable element" << endl;
-        cout << " size=" << result.__size << endl;
-        cout << " data=" << asciiToStringOfLength((char *)result.__ptr, result.__size)
<< endl;
+        int size = 0;
+        const xsd__unsignedByte * data = result.get(size);
+        cout << " size=" << size << endl;
+        cout << " data=" << asciiToStringOfLength((char *)data, size) <<
endl;
 
         // Test nillable element, with a value
         xsd__hexBinary* nillableInput = new xsd__hexBinary();
@@ -54,8 +55,10 @@
         if (nillableResult)
         {
             cout << "nillable element" << endl;
-            cout << " size=" << nillableResult->__size << endl;
-            cout << " data=" << asciiToStringOfLength((char *)nillableResult->__ptr,
nillableResult->__size) << endl;
+            size = 0;
+            data = nillableResult->get(size);
+            cout << " size=" << size << endl;
+            cout << " data=" << asciiToStringOfLength((char *)data, size) <<
endl;
             delete nillableResult;
         }
         else
@@ -69,8 +72,10 @@
         if (nillableResult)
         {
             cout << "nillable element" << endl;
-            cout << " size=" << nillableResult->__size << endl;
-            cout << " data=" << asciiToStringOfLength((char *)nillableResult->__ptr,
nillableResult->__size) << endl;
+            size = 0 ;
+            data = nillableResult->get(size);
+            cout << " size=" << size << endl;
+            cout << " data=" << asciiToStringOfLength((char *)data, size) <<
endl;
             delete nillableResult;
         }
         else
@@ -78,49 +83,6 @@
             cout << "nil element=<nil>" << endl;
         }
 
-        // Test required attribute
-        /* RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(input);
-        RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
-        cout << "required attribute" << endl;
-        cout << " size=" << requiredAttributeResult->getrequiredAttribute().__size
<< endl;
-        cout << " data=" << asciiToStringOfLength((char *)requiredAttributeResult->getrequiredAttribute().__ptr,
requiredAttributeResult->getrequiredAttribute().__size) << endl;
-        delete requiredAttributeResult; */ 
-
-/* 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;
-        optionalAttributeInput.setoptionalAttribute(input);
-        OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
-        {
-            cout << "optional attribute, with data" << endl;
-            cout << " size=" << optionalAttributeResult->getoptionalAttribute()->__size
<< endl;
-            cout << " data=" << asciiToStringOfLength((char *)optionalAttributeResult->getoptionalAttribute()->__ptr,
optionalAttributeResult->getoptionalAttribute()->__size) << endl;
-        }
-        else
-        {
-            cout << "optional attribute, with data=<not present>" << endl;
-        }
-        delete optionalAttributeResult;
-
-        // Test optional attribute, not present
-        optionalAttributeInput.setattribute();
-        optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
-        if (optionalAttributeResult->getoptionalAttribute())
-        {
-            cout << "optional attribute, not present" << endl;
-            cout << " size=" << optionalAttributeResult->getoptionalAttribute()->__size
<< endl;
-            cout << " data=" << optionalAttributeResult->getoptionalAttribute()->__ptr
<< endl;
-        }
-        else
-        {
-            cout << "optional attribute, not present=<not present>" <<
endl;
-        }
-        delete optionalAttributeResult;
-*/
-
         // Test array
         xsd__hexBinary_Array arrayInput;
 		int arraySize = 2;
@@ -137,8 +99,10 @@
         for (int index = 0; index < outputSize; index++)
         {
             cout << " element[" << index << "]" << endl;
-            cout << "  size=" << output[index]->__size << endl;
-            cout << "  data=" << asciiToStringOfLength((char *)output[index]->__ptr,
output[index]->__size) << endl;
+            size = 0;
+            data = output[index]->get(size);
+            cout << "  size=" << size << endl;
+            cout << "  data=" << asciiToStringOfLength((char *)data, size) <<
endl;
             
         }
         // Clear up input array        
@@ -154,8 +118,10 @@
         complexTypeInput.setcomplexTypeElement(input);
         SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
         cout << "within complex type" << endl;
-        cout << " size=" << complexTypeResult->getcomplexTypeElement().__size
<< endl;
-        cout << " data=" << asciiToStringOfLength((char *)complexTypeResult->getcomplexTypeElement().__ptr,
complexTypeResult->getcomplexTypeElement().__size) << endl;
+        size = 0;
+        data = complexTypeResult->getcomplexTypeElement().get(size);
+        cout << " size=" << size << endl;
+        cout << " data=" << asciiToStringOfLength((char *)data, size) <<
endl;
         delete complexTypeResult;
 
         // Tests now complete

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/nillableComplexTypeClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/nillableComplexTypeClient.cpp?rev=356787&r1=356786&r2=356787&view=diff
==============================================================================
Binary files - no diff available.

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynUnrefAttachmentTest/DynUnrefAttachmentTest.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynUnrefAttachmentTest/DynUnrefAttachmentTest.cpp?rev=356787&r1=356786&r2=356787&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynUnrefAttachmentTest/DynUnrefAttachmentTest.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynUnrefAttachmentTest/DynUnrefAttachmentTest.cpp
Wed Dec 14 07:06:03 2005
@@ -50,8 +50,7 @@
 
 			char *text = stringToAscii("This is the attachment body for the DynUnrefAttachmentTest");
 
-			b64b.__ptr = (xsd__unsignedByte*)text;
-			b64b.__size = strlen(text)+1;
+            b64b.set((xsd__unsignedByte *) text, strlen(text) + 1);
 			att->addBody(&b64b);	
 
 			call.addAttachment(att);

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicAttachment/DynamicAttachment.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicAttachment/DynamicAttachment.cpp?rev=356787&r1=356786&r2=356787&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicAttachment/DynamicAttachment.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/DynamicAttachment/DynamicAttachment.cpp
Wed Dec 14 07:06:03 2005
@@ -50,8 +50,7 @@
 		att->addHeader(AXIS_CONTENT_TRANSFER_ENCODING,"base64");
 		
 		xsd__base64Binary b64b1;
-		b64b1.__ptr = (xsd__unsignedByte*)text;
-		b64b1.__size = strlen(text)+1;
+        b64b1.set((xsd__unsignedByte *) text, strlen(text) + 1);
 		att->addBody(&b64b1);	
 
 		call.addAttachmentParameter(att, "arg_attachment_1");
@@ -66,8 +65,7 @@
 		att->addHeader(AXIS_CONTENT_TRANSFER_ENCODING,"base64");
 		
 		xsd__base64Binary b64b2;
-		b64b2.__ptr = (xsd__unsignedByte*)text;
-		b64b2.__size = strlen(text)+1;
+        b64b2.set((xsd__unsignedByte *) text, strlen(text) + 1);
 		att->addBody(&b64b2);	
 
 		call.addAttachmentParameter(att, "arg_attachment_2");
@@ -81,8 +79,7 @@
 		att->addHeader(AXIS_CONTENT_TRANSFER_ENCODING,"base64");
 		
 		xsd__base64Binary b64b3;
-		b64b3.__ptr = (xsd__unsignedByte*)text;
-		b64b3.__size = strlen(text)+1;
+        b64b3.set((xsd__unsignedByte*)text, strlen(text)+1);
 		att->addBody(&b64b3);	
 
 		IAttribute *attrs[2];
@@ -100,8 +97,7 @@
 		att->addHeader(AXIS_CONTENT_TRANSFER_ENCODING,"base64");
 		
 		xsd__base64Binary b64b4;
-		b64b4.__ptr = (xsd__unsignedByte*)text;
-		b64b4.__size = strlen(text)+1;
+        b64b4.set((xsd__unsignedByte*)text, strlen(text)+1);
 		att->addBody(&b64b4);	
 
 		call.addAttachment(att);

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData.expected?rev=356787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData.expected
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData.expected
Wed Dec 14 07:06:03 2005
@@ -0,0 +1,10 @@
+within received complex type
+ size = 6
+ data = { 255, 1, 254, 2, 127, 0 }
+within received complex type after deleting web service
+ size = 6
+ data = { 255, 1, 254, 2, 127, 0 }
+within received complex type after re-creating and invoking web service
+ size = 6
+ data = { 255, 1, 254, 2, 127, 0 }
+---------------------- TEST COMPLETE -----------------------------

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData_ServerResponse.expected?rev=356787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData_ServerResponse.expected
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_base64BinaryTestValidData_ServerResponse.expected
Wed Dec 14 07:06:03 2005
@@ -0,0 +1,22 @@
+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"?>
+<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><asComplexTypeResponse xmlns="http://xsd_base64Binary.test.apache.org"><SimpleComplexType><complexTypeElement>/wH+An8A</complexTypeElement></SimpleComplexType></asComplexTypeResponse></soapenv:Body></soapenv:Envelope>
+0
+
+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"?>
+<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><asComplexTypeResponse xmlns="http://xsd_base64Binary.test.apache.org"><SimpleComplexType><complexTypeElement>AAECAwQFBgcICf/+/fz7+g==</complexTypeElement></SimpleComplexType></asComplexTypeResponse></soapenv:Body></soapenv:Envelope>
+0
+

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_base64BinaryTestValidData.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_base64BinaryTestValidData.xml?rev=356787&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_base64BinaryTestValidData.xml
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/XSD_base64BinaryTestValidData.xml
Wed Dec 14 07:06:03 2005
@@ -0,0 +1,18 @@
+<test>
+    <name>XSD_base64BinaryTestValidData</name>
+    <description>Test serialization and deserialization of the XSD built-in simple
type base64Binary</description>
+    <clientLang>cpp</clientLang>
+    <clientCode>XSD_base64BinaryTestValidDataClient.cpp</clientCode>
+	<stubAsLibrary>true</stubAsLibrary>
+    <wsdl>XSD_base64Binary.wsdl</wsdl>
+    <expected>
+        <output>
+            XSD_base64BinaryTestValidData.expected
+        </output>
+		<serverResponse>
+			XSD_base64BinaryTestValidData_ServerResponse.expected
+	    </serverResponse>
+    </expected>
+	<endpoint>http://localhost:80/axis/XSD_base64Binary</endpoint>
+</test>
+

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



Mime
View raw message