+ Start a Discussion
GudachariGudachari 

Encoding Pattern For Outlook Connector And Apex Data Loader

Hi All,

 

I am using Salesforce Outlook Connector in microsoft outlook to sync the mails and contacts and etc.. I am capturing the requests and responses through Burp and Fiddler. I just send an attachment using Salesforce Outlook Connector and I capture that requests and the salesforce is sending the attachment content in a Base64 format. I just trying to decode the content using the apache commons codec but its not properly decoded. For example I uploaded 2MB file as attachment through outlook connector and I am getting the encoded content around 2.5MB but when I am trying to decode this content it shows only 1MB file. So the content was not decoded properly. So i realized to change the Jar, so I used to BouncyCastle jar  to decode the content. Surprise, it decoded the encoded content and gave the same size of file. But it's worked for Text and PDF files. When i am trying to decode the PPT and WORD Documents the size of the content was same as what I uploaded but I am unable to open the File (PPT , WORD).

 

But the same scenario, I just tried to capture the requests and responses of Documents through Apex Data Loader. Here also i am getting the encoded content. That is also Base64 content. I tried to decoded this encoded content using Apache Commons Codec this time I got the correct decoded content and as well as file size same as what i uploaded. I tested this for all types of files and i success.

 

So here my question is which type of encoding pattern the Salesforce uses for Outlook and Apex Data Loader. Is it same for both or is any differnece for these two encoding process. If it is there please tell me I stuck here. Please if any settings needed for these please give me directions.. Thanx in Advance...

dkadordkador

Base64 is a standard format and it shouldn't matter which library you use to do the decoding.  My first guess is that Salesforce Outlook Connector is sending the request in a compressed format while DataLoader is not (there's an option in DataLoader settings for this).  So perhaps you're sniffing compressed data?