如何使soapom与soapUI一起使用 [英] how to make scriptom work with soapUI

查看:167
本文介绍了如何使soapom与soapUI一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用scriptom访问soapUI中的COM对象,但是我无法超越第1步,即安装scriptom.

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

我尝试了 http://www.soapui中提到的步骤. org/forum/viewtopic.php?t = 96 但是当我运行一个简单的命令(见下文)

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)

有人能成功地将soapom与soapUI一起使用吗?如果可以,请您帮帮我吗?

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

ps:我正在使用soapUI 4.5.2 Pro和OS.我需要scriptom才能同时使用两者.

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. 安装groovy或下载最新的groovy二进制文件

  1. Install groovy or download the latest groovy binary

使用

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

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

将scriptom jar文件复制到soapui_HOME/bin/ext文件夹中

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

运行一个简单的脚本代码,以验证该设置是否有效.我使用了以下代码.

run a simple scriptom code to verify that the setup worked. I used the below code.

导入org.codehaus.groovy.scriptom.*

import org.codehaus.groovy.scriptom.*

//实例化Internet Explorer def Explorer =新的ActiveXObject("InternetExplorer.Application")

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

//设置其属性 explorer.Visible = true explorer.AddressBar = true

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

//通过调用Navigate()方法导航到站点 explorer.Navigate(" http://abhishekasthana.com ")

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

就是这样...

这篇关于如何使soapom与soapUI一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆