cancel
Showing results for 
Search instead for 
Did you mean: 

missing several packages from eviware - groovy allows only SoapUI, model, and support.

SOLVED
Contributor

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

Screen Shot 2017-07-21 at 2.16.43 PM.png

 

 

 

 

And when I try to make an event handler I am missing requestHeaders from the request object:

Screen Shot 2017-07-21 at 2.24.08 PM.png

 

 

 

 

 

 

The context object is missing operations too. See below.

Screen Shot 2017-07-21 at 2.29.48 PM.png

 

 

 

 

 

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

1 ACCEPTED SOLUTION

Accepted Solutions
Contributor

Re: missing several packages from eviware - groovy allows only SoapUI, model, and support.

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.HttpUtils
 
log.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 need
log.info "Added Content-Type: application/json"
request.requestHeaders = headers

log.info "headers size now: " + (request.requestHeaders.size())
log.info request.requestHeaders
 
I haven't come across any information about late binding in the documentation. This information might help other people to use the Ready! API SoapUI API 
 
thanks
 
Bill

View solution in original post

7 REPLIES 7
Contributor

missing several packages from eviware - groovy allows only SoapUI, model, and support.

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 belowScreen Shot 2017-07-21 at 2.16.43 PM.png

 

 

 

 

And when I try to make an event handler I am missing requestHeaders from the request object:

Screen Shot 2017-07-21 at 2.24.08 PM.png

 

The context object is missing operations too. See below.Screen Shot 2017-07-21 at 2.29.48 PM.png

 

 

 

 

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?

 

 

 

 

 

Contributor

Re: missing several packages from eviware - groovy allows only SoapUI, model, and support.

Sorry - I meant to post this in the Ready API group. I see "Soap UI" on top and must have got to this group by the search engine.

Community Hero

Re: missing several packages from eviware - groovy allows only SoapUI, model, and support.

You may want to consider opening a support request here.


Barring that, my guess is what you expected, is that there seems to be remnants of the open source version lingering and conflicting with ReadyAPI / SoapUI NG Pro. 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Contributor

Re: missing several packages from eviware - groovy allows only SoapUI, model, and support.

Thankyou! I found a folder with hundreds of jar files and ran the program,  jar -tvf on some suspects and see com.eviware.soapui.impl in the listing, so I went ahead and put in a ticket. Since I already made three test suites I want to be able to have all my work safe and saved in case they tell me to uninstall everything and then reinstall Ready! API 2.0 and my Soap NG Pro license.

Community Hero

Re: missing several packages from eviware - groovy allows only SoapUI, model, and support.

Hopefully they can help you get it sorted out! 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Contributor

Re: missing several packages from eviware - groovy allows only SoapUI, model, and support.

Though I use the purchased  and licensed SoapUI NG Pro, I found on the open source soapUI a set of comments a few years ago that someone could not get to some objects and methods in requestFilter:

 

https://community.smartbear.com/t5/SoapUI-Open-Source/how-to-set-project-propertyValue-in-RequestFil...

 

Looking the readyapi docs on handling-events, it only says that code complete allows you to see available objects and methods

 

https://support.smartbear.com/readyapi/docs/testing/handling-events.html

 

Yet I have seen a comment a year ago that someone claims to have used request.getRequestHeaders() - which is not in my list of available methods - in this same ReadyAPI SoapUI. So I am thoroughly confused still.

 

https://community.smartbear.com/t5/SoapUI-NG/Replace-request-content-using-RequestFilter-filterReque...

 

Contributor

Re: missing several packages from eviware - groovy allows only SoapUI, model, and support.

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.HttpUtils
 
log.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 need
log.info "Added Content-Type: application/json"
request.requestHeaders = headers

log.info "headers size now: " + (request.requestHeaders.size())
log.info request.requestHeaders
 
I haven't come across any information about late binding in the documentation. This information might help other people to use the Ready! API SoapUI API 
 
thanks
 
Bill

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors