jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khan Navaz" <nava...@gmail.com>
Subject unable to send a SOAP request with byte[] - request doesn't show in Jmeter at run.
Date Thu, 19 Jun 2008 23:27:14 GMT
*BeanShell:*
String file =
Path+"/data/abcService/common/deep_foldered_images_in_zip.zip";
byte[] byteArray;
byte[] byteString;

 try {
    byteArray = IOUtils.toByteArray(new FileInputStream(file));
      } catch (IOException e){
    e.printStackTrace();
 }

vars.putObject("byteString",byteArray);

*SOAP Request:*
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sec="http://schemas.xmlsoap.org/ws/2002/07/secext">
   <soapenv:Header>
      .........
   </soapenv:Header>
   <soapenv:Body>
      <add>
         <binaryData><![CDATA[${byteString}]]></binaryData>
      </add>
   </soapenv:Body>
</soapenv:Envelope>

*C:\home\y\logs\jmeter\jmeter.log*
2008/06/19 15:34:13 ERROR - jmeter.threads.JMeterThread:
java.lang.ClassCastException: [B cannot be cast to java.lang.String
at org.apache.jmeter.threads.JMeterVariables.get(JMeterVariables.java:98)
at
org.apache.jmeter.engine.util.SimpleVariable.toString(SimpleVariable.java:53)
at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:133)
at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:97)
at
org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:85)
at
org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:200)
at
org.apache.jmeter.protocol.http.sampler.SoapSampler.getXmlData(SoapSampler.java:66)
at
org.apache.jmeter.protocol.http.sampler.SoapSampler$2.getContentLength(SoapSampler.java:202)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.getRequestC

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message