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, 11:03:48 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
Log SOAP-Requests and Responses ?
Welcome, Guest. Please login or register.
November 22, 2008, 11:03:48 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Log SOAP-Requests and Responses ?
« previous next »
Pages: [1] Print
Author Topic: Log SOAP-Requests and Responses ?  (Read 386 times)
Juergen
Newbie
*
Posts: 6


« on: March 10, 2008, 10:54:21 am »

Hello,

is there a simple way to log soap-requests and soap-responses with a groovy script?
Unfortunately I found no example to the topic. The goal is to store the complete Requests and Responses in a data base.

Thanks

Juergen
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #1 on: March 10, 2008, 11:40:04 am »

Hi Juergen,

It shouldn't be that difficult,

// get the request object
def request = testRunner.testCase.testSteps["Request 1"].testRequest

// get the actual messages
def requestContent = request.requestContent
def responseContent = request.response.contentAsString'

// save them
...

(check the GroovySQL documentation..)


soapUI Pro has a DataSink TestStep which makes it a breeze to save properties like this to files, databases, etc.. Have a look at http://www.soapui.org/userguide/functional/datasinkstep.html

Hope this helps!

regards,

/Ole
eviware.com
Logged
Juergen
Newbie
*
Posts: 6


« Reply #2 on: March 10, 2008, 12:42:51 pm »

Thank's Ole for your quick answer,

your solution works fine.

The option with the data sink is no solution in this case, because i'm working with multiple environments and i have no idea how the connection string of the database step can be parameterized.

Thanks a lot

Juergen
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #3 on: March 10, 2008, 01:15:14 pm »

Hi,

you can parameterize the connection-string using standard soapUI property-expansions, ie if you store host, db, etc.. in a properties-step, you can expand these in the connection string with something like

jdbc:XXX://${#Properties#Host}/${#Properties#Database}

regards!

/Ole
eviware.com
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