Forum Discussion
4 Replies
Sort By
- omatzuraSuper ContributorHi,
You'll need to create a groovy-script for this, something in the line of// 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 - mohbubur_rahmanContributorThanks Ole, I am new to SoapUI and Groovy scripts, where would be a good starting point for this?
- omatzuraSuper ContributorHi,
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/functio ... ystep.html.
Good luck :-)
regards,
/Ole
eviware.com - mohbubur_rahmanContributorThanks 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
Related Content
- 3 years agodratliff
Recent Discussions
- 19 hours agoruchisingh