service.getFile returns error: "Could not deserialize result from HTTP invoker remote service"

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

mbfagency
User
Posts: 4
Joined: Thu Apr 03, 2014 10:54 am

service.getFile returns error: "Could not deserialize result from HTTP invoker remote service"

Postby mbfagency » Fri Apr 07, 2017 12:27 pm

I am getting the error below when trying to retrieve a file. Nothing changed in my code, which was working before.

org.springframework.remoting.RemoteAccessException: Could not deserialize result from HTTP invoker remote service [http://bhservice31/data-services-2.5/sr/ApiDataService]; nested exception is java.io.InvalidClassException: com.bullhorn.common.attach.Attachment; local class incompatible: stream classdesc serialVersionUID = -5938253638059609792, local class serialVersionUID = -3417793579824363280

Code: Select all

ApiService service = new ApiService();
apiGetFileResult fileResult = service.getFile(CreateNewBullhornApiSession(), entityName, entityID, fileID);
if (fileResult != null)
{
     using (FileStream stream = new FileStream(filePathAndName, FileMode.Create))
     {
          using (BinaryWriter writer = new BinaryWriter(stream))
          {
               writer.Write(fileResult.fileData);
               writer.Close();
           }
     }
     return newFileName;
}

Return to “Webservices API”

Who is online

Users browsing this forum: No registered users and 1 guest

cron