ParseResume w PHP

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
collinja
User
Posts: 3
Joined: Mon Oct 10, 2011 10:25 am

ParseResume w PHP

Post by collinja » Mon Oct 10, 2011 10:29 am

Has anyone been able to use the parseresume function with php.

Just looking for the syntax to pass the file to the API.

Thanks for any help.

Jon Collins

MMartin4
User
Posts: 29
Joined: Wed Dec 31, 1969 8:00 pm

Re: ParseResume w PHP

Post by MMartin4 » Mon Oct 17, 2011 10:39 am

Hi collinja,

We had some partial sample code floating around that worked for us, however, I can't be sure that it will work as is but I hope the following helps:

So first the parseResume operation requires a file encoded in 64bit. PHP 4 and 5 have a function that will encode a binary string into 64bit (here: http://php.net/manual/en/function.base64-encode.php). First you'll need to take in a file and obtain the binary (PHP has open and read functions for this too) then pass that binary into the encoding function

$base64ChunkedResume = base64_encode($fileBinary);

You now have the 64bit encoded file in the form that you'll pass to the parseResume operation. There is a Note at the php.net page that has full example code for how to go from a file to 64bit encoded binary.

I hope this helps

Michael Martin
Enterprise Technical Support Analyst

collinja
User
Posts: 3
Joined: Mon Oct 10, 2011 10:25 am

Re: ParseResume w PHP

Post by collinja » Fri Oct 28, 2011 1:41 am

Thank you,

I have used that function to convert the content.

Still very much stuck trying to pass the parameters to the ParseResume Function.

Getting the following;
Call to a member function parseResume() on a non-object

I appreciate any help.

Jon C

k.pham
User
Posts: 21
Joined: Thu Jun 24, 2010 5:13 pm

Re: ParseResume w PHP

Post by k.pham » Fri Oct 28, 2011 8:58 am

How's this?

Code: Select all

$base64ChunkedResume = base64_encode($fileBinary);


$API_request_parseResume_operation = array(
	'session' => $API_currentSession,
	'base64ChunkedResume' =>$base64ChunkedResume,
);

try {
$API_response__parseResume_operation = $BHclient->parseResume($API_request_parseResume_operation);
}
catch (SoapFault $fault) {
	var_dump($BHclient->__getLastRequest());
	die($fault->faultstring);
}

Post Reply