Ask a Question

Fill an array section in a request

rdebie
Contributor

Fill an array section in a request

Hello There,

In the request form editor (soapui 2.0 beta 2) , you can by an array section click on the button add en fill in the fields. When you go to the XML you can see that the new fields is added.

I don't know how i do that in a groovy/java script.
Can you tell me how i do that in a groovy/java script?

I hope that you under stand what i ment.

Regards,

R. Wiertz
Furore.com
2 REPLIES 2
omatzura
Super Contributor

Hi!

there are 2 main options:

1) get the DOM node for the common parent (via GroovyUtils/XmlHolder.getDomNode) and use standard Node manipulation methods to insert the desired content

2) create the desired content as a string in your groovy script and use property expansion to "insert" it in the request.. ie in your script write

context.myArray = 'xml string'

and in the request use


${arrayContent}


Hope this helps!

regards,

/Ole
eviware.com
rdebie
Contributor

Thanks Ole.
cancel
Showing results for 
Search instead for 
Did you mean: