2 Replies Latest reply on Feb 15, 2019 5:47 AM by Mun Keong Lee

    Session handling

    Hue Xavier
      Share This:


      For a new Folder we are trying to use, for the first time, a webservice job.

      We got 2 SOAP webservice, one for authentification and one for our real treatment.


      The problem is the following, We need to keep the authentification beetween the two job by keeping an http session between the 2 job.


      Is there a way to do that ? I see a way to active cookie in the configuration manager but it didn't seen to do anything.


      Alternativly i thiink of getting the session information from the cookie of the first webservice response and inject it in the header of the second webservice.


      Do you know of a solution ?

        • 1. Re: Session handling

          Hi Hue Xavier


          when you athenticate you get back the authentication token and it is valid over 20 mins. All you need to do extract it from "response", save it an keep it on a VARIABLE for reusing.


          response_register XML example

          The following example describes a successful response:

          <?xml version="1.0" encoding="iso-8859-1"?>

          <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">


          <ctmem:response_register xmlns:ctmem="http://www.bmc.com/ctmem/schema918">










          Request to create SMART Folder and sub folder example

          The following example is request is to create a outer-most SMART Folder with a job and a sub folder in the first level which also contains a job:

          <?xml version="1.0" encoding="iso-8859-1"?>

          <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">


          <ctmem:request_def_create_folder xmlns:ctmem="http://www.bmc.com/ctmem/schema918">














          2 of 2 people found this helpful
          • 2. Re: Session handling
            Mun Keong Lee

            Hi Hue

            Correct me if I'm wrong but it looks like your query is related to web services jobs rather than the EM API as suggested by Adriano. If so, I suggest that you create an Application Integrator (AI) job based on Web Service instead of creating a Web Service job. I'm not sure exactly how authentication works in your scenario and whether you need to extract a token for subsequent request. You can have multiple steps in a single AI job. The first step can be a login request. You can also extract the response (e.g. a token) and use it for the next step by saving it to a run-time parameter. The second step can make use of the the run-time parameter e.g. by injecting it into the header or as an input parameter to the second web service call.

            Give AI a go and let me know if it works for you.



            2 of 2 people found this helpful