Search code examples
web-servicesjax-wsapache-axissoapui

How to send sessionID from soapui as a request


I am testing a webservice method which accepts session-id as a parameter.

While testing the same method via SoapUI with a dummy sessionID-Parameter, the server is rejecting the request as it is expecting proper session-id.

How can I solve this? Is there any way where SoapUI can bind the session-id before sending the request?

Please advice me. Thanks

Below is the sample-request which is triggered from SOAP-UI:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.local.com">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:getMultiple>
         <!--Optional:-->
         <ser:sessionId>1000AJHEFG0987</ser:sessionId>
         <!--Optional:-->
         <ser:lessonId>95101</ser:lessonId>
         <!--Optional:-->
         <ser:quantity>1</ser:quantity>
         <!--Optional:-->
         <ser:impressionRow>1</ser:impressionRow>
      </ser:getParametersMultiple>
   </soapenv:Body>
</soapenv:Envelope>

Solution

  • Found the solution,

    • Design your login method which will accept certain inputs and will return the sessionID as a string

    • Hit that login method from SOAP-UI and you will get the sessionID in your response

    • Use "Property Transfer" option in soap-ui and transfer the received sessionID to all other requests

    Helpful Link : soapui.org/Functional-Testing/transferring-property-values.h‌​tml

    Simple !! :)