rangika 2005/05/11 04:05:00
Modified: c/src/soap SoapAttachment.cpp
Log:
Modified SoapAttachment.cpp.
Revision Changes Path
1.8 +14 -0 ws-axis/c/src/soap/SoapAttachment.cpp
Index: SoapAttachment.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachment.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SoapAttachment.cpp 5 May 2005 08:56:13 -0000 1.7
+++ SoapAttachment.cpp 11 May 2005 11:05:00 -0000 1.8
@@ -92,6 +92,20 @@
else if (iEncodingStyle == AXIS_BINARY)
{
pSZ.serialize("\n", NULL);
+
+
+ string attachBody = m_binaryBody;
+
+ int boundary =
attachBody.find("------=_Part_0_6349096.11054186923",0);
+ if (boundary != -1)
+ {
+ string attachment = attachBody.substr(0,(boundary-1));
+ char* binary = new char[attachment.length() + 1];
+ strcpy(binary, attachment.c_str());
+ m_binaryBody = binary;
+ pSZ.serialize(m_binaryBody, NULL);
+ }
+ else
pSZ.serialize(m_binaryBody, NULL);
}