Why are attachments uploaded with Messages getting corrupted?
WebWorks_WriteArrow(WebWorksRootPath, “wwdd1028228”, true); WebWorks_WriteDIVOpen(“wwdd1028228”, true); This may be due to incorrectly encoding a file before sending it. The schema has a data type of xsd:base64Binary which is mapped to a byte array in .NET and Axis (java). On the client side we only need to pass a text or binary file as a byte array with no further base64 encoding. Therefore, do NOT Base64 Encode the file before sending it to Axis or .NET as these layers will do so themselves. Sample Code: Correct ——– fis = new FileInputStream(inFile); b = new byte[(int)inFile.length()]; fis.read(b); myMediaItem.setContent(b); ——– Incorrect ——— fis = new FileInputStream(inFile); b = new byte[(int)inFile.length()]; fis.read(b); myMediaItem.setContent(new String(Base64.