Also something to note is that any queries to bullhorn take EXCEPTIONALLY long periods of time. In excess of 60-90 seconds, even for queries that only return ONE result.
<b>Fatal error</b>: Uncaught SoapFault exception: [Client] DTD are not supported by SOAP in /home/site/public_html/sites/all/modules/custom/site_bullhorn/site_bullhorn.module:365
Stack trace:
#0 /home/site/public_html/sites/all/modules/custom/site_bullhorn/site_bullhorn.module(365): SoapClient->__call('find', Array)
#1 /home/site/public_html/sites/all/modules/custom/site_bullhorn/site_bullhorn.module(365): SoapClient->find(Array)
#2 /home/site/public_html/sites/all/modules/custom/site_bullhorn/site_bullhorn.module(330): bullhorn_query(Array)
#3 /home/site/public_html/sites/all/modules/custom/site_bullhorn/site_bullhorn.module(230): site_get_jobs_from_bullhorn()
#4 /home/site/public_html/sites/all/modules/custom/site_bullhorn/site_bullhorn.module(59): site_save_jobs_to_db(true)
#5 [internal function]: site_bullhorn_init()
#6 /home/site/public_html/includes/module.inc(483): call_user_func_array('site_bullhorn...', Array)
#7 /home/site/public_html/includes/common.inc(2677): module_inv in <b>/home/site/public_html/sites/all/modules/custom/site_bullhorn/site_bullhorn.module</b> on line <b>365</b><br />
Line 365 is below, look for: findResult = $BHClient->find($query); // LINE 365 IS RIGHT HERE
Code: Select all
function bullhorn_query($query, $distinct = FALSE, $api_type = '1.1')
{
//Get a valid session ID for this query.
//$sid = get_bullhorn_sid();
//All queries require a 'distinct' element for the 2.0 API so we add that here and default it to OFF.
$query['distinct'] = $distinct;
//Default params for accessing the WSDL service.
$params = array(
'trace' => 1,
'soap_version' => SOAP_1_1
);
//Initialize a connection to the service
//$BHClient = new SoapClient(BULLHORN_WSDL_URL, $params);
$session = create_bullhorn_session($api_type);
$BHClient = $session->BHClient;
//Bullhorn only has 2 types of queries. Lists of data or complete data object based on ID. We sort these out here.
if ($query['id'])
{
$findId = new SoapVar($query['id'], XSD_INTEGER, "int", "http://www.w3.org/2001/XMLSchema");
$query['id'] = $findId; //Replace the php int with a soap int. Without this it complains about bad int type.
$findResult = $BHClient->find($query); // LINE 365 IS RIGHT HERE
return $findResult->return->dto;
}
else
{
$SOAP_query = new SoapVar($query, SOAP_ENC_OBJECT, "dtoQuery", "http://query.apiservice.bullhorn.com/");
//Put together a request for the results of the above query and give it a session id, maybe the query isnt actually completed until this step? I dont know.
$request_array = array (
'session' => $session->API_session->return,
'query' => $SOAP_query
);
//Get the results
$SOAP_request = new SoapVar($request_array, SOAP_ENC_OBJECT, "query", "http://query.apiservice.bullhorn.com/");
$queryResult = $BHClient->query($SOAP_request);
return $queryResult->return;
}
}