You can certainly use the RE with Java Requests. The RE works on the body, headers or URL.
The setResponseMessage() method sets the message corresponding to the responseCode. e.g. for code=200 that would be "OK". These are not part of the headers, certainly for a SampleResult. You probably ought to be using setResponseData() instead. S On 16/06/06, Josh Drummond <[EMAIL PROTECTED]> wrote:
I'm also having a problem with this. I successfully created a custom java request class, compiled/jarred and it shows up in the JMeter GUI dropdown. I added this Java Request to my JMeter test and the class is getting called correctly. However I want to return data from the Java Request back to my JMeter script for use later in the script. To do this I call "results.setResponseMessage()" inside the runTest() method and return that results object. I know it is returning this correctly because I have a View Results Tree control and for each Java Request the Sampler Result has my string as the HTTP response message. Next step I want to extract that value using the Regular Expression Extractor (I've done this before extracting results from normal http requests without any problem), however when I do it for a Java Request (the same data pattern and regex) it does not find a match. I'm fairly certain there isn't a problem in the data or regex, so my question is can I even use a Regular Expression Extractor as a child Post Processor to a Java Request and successfully extract data from the HTTP response message of the Sampler result? -- View this message in context: http://www.nabble.com/Calling-Java-Classes-From-JMeter-t1754973.html#a4909157 Sent from the JMeter - User forum at Nabble.com. --------------------------------------------------------------------- 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]

