Integration with Bullhorn SOAP webservice API using Coldfusion

I am starting to work on integrating SOAP Bullhorn web services using Coldfusion 8. I am having problems with authentication - getting 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'>

           webservice         =   ""
           method            =   "startSession"
           returnvariable      =   "bhSession"
           argumentcollection   =   "#session_arg#">


I replaced the 1.1 endpoint with the webservice 2.0 access point. startSession () is working all right, but I have to get the session value using getSession (), but it is not available in the returned object - this is a function from the parent class.

enter image description here

I tried using bhSession.super.getSession () but that didn't work either.

I would be grateful for any suggestion on how to approach this integration:

  • Should I completely leave cfinvoke / createObject and continue with CFHTTP and make soap envelopes manually?

  • or maybe use some Java library for the integration?

  • or maybe use API version 1.1.

SOAP response I am getting using soapUI:

<S:Envelope xmlns:S="">
      <ns2:startSessionResponse xmlns:ns2="">


Everything is good. It seems like the right way would be the right decision.

Thank you for your help. Lucas


source to share

1 answer

It turned out that at the end.

Must use GetSOAPResponse to get actual response.

Sample code if anyone is interested:

    webservice = createObject("webservice", "");
    webservice.startSession(myUsername, myPassword, myAPIKey);
    sessionResult = GetSOAPResponse(webservice);


The SessionResult will contain the required XML.



All Articles