简体   繁体   中英

how to make scriptom work with soapUI

I want to use scriptom to access COM objects in soapUI but i am not able to get beyond step 1, ie, installing scriptom.

I have tried the steps mentioned in http://www.soapui.org/forum/viewtopic.php?t=96 but when i run a simple command(see below)

import org.codehaus.groovy.scriptom.*
def tdc = new ActiveXObject ('TDApiOle80.TDConnection')

i get a class not defined error(see below) 在此处输入图片说明

Has anyone been able to successfully use scriptom with soapUI? If yes can you please help me?

ps: i am using soapUI 4.5.2 Pro and OS. I need scriptom to work with both.

I was able to make this work by following these steps

  1. Install groovy or download the latest groovy binary

  2. find out the java.library.path in soapUI using

    log.info System.properties["java.library.path"]

  3. copy the scriptom jar files in the soapui_HOME/bin/ext folder

  4. copy the jacob*.jar file in soapui_home/bin/ext folder
  5. copy the jacob*.dll (both) into the java.library.path location from step 2. This is usually the soapUI_home/bin folder
  6. restart soapUI and verify that you can see messages in the soapUI log that the jars were loaded.
  7. run a simple scriptom code to verify that the setup worked. I used the below code.

    import org.codehaus.groovy.scriptom.*

    // instantiate Internet Explorer def explorer = new ActiveXObject("InternetExplorer.Application")

    // set its properties explorer.Visible = true explorer.AddressBar = true

    // navigate to a site by calling the Navigate() method explorer.Navigate(" http://abhishekasthana.com ")

And that's it...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM