Forum Discussion

Alias67's avatar
Alias67
New Contributor
12 years ago

SessionID

Hi All

I'm very new to this ... so in all counts a newbie ...

I'm trying to reference SID to be used in other processes within test case. The only thing I have found so far is by creating a 'Transferring Property' per link (http://www.soapui.org/Functional-Testing/transferring-property-values.html) ... but this did not produce same results as I don't have the pro version, I think I lost the plot from step 3 ... and more so at step 3.3

My question is around help with referencing the SID to be used with other processes and ALSO to ask if there is any other way of referencing the SID by means of XML code or something ... besides creating a Transferring Property.

Any advice of what terminology to google and or links where to find assistance will be very much appreciated.

Thank you and kind regards
Jacques

3 Replies

  • Hello,

    On the testcase options(right click on he test case and then click options ) Check the "Maintain HTTP Session" options and see if that helps maintains the sessions in the testcase.

    Regards,
    Temil
  • Alias67's avatar
    Alias67
    New Contributor
    Hi

    Thank you for your response but this did not do anything ...

    can anybody please help, how do I reference the 'loginReturn' per below.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    <soapenv:Body>
    <loginResponse xmlns="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
    <loginReturn xmlns="">185*****804</loginReturn>
    </loginResponse>
    </soapenv:Body>
    </soapenv:Envelope>

    Is there any way of doing this without using Property Transfer, I would like to make to part of the soap envelope .... is this possible?

    Thank you
  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    You have to dynamically build the SessionID into the future requests after the request that gives you the session ID.

    The easiest way to perform this is to do a property transfer and store it to a property (IE, SessionID) and then use ${#TestCase#SessionID} to put the session ID where it belongs. Or you can build a different transfer for each request. I personally prefer the first method.


    The other option is a groovy script that dynamically builds and adds the data into the requests. This is more difficult and better suited if your setting it up to dynamically build several parameters within your requests.