You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Shawn Heeley <Sh...@entrust.com> on 2007/05/04 14:47:53 UTC
XPath Extractor Issue
Hi folks,
I'm new to JMeter. This is my first attempt at using it to performance
test a Web Services application. I have a web services call that
results in an XML body response. In the response is the following (I'm
paraphrasing this):
<soap:Envelope><soapenv:Body><getChallengeReturn><challenge><item><Row>0
</Row><Column>0</Column></item><item><Row>4</Row><Column>3</Column></ite
m><item><Row>1</Row><Column>4</Column></item></challenge>
Before the next web services request, I need to parse out all of the
"coordinate" data, find the correct answers, then add them dynamically
into the next web services call. I've done this as follows:
Challenge Request
- XPath Extractor
Challenge Response
- BeanShell PreProcessor
Inside the XPath Extractor, I have the following:
//soapenv:Envelope//soapenv:Body//getChallengeReturn//challenge/* w/ a
default value of not_found
Inside the BeanShell PreProcessor, I'm just printing to the console what
I'm getting. And I'm getting nothing: grid_val=not_found
I was hoping my XPath query would grab everything between the
<challenge></challenge> tags and then I could parse it within the
BeanShellPreProcessor. Am I going about this the wrong way? I need
access to all of the matched Row/Column "items" in the XML above within
the BeanShellPreProcessor. Should I just use a regex and grab the whole
string or the whole body response? Is there a smarter XPath query?
Thanks for the help.
Shawn
Re: XPath Extractor Issue
Posted by Ivan Rancati <iv...@sharpmind.de>.
Shawn Heeley wrote:
>
> Hi folks,
>
>
> Inside the XPath Extractor, I have the following:
> //soapenv:Envelope//soapenv:Body//getChallengeReturn//challenge/* w/ a
> default value of not_found
>
>
>
Not sure, I have used XPath only once, but at least on Linux JMeter was
happy with single slashes, not double.
What helped me with the XPath queries was save the .xml to a temporary file
and looking at it with XPath Explorer
http://sourceforge.net/projects/xpe/ http://sourceforge.net/projects/xpe/
--
View this message in context: http://www.nabble.com/XPath-Extractor-Issue-tf3691894.html#a10372284
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org