Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 26144 invoked from network); 28 Jan 2005 11:17:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Jan 2005 11:17:15 -0000 Received: (qmail 76696 invoked by uid 500); 28 Jan 2005 11:17:12 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 76663 invoked by uid 500); 28 Jan 2005 11:17:12 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 76648 invoked by uid 99); 28 Jan 2005 11:17:12 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,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; Fri, 28 Jan 2005 03:17:10 -0800 Received: (qmail 26100 invoked by uid 1968); 28 Jan 2005 11:17:08 -0000 Date: 28 Jan 2005 11:17:08 -0000 Message-ID: <20050128111708.26099.qmail@minotaur.apache.org> From: rangika@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/c/src/soap SoapSerializer.cpp X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N rangika 2005/01/28 03:17:08 Modified: c/src/soap SoapSerializer.cpp Log: serializeAsCharData() doesn't serialize base64 properly.So I modified it. Revision Changes Path 1.91 +18 -2 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.90 retrieving revision 1.91 diff -u -r1.90 -r1.91 --- SoapSerializer.cpp 27 Jan 2005 08:32:37 -0000 1.90 +++ SoapSerializer.cpp 28 Jan 2005 11:17:08 -0000 1.91 @@ -250,6 +250,21 @@ if(m_pSoapEnvelope) { if (checkAttachmentAvailability()) { + + string asStartID; + string asSOAPMimeHeaders; + asSOAPMimeHeaders = pStream->getIncomingSOAPMimeHeaders(); + int start= asSOAPMimeHeaders.find("Content-Type"); + int startPosIdValue = asSOAPMimeHeaders.find ("<",start+strlen("Content-Id:"))+1; + int endPosIdValue = asSOAPMimeHeaders.find(">", start+strlen("Content-Type")); + int length = endPosIdValue - startPosIdValue ; + asStartID = asSOAPMimeHeaders.substr (startPosIdValue,length); + + string * asContentType = new string("multipart/related; type=\"text/xml\"; start=\"<"); + *asContentType=*asContentType + asStartID + ">\""; + *asContentType=*asContentType +"; boundary=\"------=MIME BOUNDARY\""; + pStream->setTransportProperty(CONTENT_TYPE, (*asContentType).c_str()); + serialize("\n------=MIME BOUNDARY\n", NULL); serialize(pStream->getIncomingSOAPMimeHeaders(), "\n\n", NULL); } @@ -912,7 +927,7 @@ int SoapSerializer::serializeAsChardata(void* pValue, XSDTYPE type) { - const char* pStr = m_Buf; + char* pStr = m_Buf; switch (type) { case XSD_INT: @@ -1031,7 +1046,8 @@ case XSD_BASE64BINARY: { Base64Binary base64BinarySerializer; - pStr = base64BinarySerializer.serialize(pValue); + //pStr = base64BinarySerializer.serialize(pValue); + strcpy(pStr, base64BinarySerializer.serialize(pValue)); } break; case XSD_DATETIME: