Bullhorn updateFile command fails

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
gunasma
User
Posts: 3
Joined: Wed Aug 16, 2017 6:05 pm

Bullhorn updateFile command fails

Post by gunasma » Fri Sep 22, 2017 4:31 pm

I try to update a file that exists in bullhorn SOAP API using the following code.

ApiGetEntityFilesResult filesResult = bhService.getEntityFiles(bhSession, "Candidate", foCandidateId);
List<FileMeta> fms = filesResult.getApiEntityMetas();
foundFm = fms.get(0);
ApiUpdateFileResult ufr = bhService.updateFile(bhSession, "Candidate", foCandidateId, foundFm, foundFm.getId(), dh);

It is seen that the updateFile() is being called on a file Id that was retrieved from bullhorn.

But bullhorn then says the file cannot be deleted as it does not exist as seen below.

Caused by: com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: java.lang.RuntimeException: com.bullhorn.common.attach.FileManagementException: Unable to delete file, /mnt/sl91-jlansrv/UserFiles/UserWorkFiles/7554/2016.09/4340843.pdf, it does not exist...

Caused by: java.lang.RuntimeException: Client received an exception from server: java.lang.RuntimeException: com.bullhorn.common.attach.FileManagementException: Unable to delete file, /mnt/sl91-jlansrv/UserFiles/UserWorkFiles/7554/2016.09/4340843.pdf, it does not exist... Please see the server log to find more detail regarding exact cause of the failure. at com.bullhorn.apiservice.impl.DataService.updateFile(DataService.java:446) at com.bullhorn.apiservice.ApiServiceImpl.updateFile(ApiServiceImpl.java:116)

Post Reply