title: Jmeter BeanShell - Access Response Data - Beanshell error?
body: <p>I have this code in my Beanshell Post Processor</p>
  
  <pre><code>String line;
  String[] words;
  
  line = SampleResult.getResponseMessage(); log.info(msg);
  
  words  = line.split("*");
  
  log.info("Here We are"); 
  
  for (int i = 0; i &lt; words.length; i++) {
    log.info(words[i]);
   }
  </code></pre>
  
  <p>This is the error I'm getting</p>
  
  <blockquote>
    <p>2017/02/21 14:23:31 ERROR - jmeter.util.BeanShellInterpreter: Error
    invoking bsh method: eval Sourced file: inline evaluation of: <code>
    String line; String[] words;  line =
    SampleResult.getResponseMessage(); log.inf . . . '' : Attempt to
    resolve method: getResponseMessage() on undefined variable or class
    name: SampleResult  2017/02/21 14:23:31 WARN  -
    jmeter.extractor.BeanShellPostProcessor: Problem in BeanShell script
    org.apache.jorphan.util.JMeterException: Error invoking bsh method:
    eval  Sourced file: inline evaluation of:</code> String line; String[]
    words;  line = SampleResult.getResponseMessage(); log.inf . . . '' :
    Attempt to resolve method: getResponseMessage() on undefined variable
    or class name: SampleResult</p>
  </blockquote>