Contact Us
About Us
News
Home
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
.
January 09, 2009, 07:41:07 am
Username:
Password:
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forgot your password?
Inserting XML
Welcome,
Guest
. Please
login
or
register
.
January 09, 2009, 07:41:07 am
News:
The Forums are up! Welcome to eviware.
Eviware Forum
soapUI
soapUI
Inserting XML
« previous
next »
Pages:
[
1
]
Author
Topic: Inserting XML (Read 438 times)
John R. Brewster
Newbie
Posts: 10
Inserting XML
«
on:
August 19, 2008, 04:54:20 pm »
I apologize ahead of time for being new to XML and SoapUI and for not using the correct terminology.
However, I am trying to do the following from an Groovy Script.
1 - Read a Response and Grap all the information between a tag. (for example everything between <Addresses>...</Addresses>
2 - REMOVE everthing between a tag (ie <Addresses>...</Addresses> in a different Request and then STUFF everhting I got in step 1) and put it into the now empty <Addresses></Addresses> of Step 2.
I just don't know where to start with that. I have looked thru Groovy and SoapUI and tried a few things using XmlParser and XmlHolder, but not getting it done.
Thanks for any help.
--Jb
Logged
omatzura
Administrator
Hero Member
Posts: 1,666
Re: Inserting XML
«
Reply #1 on:
August 20, 2008, 09:24:06 pm »
Hi John,
Maybe you can achieve this without a groovy script;
1) Create a property-transfer that selects the addresses element and transfers it to a property in a properties-step, for example named "addresses"
2) Expand that property in your request with
${PropertiesStep#addresses}
In this setup the addresses will first be copied to the property, and then inserted into the outgoing request..
Does that suffice?
regards!
/Ole
eviware.com
Logged
John R. Brewster
Newbie
Posts: 10
Re: Inserting XML
«
Reply #2 on:
August 25, 2008, 06:41:14 pm »
I tried this. However, what was happening was I was getting one parent tag too many (Only wanted the children) and I was blowing away the Parent node where I was trying to put it. I wanted the children to go into the parent of the resulting doc without the parent of the requesting doc. If that makes sense.
for example:
What I had
<foo>
<fooChild>
<fooChild>
</foo>
<bar>
<bazChild>
<bazChild>
</bar>
What I wanted in the END:
<bar>
<fooChild>
<fooChild>
</bar>
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> eviware general
-----------------------------
soapUI
-----------------------------
=> soapUI
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.2
|
SMF © 2006-2007, Simple Machines LLC
Loading...