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.
November 22, 2008, 10:45:19 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
Removing some empty elements while leaving others empty
Welcome, Guest. Please login or register.
November 22, 2008, 10:45:19 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Removing some empty elements while leaving others empty
« previous next »
Pages: [1] Print
Author Topic: Removing some empty elements while leaving others empty  (Read 326 times)
hanning
Newbie
*
Posts: 3


« on: February 11, 2008, 07:02:27 pm »

First off, thank you for a great product!

Now, I have a question regarding data sources and the Remove Empty Content feature.  I posted a similar question already but thought the questions were different enough to warrant separate topics.  When using an Excel spreadsheet as a data source, is there a way in SoapUI Pro (I'm currently on 2.0) to accomplish the following?

I want to be able to have "empty" cells in my Excel spreadsheet data source, some of which would cause the target elements in the request to be removed and some of which would leave empty target elements in the request.

I'm thinking that I would have to:
1. Fill out to-be-removed elements as empty cells in the spreadsheet
2. Fill out to-be-empty elements with some magic value, say "!EMPTY!"
3. Turn the Remove Empty Content feature off for the request step
4. Write a Groovy script, placed before the request step, that will remove empty elements.
5. Write a Groovy script, placed in between the request step and the above Groovy script, that will replace "!EMPTY!" with a blank string or a null value

Does this sound like something that could work as desired?  Is there an easier way, perhaps one already supported?  In the little searching I've done so far I haven't stumbled upon a solution, so pardon me if I've missed something obvious.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #1 on: February 11, 2008, 11:20:39 pm »

Hi!

see my answer to your other question; the soapUI extension mechanism described at http://www.soapui.org/architecture/extensions.html would probably help you with this; create your own RequestFilter that removes/modifies the request as required just before it is sent..

I'm working on a tutorial for this, so if you have a little patience I'll get you going in a week or two :-)

regards!

/Ole
eviware.com
Logged
hanning
Newbie
*
Posts: 3


« Reply #2 on: February 12, 2008, 10:50:32 pm »

Thank you for the answers, Ole.  I'll look into your suggestion while I await the tutorial.  Smiley
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