I’m starting to work on the Bullhorn SOAP webservice integration using Coldfusion 8. I’m having problems with authentication – getting the session.
I’ve tried doing it like someone did here:
<cfset session_arg = structnew()>
<cfset session_arg.username = 'xxxxxx'>
<cfset session_arg.password = 'xxxxxxx'>
<cfset session_arg.apiKey = 'xxxxxxxxxxxxxxxxxxxxxxx'>
<cfinvoke
webservice = "https://api.bullhornstaffing.com/webservices-2.0/?wsdl"
method = "startSession"
returnvariable = "bhSession"
argumentcollection = "#session_arg#">
</cfinvoke>
I’ve replaced the 1.1 endpoint with 2.0 webservice endpoint.
startSession() works all right, but I’m supposed to get session value using getSession(), but it’s not available in the object returned – it’s a function from parent class.

I’ve tried using bhSession.super.getSession() but that didn’t work either.
I’d be grateful for any suggestion how to approach this integration:
-
should I leave cfinvoke/createObject completely and continue with
CFHTTP and making the soap envelopes by hand? -
or maybe use some Java library to do the integration?
-
or maybe use the 1.1 version of the API?
SOAP response I get using soapUI:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:startSessionResponse xmlns:ns2="http://apiservice.bullhorn.com/">
<return>
<session>THE_SESSION_VAR</session>
<corporationId>COPRPORATION_ID</corporationId>
<userId>USER_ID</userId>
</return>
</ns2:startSessionResponse>
</S:Body>
</S:Envelope>
All is fine there. Seems that the manual way would be the right solution.
Thanks for your help.
Lucas
Figured it out in the end.
Should have used GetSOAPResponse to get the actual response.
Example code if someone is interested:
The sessionResult will contain the XML needed.