getting a value from soap response
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2007
11:34 PM
07-23-2007
11:34 PM
getting a value from soap response
hi all,
how to retrieve value from soap response.?
suppose i got a response of:
i need to retrieve PostCode values.
thanks
franky
how to retrieve value from soap response.?
suppose i got a response of:
i need to retrieve PostCode values.
thanks
franky
4 REPLIES 4
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007
12:57 AM
07-24-2007
12:57 AM
Hi Franky,
create a groovy-script step after your request that gets the response message and parses it using any of the available XML-parsing options in groovy (http://groovy.codehaus.org/Processing+XML).. for example:
Hope this helps!
regards,
/Ole
eviware.com
create a groovy-script step after your request that gets the response message and parses it using any of the available XML-parsing options in groovy (http://groovy.codehaus.org/Processing+XML).. for example:
// get request property
def request = testRunner.testCase.getTestStepByName( "Request 1" )
def property = request.getProperty( "request" )
// parse out textnodes to modify
def node = new groovy.util.XmlParser(false,false).parseText(property.value)
...
Hope this helps!
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007
02:36 AM
07-24-2007
02:36 AM
hi ole
thanks for the response . i have gone through the link that u have sent...
since i am a newbie user, i dont know where to insert the groovy script and get a value from the response.could u plz explain in detail
thanks
franky
thanks for the response . i have gone through the link that u have sent...
since i am a newbie user, i dont know where to insert the groovy script and get a value from the response.could u plz explain in detail
thanks
franky
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007
11:43 PM
07-24-2007
11:43 PM
Hi ole,
Since i am a Novice user for Groovy and its usage, Kindly shed some Light On this.
Thanks,
Franky
Since i am a Novice user for Groovy and its usage, Kindly shed some Light On this.
Thanks,
Franky
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2007
02:35 AM
07-26-2007
02:35 AM
Hi!
If you right click in the TestCase editor or right click in the project tree on a TestCase (it usually says Test Steps ()) you will be able to choose Add Step/Groovy Script.
You can read mote about how to use Groovy Scripts at:
http://www.soapui.org/userguide/functio ... ystep.html
And about how to work with TestCases at
http://www.soapui.org/userguide/functio ... cases.html.
Hope this helps!
/niclas
eiware.com
If you right click in the TestCase editor or right click in the project tree on a TestCase (it usually says Test Steps ()) you will be able to choose Add Step/Groovy Script.
You can read mote about how to use Groovy Scripts at:
http://www.soapui.org/userguide/functio ... ystep.html
And about how to work with TestCases at
http://www.soapui.org/userguide/functio ... cases.html.
Hope this helps!
/niclas
eiware.com
Product Guy for Ready! API, SoapUI and all things API
