UhsBat
5 years agoOccasional Contributor
How to create object of EnvironmentEndpointConfig
I have a readyAPI project and it has only default environemnt. I want to create a new environment(DEV) and add all the services using groovy. I searched some code, but it fails to cast url to Enviro...
- 5 years ago
Finally it worked, I just created a string and converted into EnvironmentEndpointConfig
def str = '<xml-fragment authProfile="No Authorization" username="" password="" domain="" incomingWss="" outgoingWss="" wssTimeToLive="" wssType="" proxyHost="" proxyPort="" proxyUsername="" proxyPassword="" xmlns:con="http://eviware.com/soapui/config">' + NewUrl+ '</xml-fragment>' com.eviware.soapui.config.EnvironmentEndpointConfig epConfig = com.eviware.soapui.config.EnvironmentEndpointConfig.Factory.parse(str); EndpointImpl epImpl = new EndpointImpl(epConfig, soapService); soapService.setEndpoint(epImpl);