I have an XML file in FTP server, I need to read that file and loaded into document object in salesforce. I have read the below link but I am not able to understand. . Can we do an HTTP request to the FTP server..? If yes how I can achieve this without using Third-party tools like jitterbit or skyvia .Can anyone help me to solve it?  Thanks
101871
My question is how I can intergrate Salesforce with different FTP servers in real time. I have read some articles about it, but to be absolutely sure I thought it would be a good idea to post a question here.  I want to be able to send and receive data from Salesforce as a csv file to a ftp server. How I'm thinking about doing this is listed below.  Send the data:  Create a apex class which query the necessary data in Salesforce and create a csv file. I guess this is trivial? Then send the file to a web service created in Salesforce, just by calling it in the apex code. Create a web service in Salesforce which receives the data from the apex code. This web service should in some way send the data to the appropriate ftp server. I guess I can simply modify some of the code provided by Salesforce to make this work? The file is sent. Receive the data  This one is a bit trickier. I guess I have to pull the data from the FTP server by using my web service, which then send the file collected to the appropriate apex class. Or, the FTP server could send the data to the SFDC web service, I don't know if this is possible? The web services on the other side that sends the data to the ftp server, could send it directly to the SFDC web service, which then again forward it to the apex class. I guess the web service will use the remote site url to connect to the SFDC web service?
84120
Does anyone have any idea why the following code sample fails with an XmlException "Data at the root level is invalid. Line 1, position 1."  var body = "&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Report&gt; ......" XmlDocument bodyDoc = new XmlDocument();             bodyDoc.LoadXml(body);
7655
Is there local file manipulation that's been done with JavaScript? I'm looking for a solution that can be accomplished with no install footprint like requiring .  Specifically, I'd like to read the contents from a file and write those contents to another file. At this point I'm not worried about gaining permissions and am just assuming I already have full permissions to these files.
65027
Can someone tell me how to change directories using FtpWebRequest?  This seems like it should be an easy thing to do, but I'm not seeing it.  EDIT  I just want to add...I don't have my heart set on FtpWebRequest.  If there's a better (easier) way to do FTP in .NET please let me know.    Apparently there's no way to do it using a live connection, you need to change the uri to trick ftpwebrequest into using a different request (thanks Jon).  So I'm looking for a 3rd party client...  Some of the open source solutions I tried didn't work too well (kept crashing), but I found one open source solution that's passed some of my preliminary tests ().
75039
I'm now going on vacation, and I won't be having Internet connection there. I was thinking it would be a good time to browse through the Stack Overflow data dump. However, it's all in XML and I'd have to write a client to make it readable. Is there any existing client?
58268
In Java, given a java.net.URL or a String in the form of http://www.example.com/some/path/to/a/file.xml , what is the easiest way to get the file name, minus the extension? So, in this example, I'm looking for something that returns "file".   I can think of several ways to do this, but I'm looking for something that's easy to read and short.
26890
I am trying to get the image addresses from Salesforce Files using the following query in workbench. There are thousand files, but no results are displaying.  Select Id, ContentDocumentId, ContentDownloadUrl, DistributionPublicUrl  from ContentDistribution  where ContentDocumentId='0691000000FOq3nAAX'`   The result I would like to achieve is the address a user gets each time he/she right-clicks an image and click the Copy Image Address option.  Would appreciate if someone could help me with this inquiry.
67763
I have to Retrieve the Data Extension Fields from Data Extension object using Soap Api,But I am unable to Retrieve the Data Extension fields using Data Extension Object.  Data Extension Soap Request:  &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:par="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;   &lt;soapenv:Header&gt;     &lt;Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt;       &lt;UsernameToken&gt;         &lt;Username&gt;xxxxxx&lt;/Username&gt;         &lt;Password&gt;xxxxxxx&lt;/Password&gt;       &lt;/UsernameToken&gt;     &lt;/Security&gt;   &lt;/soapenv:Header&gt;   &lt;soapenv:Body&gt;     &lt;RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"&gt;       &lt;RetrieveRequest&gt;         &lt;ObjectType&gt;DataExtension&lt;/ObjectType&gt;         &lt;Properties&gt;CustomerKey&lt;/Properties&gt;         &lt;Properties&gt;Name&lt;/Properties&gt;         &lt;Properties&gt;DataExtension.ObjectID&lt;/Properties&gt;         &lt;Properties&gt;IsSendable&lt;/Properties&gt;         &lt;Properties&gt;SendableSubscriberField.Name&lt;/Properties&gt;         &lt;Properties&gt;SendableDataExtensionField.Name&lt;/Properties&gt;         &lt;Properties&gt;Fields&lt;/Properties&gt;         &lt;Property&gt;Field.CustomerKey&lt;/Property&gt;         &lt;Property&gt;Field.FieldType&lt;/Property&gt;         &lt;Properties&gt;CategoryID&lt;/Properties&gt;         &lt;Filter xsi:type="SimpleFilterPart"&gt;           &lt;Property&gt;CategoryID&lt;/Property&gt;           &lt;SimpleOperator&gt;equals&lt;/SimpleOperator&gt;           &lt;Value&gt;xxxxxx&lt;/Value&gt;         &lt;/Filter&gt;         &lt;QueryAllAccounts&gt;true&lt;/QueryAllAccounts&gt;       &lt;/RetrieveRequest&gt;     &lt;/RetrieveRequestMsg&gt;   &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt;   Here I am trying to Retrieve the fields , but i am unable to Retrieve, what i have to give the value?  &lt;Properties&gt;Fields&lt;/Properties&gt;  &lt;Property&gt;Field.CustomerKey&lt;/Property&gt;  &lt;Property&gt;Field.FieldType&lt;/Property&gt;   I dont want to use DataExtension Field object,I want to Retrieve the fields using Data Extension object,please anyone help me for the Answer...     Error Message:    &lt;RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"&gt;          &lt;OverallStatus&gt;Error: The Request Property(s) Fields do not match with the fields of DataExtension retrieve&lt;/OverallStatus&gt;          &lt;RequestID&gt;3aadeb4f-2290-402d-9590-f0f07ac3247f&lt;/RequestID&gt;       &lt;/RetrieveResponseMsg&gt;
101007
I am trying decode JWT token in apex, and i am not sure how that can be done. If anyone has done that before, please let me know the process.  A JWT token is sent to SFDC and need to decode it in apex class.  Questions: 1) Can we decode the JWT using any standard salesforce classes, if yes what class and method? 2) Or do we need to decode it with our custom code -- if so can you provide an example.
31089
I've build a WCF Service to accept a file and write it to disk. The front-end consists of a page with SWFUpload which is handling the upload on the client side. Apparently, SWFUpload posts the data with a Content Type of: multipart/form-data.  I would think this ok but on the Service side I get an error. The error is "ProtocolException" expecting text/xml. I've tried different message encodings in the bindings but nothing seems to work.  How can I get this file uploaded using multipart/form-data?
104413
I want a document library to recieve email and store it so followed the steps outlined here:   I seem to be a bit stuck.  The mail's being delivered to the machine and it's appearing as .eml files in the drop folder, so SMTP and delivery is OK.    I assume Sharepoint's supposed to pick up the file, stick it in a library and delete it, but it doesn't, the mail file just sits there.  Nothing in the logs, obviously.  I haven't set this up before, how often does the timer service come about and pick up the mail?
1780
How do I read and parse an XML file in C#?
83659
I have a site which is running under SharePoint 2013. Via REST I am trying to retrieve the file and folder directory for that site. There are several similar questions on this site related to recursively retrieving all of the files and folders for a given a folder:       The answers provided therein led me to the following URI:     /_api/web/Lists/GetByTitle('Documents')/Items?$expand=Folder&amp;$select=Title,FileLeafRef,Folder/ServerRelativeUrl   Which from what I can tell does retrieve all of the files and folders from the given starting path.  However, I am missing something. When reading through the returned XML I cannot figure out where a given file goes. Meaning that I have info on how to retrieve file bros.pdf, but cannot determine that it is in the documents/super/mario/ folder.  For the file items I've tried to retrieve the ServerRelativeUrl property, but have not succeeded though the folders seem to. Is there some identifier in the XML that I am missing? When doing a recursive RESTful query how do I determine where a given file belongs?
23800
wondered if you could help me please? I have node in xml that is as followed  $LOG: 08880xbpnd $ fhdsafidsfsd df sd fsd f sd fsd  I was wondering is there anyway to make all the text go on to one line so that it then can be passsed through to a javascript function? so it would turn out like this   $LOG: 08880xbpnd $fhdsafidsfsddfsdfsdfsdfsd
114378
Is there a way to block all normal ftp traffic, and only allow the sftp protocol in sftp?  edit:  sorry my bad!  for secure ftp i must use the ftpes protocol...
79277
Is  post still valid as a solution to download a pdf from third-party site, then displaying it in a Visualforce page?   This is what I'm doing in my code:  Visualforce page  &lt;apex:page controller="pdfDownloadController" sidebar="false" showHeader="false" contentType="application/pdf"&gt;     &lt;script&gt;         window.location.href = "data:application/pdf;base64,{!pdf}";     &lt;/script&gt; &lt;/apex:page&gt;   Apex Class  public class pdfDownloadController {      public String getPdf() {         HttpRequest req = new HttpRequest();         req.setEndpoint('https://www.irs.gov/pub/irs-pdf/fw4.pdf');         req.setMethod('GET');                                    // Make call         Http client = new Http();         HttpResponse rsp = client.send(req);          return rsp.getBody();      }  }   This is what loads when I go to this Visualforce page in lightning:    It doesn't appear to work when I go to classic either.  UPDATE:  As suggested by sfdcfox suggested, I used his method to display the pdf. That didn't work, but I did see these errors in the web console (Firefox):    I tried Chrome got a different browser response:    This what I get in the debug log from the response body. It looks like a pdf:
112079
I need to convert HTML documents into valid XML, preferably XHTML. What's the best way to do this? Does anybody know a toolkit/library/sample/...whatever that helps me to get that task done?  To be a bit more clear here, my application has to do the conversion automatically at runtime. I don't look for a tool that helps me to move some pages to XHTML manually.