missing several packages from eviware - groovy allows only SoapUI, model, and support.
Made a mistake by posting this in open source SoapUI. (moderators, there should be a way for moving posts between discussion groups).
Anyway here is my problem:
I am using Ready! API 2.0 and have a license for SoapUI NG Pro. I have limited ability to do things like set the SSL keystore in Groovy. For instance, where is impl? I only have SoapUI, Model and Support. See below
And when I try to make an event handler I am missing requestHeaders from the request object:
The context object is missing operations too. See below.
I had a free copy of Soap UI 5.3.0 still installed on my Fedora Linux while I am using Ready API 2.0 and I'm not sure if some jar files are in a state of confusion. I uninstalled Soap UI 5.3.0 from my Fedora but that did not have any effect. I checked System Properties and everything seems to be based on folders that have to do with ReadyAPI 2.0
Any idea what I can do?
thanks
Bill
- I put a ticket in. The answer I got is that some of the objects have late binding and won't appear in code completion.One way to load APIs, I am told is use the getContextClassLoader(): Here is an example SmartBear suggested that worked for me so com.eviweare.soapui.impl - though not appearing in code completion, was proven to work as though it is activated by late binding:import com.eviware.soapui.impl.support.HttpUtilslog.info "version? " + context.getProperty( "version" )
HttpUtils.extractHost("http://service.com")
Thread.currentThread().getContextClassLoader().addURL(new URL('file:///home/billmartin/SmartBear2/ReadyAPI-2.0.2/lib/commons-math-1.2.jar'))def number = Class.forName("org.apache.commons.math.complex.Complex").newInstance(1, 2)log.info("The real part is $number.real")I also figured out a way to update the header inside my groovy script based on seeing on some thread this code:import com.eviware.soapui.support.types.StringToStringMap
def headers = new StringToStringMap()
headers.put( "Content-Type", "application/json") // Replace values with those you needlog.info "Added Content-Type: application/json"request.requestHeaders = headers
log.info "headers size now: " + (request.requestHeaders.size())log.info request.requestHeadersI haven't come across any information about late binding in the documentation. This information might help other people to use the Ready! API SoapUI APIthanksBill