Dont use Beanshell sampler. Use JSR sampler and get the variables as usual like vars.get("variableName");
In Bean shell sampler it wont work.