2012-01-23 42 views
1

我正在soapUI中工作。我需要在soapUI groovy脚本中的Groovy中定义数组。如何在Groovy soapUI中定义数组?

能否请你帮我

+0

请点击这里提供您的示例代码。这使它更容易。 –

+0

你是指Groovy数组,还是soap-enc:数组? – Grooveek

回答

3
// Define the array 
def MAX_SIZE = 4 
def myArray = new Object[MAX_SIZE] 

// Fill the array 
myArray[0] = "This" 
myArray[1] = "is" 
myArray[2] = "my" 
myArray[3] = "array." 

// Print content of the array 
myArray.each { log.info(it) } 
+0

谢谢。这是我正在寻找的。 – ABCDEFG

+0

打印数组的非常不错和简短的方法 –