Forum Discussion
Hello,
My best understanding of question is how to set a header...
In some groovy script that sets property values in a "Properties" named test step, set the desired header content:
def xrequestid = UUID.randomUUID().toString();
testRunner.testCase.testSteps["Properties"].setPropertyValue( "x-request-id-value-str", xrequestid);
def xclientType = 'admin';
testRunner.testCase.testSteps["Properties"].setPropertyValue( "x-client-type-value-str", xclientType);
In headers tab of the request, define Header column value of what is actually needed for the request. In the Value column of the tab, use property expansion to set it to what is contained in the "Properties" named test step...
Header | Value
---------- | ----------
x-request-id | ${Properties#x-request-id-value-str}
x-client-type | ${Properties#x-client-type-value-str}
I hope I interpreted your question as you meant it. :)
- Olga_T6 years agoSmartBear Alumni (Retired)
Hi all,
TNeuschwanger, thank you for your time looking into this, I sincerely appreciate the assistance.
alvarogrm, have you had a chance to check the solution on your side? Does this work for you?
- alvarogrm6 years agoNew Contributor
Hi,
I havn't had the time, but our test-expert is going to try out the solution, I still appreciate the effort you made in order to help us/me.
BR Alvaro
- alvarogrm6 years agoNew Contributor
Hi,
our test-expert told me that i doesn't solve the issue, what the solution describes is how to set properties (http-headrar) when invoking the WebService (SOAP), what we want to do is the following:
steps:
1) Setting two http-headrar in SOAP-UI (before the project is created or before a wsdl-definition is used), e.g.
user_id
user_password
2) Now create a soap-ui SOAP-project using and url, eg.
http://fake.alvaro.se:8080/test?wsdl
The problem is that the server uses two security mechanism first cert (no problem here) and apart from that further information must be supplied in the http-header before you can actually communicate with the server, meaning that you cannot get the wsdl-definition from the server if the http-headers are not set.
BR Alvaro
Related Content
- 2 years ago
- 7 years ago