Shawn,

The variable it passes in is vars.  You can do vars.put(name, value).
Name/value should both be strings afaik.  You can then refer to the variable
as usual ... ${name}.

Regards,

Matt C.

-----Original Message-----
From: Shawn Heeley [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 3:24 PM
To: JMeter Users List
Subject: RE: XPath Extractor Issue

Hi all,

Is it possible to "push" variables from a Beanshell PreProcessor?  I
need to do some processing inside a Beanshell script which is called
from a BeanShell PreProcessor.  I know the PreProcessor passes in var,
ctx, etc.  Is there a var.set or equivalent?  I can't seem to get it to
work.

Thanks
Shawn

-----Original Message-----
From: Matthew Coventon [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 2:23 PM
To: 'JMeter Users List'
Subject: RE: XPath Extractor Issue


Hmm ... I guess I'm not familiar with how JMeter would handle this.  The
XPath would select all the <item> nodes.  These have child nodes, so
JMeter must have some behavior defined as to what to put in the variable
(maybe it put's nothing).  Maybe someone can answer this.  In the mean
time try doing //challenge/item/Row and see what that does.

-----Original Message-----
From: Shawn Heeley [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 12:50 PM
To: JMeter Users List
Subject: RE: XPath Extractor Issue

Hi Matt,

So I tried going back to the Xpath Extractor option.  I still have the
following XML block coming in:

<challenge>
<item>
<Row>0></Row>
<Column>0</Column>
</item>
<item>
<Row>4</Row>
<Column>3</Column>
</item>
<item>
<Row>1</Row>
<Column>4</Column>
</item>
</challenge>

I've setup the following Xpath Extractor:
Reference Name: grid_val
Xpath query: //challenge/item
Default Value: not_found

When I use my BeanShell PreProcessor (on the next request), I can see
the following variable values: Call to gridparse.bsh userid:testguy
grid_val_matchNr=3 userid=testguy START.MS=1178249021713
START.YMD=20070503 grid_val=not_found JMeterThread.last_sample_ok=true
START.HMS=232341

So I can see that it is hitting my 3 items (grid_val_matchNr=3) but it
doesn't seem to have access to the acutal values.  Thoughts?

Thanks for the help,
Shawn

-----Original Message-----
From: Matthew Coventon [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 10:00 AM
To: 'JMeter Users List'
Subject: RE: XPath Extractor Issue


I'm a little rusty on my XPath but I think you should be using single
"/" everywhere and take out the "/*" at the end. So:

/soapenv:Envelope/soapenv:Body/getChallengeReturn/challenge

Alternatively you could try //challenge which would give you all
challenge elements in the document.

Regards,

Matt C.

-----Original Message-----
From: Shawn Heeley [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 8:51 AM
To: JMeter Users List
Subject: RE: XPath Extractor Issue

No, our code defines the soapenv namespace. I think I must have mistyped
in my email.

I've figured out a way to get it done with regex.  I use the following:

<(challenge*)[^>]*>.*?</\1>

This sticks everything between and including the <challenge> block
within a single string which I've been able to pick apart in the
BeanShellPreProcessor.  This seems to work.

Thx.
Shawn

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 9:47 AM
To: jmeter-user@jakarta.apache.org
Subject: Re: XPath Extractor Issue


>
<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>

Inside the XPath Extractor, I have the following:
//soapenv:Envelope//soapenv:Body//getChallengeReturn//challenge/*
      ^^^
shouldn't this be "//soap:Envelope"?

Regards,
Jens




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to