Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 97734 invoked from network); 20 Jun 2008 02:36:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jun 2008 02:36:36 -0000 Received: (qmail 62929 invoked by uid 500); 20 Jun 2008 02:36:32 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 62907 invoked by uid 500); 20 Jun 2008 02:36:32 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 62891 invoked by uid 99); 20 Jun 2008 02:36:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 19:36:32 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of navaz25@gmail.com designates 209.85.128.191 as permitted sender) Received: from [209.85.128.191] (HELO fk-out-0910.google.com) (209.85.128.191) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 02:35:40 +0000 Received: by fk-out-0910.google.com with SMTP id 18so1040181fkq.5 for ; Thu, 19 Jun 2008 19:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=W+Wh8ekWHTGQCAtHXEUyN+054UinlEKRotTGpDvLEo4=; b=IpZyJFzqDM59XCV3H9Oc51vkA0gPRhr1uPQyCIxAX2jvvNGMwFRQ9QRup/pCjbeEFb N+Ghc/nzLsPjNz/10kzQRDbP4+JszdeHzpB4zWaddn7uvgy3ocT2SPeCkfuiwFPAHl64 KWfEEQLfgvwg81E8xmSRdWp30kms5/mWvbDO0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=ochbzm8GEF6ECCWlfvFYyzXUL24A/gE3VncycaoWrEXE80NqnPNVjg7G9vS9gt70FA g7xw+7xhV1yuYbZXljBYbsbp6J8PJMYx7zqqbz1t566A7rE/WVZ9s4pQSnD28gSAa1/l nyJPKCGCI4TTOoIzRqGrCgWZkvk7IciAJqvOI= Received: by 10.78.157.15 with SMTP id f15mr1339828hue.2.1213929357283; Thu, 19 Jun 2008 19:35:57 -0700 (PDT) Received: by 10.78.161.20 with HTTP; Thu, 19 Jun 2008 19:35:57 -0700 (PDT) Message-ID: Date: Thu, 19 Jun 2008 19:35:57 -0700 From: "Khan Navaz" To: "JMeter Users List" Subject: Re: unable to send a SOAP request with byte[] - request doesn't show in Jmeter at run. In-Reply-To: <25aac9fc0806191751m5df8bf76g1ec24e3c88b73559@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7449_14729521.1213929357268" References: <25aac9fc0806191642y68ad370fvd929bd57d3b23376@mail.gmail.com> <25aac9fc0806191730i60b90cdax6895333f7a4f9cce@mail.gmail.com> <25aac9fc0806191751m5df8bf76g1ec24e3c88b73559@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_7449_14729521.1213929357268 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline ${__BeanShell(vars.getObject("byteString"))} return [B@131abb2 all the time. Dont know what are these '[B@131abb2' and where its getting them from. there are no more error in jmeter.log file. On Thu, Jun 19, 2008 at 5:51 PM, sebb wrote: > On 20/06/2008, Khan Navaz wrote: > > I dont know why I am having so much difficulty explaining this to you, > not > > sure if you want to understand it in the first place. > > > > once I place the byte[] in vars.putObject() how can I retrieve it in the > > SOAP request, I repeat in SOAP Request. I dont think I can do > > vars.getObject() inside the soap tags. > > > > Sebb, take your time you dont have to reply in 2 sec, pls read the whole > > chain. For god sake dont send in hurry. > > > > As I wrote before, you need to use a beanshell function, which is > described here: > > http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell > > The function needs to contain the following code: > > vars.getObject("byteString") > > > > > > On Thu, Jun 19, 2008 at 5:30 PM, sebb wrote: > > > > > On 20/06/2008, Khan Navaz wrote: > > > > I am a newbie, I tried > > > > > > > > > > > > > > That's not a beanshell function call. > > > > > > > also tried vars.getObject("byteString") in Request - Pre processor > bean > > > > shell, it doesnt work :( > > > > > > Have you checked the log? > > > > > > > also the jmeter.log has NUL NUL sometimes. > > > > > > If you want a sensible reply to that you'll have to provide a bit more > > > detail. > > > > > > > > > > > On Thu, Jun 19, 2008 at 4:42 PM, sebb wrote: > > > > > > > > > On 20/06/2008, Khan Navaz wrote: > > > > > > *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:* > > > > > > > > > > > xmlns:sec="http://schemas.xmlsoap.org/ws/2002/07/secext"> > > > > > > > > > > > > ......... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Variable references can only be strings. > > > > > > > > > > You'll need to use a beanshell function to recover the data: > > > > > > > > > > vars.getObject("byteString") > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *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 > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > jmeter-user-unsubscribe@jakarta.apache.org > > > > > For additional commands, e-mail: > jmeter-user-help@jakarta.apache.org > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org > > ------=_Part_7449_14729521.1213929357268--