Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 77841 invoked from network); 16 Jun 2005 16:00:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Jun 2005 16:00:12 -0000 Received: (qmail 72038 invoked by uid 500); 16 Jun 2005 16:00:09 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 71978 invoked by uid 500); 16 Jun 2005 16:00:08 -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 71960 invoked by uid 99); 16 Jun 2005 16:00:08 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 16 Jun 2005 09:00:07 -0700 Received: (qmail 77631 invoked by uid 1498); 16 Jun 2005 15:59:44 -0000 Date: 16 Jun 2005 15:59:44 -0000 Message-ID: <20050616155944.77630.qmail@minotaur.apache.org> From: whitlock@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/c/tests/auto_build/testcases/tests DynUnrefAttachmentTest.xml DynamicAttachment.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N whitlock 2005/06/16 08:59:44 Modified: c/src/soap SoapSerializer.cpp c/tests/auto_build/testcases/output DynUnrefAttachmentTestRequest.out c/tests/auto_build/testcases unitTest.list Added: c/tests/auto_build/testcases/output DynamicAttachment.expected DynamicAttachmentRequest.out DynamicAttachment_ServerResponse.expected c/tests/auto_build/testcases/dynamic/DynamicAttachment DynamicAttachment.cpp c/tests/auto_build/testcases/tests DynUnrefAttachmentTest.xml DynamicAttachment.xml Log: More attachments fixes. Add two dashes to the start of each mime boundary and to the end of the last mime boundary. Add in dummy DynamicAttachment unit test Test request message for the DynUnrefAttachmentTest Revision Changes Path 1.127 +3 -4 ws-axis/c/src/soap/SoapSerializer.cpp Index: SoapSerializer.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v retrieving revision 1.126 retrieving revision 1.127 diff -u -r1.126 -r1.127 --- SoapSerializer.cpp 16 Jun 2005 14:19:15 -0000 1.126 +++ SoapSerializer.cpp 16 Jun 2005 15:59:44 -0000 1.127 @@ -334,7 +334,7 @@ ctype += ">\""; pStream->setTransportProperty( AXIS_CONTENT_TYPE, ctype.c_str()); - serialize("\n" MIMEBOUNDARY "\n", NULL); + serialize("\n--" MIMEBOUNDARY "\n", NULL); serialize(AXIS_CONTENT_TYPE ": text/xml; charset=UTF-8\n", NULL); serialize(AXIS_CONTENT_TRANSFER_ENCODING ": binary\n", NULL); @@ -359,7 +359,6 @@ if( checkAttachmentAvailability()) { - serialize( "\n" MIMEBOUNDARY, NULL); serializeAttachments( *this); } } @@ -1143,11 +1142,11 @@ map::iterator itCurrAttach= m_SoapAttachments.begin(); while( itCurrAttach != m_SoapAttachments.end()) { + serialize( "\n--" MIMEBOUNDARY, NULL); ((SoapAttachment *) ((*itCurrAttach).second))->serialize(pSZ); - pSZ.serialize("\n" MIMEBOUNDARY, NULL); itCurrAttach++; } - pSZ.serialize("\n", NULL); + pSZ.serialize("\n--" MIMEBOUNDARY "--\n", NULL); } void SoapSerializer::addAttachment( const AxisChar * achId, ISoapAttachment * pAttach) 1.2 +8 -8 ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTestRequest.out Index: DynUnrefAttachmentTestRequest.out =================================================================== RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTestRequest.out,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DynUnrefAttachmentTestRequest.out 16 Jun 2005 15:06:09 -0000 1.1 +++ DynUnrefAttachmentTestRequest.out 16 Jun 2005 15:59:44 -0000 1.2 @@ -2,10 +2,10 @@ Host: localhost:13260 SOAPAction: "Trash" Content-Type: multipart/related; type="text/xml"; boundary="------=MIME_BOUNDARY"; start="<6>" -Content-Length: 1393 +Content-Length: 1409 -------=MIME_BOUNDARY +--------=MIME_BOUNDARY Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: binary Content-Id: <6> @@ -19,39 +19,39 @@ -------=MIME_BOUNDARY +--------=MIME_BOUNDARY Content-Id: <2> Content-Type: text/plain Content-Transfer-Encoding: base64 VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA= -------=MIME_BOUNDARY +--------=MIME_BOUNDARY Content-Id: <3> Content-Type: text/plain Content-Transfer-Encoding: base64 VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA= -------=MIME_BOUNDARY +--------=MIME_BOUNDARY Content-Id: <4> Content-Type: text/plain Content-Transfer-Encoding: base64 VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA= -------=MIME_BOUNDARY +--------=MIME_BOUNDARY Content-Id: <5> Content-Type: text/plain Content-Transfer-Encoding: base64 VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA= -------=MIME_BOUNDARY +--------=MIME_BOUNDARY Content-Id: Content-Type: text/plain Content-Transfer-Encoding: base64 VGhpcyBpcyB0aGUgYXR0YWNobWVudCBib2R5IGZvciB0aGUgRHluVW5yZWZBdHRhY2htZW50VGVzdAA= -------=MIME_BOUNDARY +--------=MIME_BOUNDARY-- 1.1 ws-axis/c/tests/auto_build/testcases/output/DynamicAttachment.expected Index: DynamicAttachment.expected =================================================================== Invoking... ----------------------------TEST COMPLETE-------------------------------- 1.1 ws-axis/c/tests/auto_build/testcases/output/DynamicAttachmentRequest.out Index: DynamicAttachmentRequest.out =================================================================== POST /DynamicAttachment/services/DynamicAttachment HTTP/1.1 Host: localhost:13260 Content-Type: text/xml; charset=UTF-8 SOAPAction: "Trash" Content-Length: 346 1.1 ws-axis/c/tests/auto_build/testcases/output/DynamicAttachment_ServerResponse.expected Index: DynamicAttachment_ServerResponse.expected =================================================================== 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 ### 5 0 1.3 +1 -0 ws-axis/c/tests/auto_build/testcases/unitTest.list Index: unitTest.list =================================================================== RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/unitTest.list,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- unitTest.list 14 Jun 2005 16:47:21 -0000 1.2 +++ unitTest.list 16 Jun 2005 15:59:44 -0000 1.3 @@ -1,6 +1,7 @@ AxisBench.xml ComplexLists.xml ComplexTypesAll.xml +DynamicAttachment.xml DynamicGet_AddAnyObjectTest.xml DynUnrefAttachmentTest.xml Enumeration.xml 1.1 ws-axis/c/tests/auto_build/testcases/dynamic/DynamicAttachment/DynamicAttachment.cpp Index: DynamicAttachment.cpp =================================================================== // Copyright 2003-2004 The Apache Software Foundation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include #include #include #include #include #include #include using namespace std; AXIS_CPP_NAMESPACE_USE int main(int argc, char* argv[]) { try { Call call; call.setEndpointURI(argv[1]); call.initialize(CPP_DOC_PROVIDER); call.setSOAPVersion(SOAP_VER_1_1); call.setTransportProperty(SOAPACTION_HEADER , "Trash"); call.setOperation("put", "http://localhost/axis/DynamicAttachment"); cout << "Invoking..." << endl; if (AXIS_SUCCESS != call.invoke()) { cout << "Invoke failed" << endl; return 0; } if(AXIS_SUCCESS != call.checkMessage("putResponse", "http://localhost/axis/DynamicAttachment")) { cout << "Check message failed" << endl; return 0; } call.unInitialize(); } catch(AxisException& e) { cout << "Exception : " << e.what()<< endl; } catch(exception& e) { cout << "Unknown exception has occured" << endl; } catch(...) { cout << "Unspecified exception has occured" << endl; } cout << "----------------------------TEST COMPLETE--------------------------------" << endl; return 0; } 1.1 ws-axis/c/tests/auto_build/testcases/tests/DynUnrefAttachmentTest.xml Index: DynUnrefAttachmentTest.xml =================================================================== DynUnrefAttachmentTest DynUnrefAttachmentTest true DynUnrefAttachmentTest cpp CalculatorDoc.wsdl DynUnrefAttachmentTest.expected DynUnrefAttachmentTestRequest.out DynUnrefAttachment_ServerResponse.expected http://localhost:80/DynUnrefAttachment/services/DynUnrefAttachment 1.1 ws-axis/c/tests/auto_build/testcases/tests/DynamicAttachment.xml Index: DynamicAttachment.xml =================================================================== DynamicAttachment DynamicAttachment true DynamicAttachment cpp CalculatorDoc.wsdl DynamicAttachment.expected DynamicAttachmentRequest.out DynamicAttachment_ServerResponse.expected http://localhost:80/DynamicAttachment/services/DynamicAttachment