Forum Discussion

Bill_In_Irvine's avatar
Bill_In_Irvine
Contributor
8 years ago

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

  • Bill_In_Irvine's avatar
    Bill_In_Irvine
    8 years ago
    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
  • groovyguy's avatar
    groovyguy
    Community Hero

    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. 

    • Bill_In_Irvine's avatar
      Bill_In_Irvine
      Contributor

      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.

      • groovyguy's avatar
        groovyguy
        Community Hero

        Hopefully they can help you get it sorted out! 

  • 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?

     

     

     

     

     

    • Bill_In_Irvine's avatar
      Bill_In_Irvine
      Contributor

      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.