Question

In SoapUI 4.5.2, I can generally get & set test-request properties with Groovy in a test-case setup script (e.g. someTestRequestStep.getPropertyValue("Password") and someTestRequestStep.setPropertyValue("Password", "S0mePassw0rd"))...except for the WSS-Password Type property.

someTestRequestStep.getPropertyValue("WSS-Password Type") simply returns null and someTestRequestStep.getPropertyList() does not include a property named WSS-Password Type (or anything like it that I see).

someTestRequestStep.setPropertyValue("WSS-Password Type", "PasswordText") does not produce an error...but also does not affect the WSS-Password Type property of the referenced test request that I see in the GUI.

Also, I have explored someTestRequestStep.getModelItem().getSettings() a bit for a solution: no luck thus far.

How can I set the WSS-Password Type property of a SoapUI test request with Groovy?

Was it helpful?

Solution

According to this, you should try:

someTestRequestStep.getHttpRequest().setWssPasswordType( "PasswordText" )

Or (more groovily):

someTestRequestStep.httpRequest.wssPasswordType = 'PasswordText'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top