kamahade
15 years agoRegular Contributor
How to Add HTTP Headers to test request using API
Hi,
I do have more than 100 WsdlTestStep (SOAP request) in my testsuite and I would like to add custom HTTP headers to each request.
I do not want to add manually, as mentioned here :http://www.soapui.org/SOAP-and-WSDL/adding-headers-and-attachments.html
I had a look at this : http://www.eviware.com/forum/viewtopic. ... 46&start=0 but its only for RESTful services..
I also see a method public void setHttpHeaders(StringToStringsMap httpHeaders) in class AMFRequestTestStep ... Is there any such method for wsdlteststep ?
I got wsdlteststeprequest.modelITem.getConfig() returning me
How to set value for "entrykey" and "Value" here ?
I do have more than 100 WsdlTestStep (SOAP request) in my testsuite and I would like to add custom HTTP headers to each request.
I do not want to add manually, as mentioned here :http://www.soapui.org/SOAP-and-WSDL/adding-headers-and-attachments.html
I had a look at this : http://www.eviware.com/forum/viewtopic. ... 46&start=0 but its only for RESTful services..
I also see a method public void setHttpHeaders(StringToStringsMap httpHeaders) in class AMFRequestTestStep ... Is there any such method for wsdlteststep ?
I got wsdlteststeprequest.modelITem.getConfig() returning me
<con:settings/>
<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<con:interface>Exp_IProductVersionService_SOAP_IProductVersionServiceHttpBinding</con:interface>
<con:operation>createProductVersion</con:operation>
<con:request name="ReAEn_TC.019 ProductVersionService createProductVersion TestStep">
<con:settings>
<con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><[color=#0000FF]entry key="Authorization" value="Basic VEVTVF9JJkFfU3VwZXJVc2VyOmZhYnJpYzEwMQ=="[/color] xmlns="http://eviware.com/soapui/config"/></con:setting>
</con:settings>
How to set value for "entrykey" and "Value" here ?