Forum Discussion

rkiesler's avatar
15 years ago

Using property transfer to pass HTTP header from response to

Specifically, I am trying to capture a JSESSIONID header from an HTTP GET response to a subsequent HTTP POST. The examples I've see are all based on XML and SOAP payloads where XPath can be used, however, in the case of HTTP web page calls, the payload is not always well-formed, and therefore XPath cannot be used.

Is there a way to achieve this?

Thanks,
--
Roy

1 Reply

  • Hi Roy,

    this sounds more like a soapUI question, should we move it to the soapUI Community forum?

    soapUI always creates an XML representation of the response which you can use as the source for your property-transfer. If the response it html it will be converted in the same way, doing away with incorrect syntax as good as possible. If the header is a separate Http Header you would need to create a groovy script that does this transfer, ie first reads the http header value from the previous response and then writes it to the following request.

    If the jsessionid header is actually a session cookie, you shouldn't have to do any transferring but can simple select the "Maintain HTTP State" option in the containing TestCase Options dialog, which will maintain HTTP State (ie cookies) between all requests in the TestCase

    Hope this helps,

    regards!

    /Ole
    eviware.com