header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
December 05, 2008, 12:42:58 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
Clone the specific XML Tag ,in DDT.
Welcome, Guest. Please login or register.
December 05, 2008, 12:42:58 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Clone the specific XML Tag ,in DDT.
« previous next »
Pages: [1] Print
Author Topic: Clone the specific XML Tag ,in DDT.  (Read 604 times)
Franky
soapui pro users
Newbie
*
Posts: 17


« on: September 14, 2007, 08:29:00 am »

Hi,

Here is my requirement.

I want to send email notification using the below XMl tag.
<notify email="danysrc@gmail.com"/>

But , when i am executing as a Data Driven Test , i just want to clone the same tag depends on the number of email id given in the XLS.

So, how to do this..?

Regards,
Franky.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,506


« Reply #1 on: September 18, 2007, 04:07:00 pm »

Hi Franky,

hmm.. you will need to create a groovy-script that creates the aggregated xml and adds it to the request.. if you give some more details maybe I can help you..

regards!

/Ole
eviware.com
Logged
Franky
soapui pro users
Newbie
*
Posts: 17


« Reply #2 on: September 19, 2007, 07:29:22 am »

Hi,


Let me explain the thing.

I need to send notification to "n" number of users ."n" may be 5, 10 or etc.
so, i want to create n number of
" <notify email="${DataSource#Notify_Email}"/>" tags in my request soap xml, depends on the number of email ids provided in the  xls sheet.


For example if i provide 5 email ids in my xl sheet ,
the i need to get my request as follows:
 <notify email="${DataSource#Notify_Email}"/>
 <notify email="${DataSource#Notify_Email}"/>
 <notify email="${DataSource#Notify_Email}"/>
 <notify email="${DataSource#Notify_Email}"/>
 <notify email="${DataSource#Notify_Email}"/>


OR

way2:
= = = =

is there any way to pass array of email ids to a single

 <notify email="${DataSource#Notify_Email}"/>

 tag itself.


Regards,
Franky.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,506


« Reply #3 on: September 19, 2007, 10:25:01 am »

Hi Franky,

hmm.. you would probably need to create a groovy-script that builds the desired xml for each row in your xls and then refer to the created xml string using property-expansion, ie:

step 1: DataSource for your XSL file
step 2: Groovy script that gets the current email and adds it to an xml string in the current context
step 3: DataSourceLoop back to the groovy script
step 4: Your request that referes to the created xml-string using property-expansion, ie..

${notify_emails}

which contains the xml built by the groovy script above..

Hope this helps!

regards,

/Ole
eviware.com
Logged
Franky
soapui pro users
Newbie
*
Posts: 17


« Reply #4 on: September 19, 2007, 12:24:24 pm »

Hi,

Thanks for ur response.

But , is  any other way  to pass Array of values to  an XML tag , without the help of Groovy ?

If not, can i have the needed  Groovy snippet ?


Regards,
Franky.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header