Forum Discussion

jclesur's avatar
jclesur
New Contributor
15 years ago

[Solved]Bug in Updating Settings Programmatically

Hi,

I wrote groovy script to dynamically enable/disable the Proxy Feature.
It's running fine on SoaPUI3.6.1 Windows, but not on SoaPUI3.6.1 Lincase neither on SoapUIPro 3.6.1 Windows.

Here is my script :
import com.eviware.soapui.settings.*
import com.eviware.soapui.SoapUI

SoapUI.settings.setString( ProxySettings.HOST, "172.25.193.109" )
SoapUI.settings.setString( ProxySettings.PORT, "8113" )
SoapUI.settings.setBoolean( ProxySettings.ENABLE_PROXY, true )

The bug is : the script is executed, but i have to open Preferences GUI and then close it (without any action) to have the right behaviour.
Note that the update were performed in the Settings panel, but were not "active".

1 Reply

  • jclesur's avatar
    jclesur
    New Contributor
    The right way to set the Proxy enable is the following :

    import com.eviware.soapui.impl.wsdl.support.http.ProxyUtils
    ProxyUtils.setProxyEnabled(true)