修改源码中在com.jmeter.protocol.soap.sampler.CustomSOAPSampler.java文件的函数sample(Entry e)
若request body中文乱码,则在以下位置添加一行代码:
result.setSamplerData(new String(result.getSamplerData().getBytes("gbk"),"utf-8"));
若response data 出现中文乱码,则同样在以上源码函数中,修改
将:result.setResponseData(respContents.getBytes());
改成:result.setResponseData(respContents,"utf-8");
修改完,直接打包为jar文件,覆盖原来的jar包即可