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 02, 2008, 01:39:38 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
HTTP requests
Welcome, Guest. Please login or register.
December 02, 2008, 01:39:38 pm
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  HTTP requests
« previous next »
Pages: [1] Print
Author Topic: HTTP requests  (Read 399 times)
mohbubur rahman
soapui pro users
Newbie
*
Posts: 21


« on: May 07, 2008, 09:20:46 am »

Hi,

Can you tell me if SoapUI supports HTTP requests, specifically a GET command? If so can you explain how I would do that.

Regards,

Moks
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,470


« Reply #1 on: May 07, 2008, 03:21:19 pm »

Hi,

You'll need to create a groovy-script for this, something in the line of

Code:
// create request
def getMethod = new org.apache.commons.httpclient.methods.GetMethod( url )

// get httpclient
def httpClient = com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.httpClient

// send it
httpClient.executeMethod( getMethod )

// process response
def response = getMethod.responseBodyAsString
...

regards,

/Ole
eviware.com
Logged
mohbubur rahman
soapui pro users
Newbie
*
Posts: 21


« Reply #2 on: May 08, 2008, 02:58:01 am »

Thanks Ole, I am new to SoapUI and Groovy scripts, where would be a good starting point for this?
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,470


« Reply #3 on: May 08, 2008, 04:25:55 am »

Hi,

ok.. the groovy website has a good introduction to the language, have a look at http://groovy.codehaus.org/Getting+Started+Guide. The script would have to be placed in a Groovy Script Step in your soapUI TestCase, read more about this at http://www.soapui.org/userguide/functional/groovystep.html.

Good luck :-)

regards,

/Ole
eviware.com
Logged
mohbubur rahman
soapui pro users
Newbie
*
Posts: 21


« Reply #4 on: May 08, 2008, 04:56:31 am »

Thanks Ole, I was able to perform this action.

The http request is sent based on the response recieved for a soap request. Based on the time range specified, the response will have n' elements that I require using http request for.

E.g. If I specify time from 08:00-12:00, this will create 3 elements. I am using Xpath (...\\elementName), this should give me all occurences of this element (not able to prove yet). I need to use th Groovy script to iterate through each of these element and send a http request. I have been able to use while statement. But how would I iterate though the captured property?

Moks
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