function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
WmohanWmohan 

FTP from salesfroce to jobcentral

Trying to use webservie to create xml and ftp to jobcentral.

 

 public PageReference postJob() {
        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
       
        req.setEndpoint('http://dpi.careerbuilder.com/webservices/dpitg.aspx');
        req.setMethod('POST');
        req.setHeader('Content-Type', 'application/xml');
        //req.setBody(this.xmlOutput);
        req.setBodyAsBlob(Blob.valueOf(this.xmlOutput));
        //req.setCompressed(true);
       
        Try {
            res = http.send(req);
            this.postResponse = res.toString() + ' : ' + res.getBody();
        }  Catch (Exception e) {
            this.postResponse = 'Error: ' + e.getMessage();
        }
       
        return null;  
        }

-------------------

I have the message below, not sure how to fix this.

 

System.HttpResponse[Status=OK, StatusCode=200] : <html><head><title>5|CBAction is a required field.<BR></title></head><body>5|CBAction is a required field.<BR></body></html>