You need to sign in to do that
Don't have an account?
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>