Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 53028 invoked from network); 14 Nov 2005 13:04:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Nov 2005 13:04:28 -0000 Received: (qmail 98117 invoked by uid 500); 14 Nov 2005 13:04:27 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 97861 invoked by uid 500); 14 Nov 2005 13:04:26 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 97850 invoked by uid 99); 14 Nov 2005 13:04:26 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 14 Nov 2005 05:04:26 -0800 Received: (qmail 52857 invoked by uid 65534); 14 Nov 2005 13:04:06 -0000 Message-ID: <20051114130406.52856.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r344112 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_anyURI2Client.cpp Date: Mon, 14 Nov 2005 13:04:05 -0000 To: axis-cvs@ws.apache.org From: jamejose@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jamejose Date: Mon Nov 14 05:03:47 2005 New Revision: 344112 URL: http://svn.apache.org/viewcvs?rev=344112&view=rev Log: Updated the testcase with new Array APIs Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_anyURI2Client.cpp Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_anyURI2Client.cpp URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_anyURI2Client.cpp?rev=344112&r1=344111&r2=344112&view=diff ============================================================================== --- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_anyURI2Client.cpp (original) +++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_anyURI2Client.cpp Mon Nov 14 05:03:47 2005 @@ -308,38 +308,44 @@ // Test array xsd__anyURI_Array arrayInput; - arrayInput.m_Array = new xsd__anyURI[2]; - arrayInput.m_Size = 2; - for (int inputIndex=0 ; inputIndex < 2 ; inputIndex++) + int arraySize = 2; + xsd__anyURI * array = new xsd__anyURI[arraySize]; + for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++) { - input = new char[25]; - strcpy (input, simpleanyURI); - arrayInput.m_Array[inputIndex] = input; + array[inputIndex] = new char[25]; + strcpy (array[inputIndex], simpleanyURI); } + arrayInput.set(array,arraySize); //ws->setTransportProperty("SOAPAction" , "XSD_anyURI#asArray"); - xsd__anyURI_Array arrayResult = ws->asArray(arrayInput); - cout << "array of " << arrayResult.m_Size << " elements" << endl; - for (int index = 0; index < arrayResult.m_Size ; index++) + xsd__anyURI_Array* arrayResult = ws->asArray(&arrayInput); + int outputSize =0; + const xsd__anyURI *output = arrayResult->get(outputSize); + cout << "array of " << outputSize << " elements" << endl; + for (int index = 0; index < outputSize ; index++) { - if (arrayResult.m_Array[index]) + if (output[index]) { - if (*(arrayResult.m_Array[index])) + if (*(output[index])) { - cout << " element[" << index << "]=" << arrayResult.m_Array[index] << endl; + cout << " element[" << index << "]=" << output[index] << endl; } else { cout << " element[" << index << "]=" << endl; } - delete arrayResult.m_Array[index]; + } else { cout << " element[" << index << "]=" << endl; } } - delete [] arrayInput.m_Array; - delete [] arrayResult.m_Array; + // Clear up input array + for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ ) + { + delete array[deleteIndex]; + } + delete [] array; // Test complex type input = new char[25];