On 16/05/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I am trying to  measure the difference in response times my application has
>  when I implement the communication either with SOAP/XML  or Hessian
>  protocol.
>  Hessian is a binary web protocol with Java libraries provided at
>  http://hessian.caucho.com/.
>
>  As jmeter doesn't provide a sampler for Hessian protocol - at least not to
>  my knowledge -
>  I am trying to write my own one using the Beanshell sampler.
>
>  Unfortunately I get an error message at a place I didn't expect to happen
>  and I'd appreciate if anyone here could help me with this little sampler.
>
>  The message states to miss a method in a particular class that in fact
>  exists.
>
>  Let me show you the code of the Beanshell skript  here:
>  A 'Hello world' string sould be converted into Hessian
>  and then passed over to Httpclient.
>  I left the Httpclient stuff here due to simplicity.
>
>  //-- start of the script
>  import org.apache.commons.httpclient.*;
>  import org.apache.commons.httpclient.methods.*;
>  import org.apache.commons.httpclient.params.HttpMethodParams;
>
>  import com.caucho.hessian.client.HessianProxyFactory;
>
>  public interface HelloService {
>     public String hello();
>  }
>
>  public class HelloBasic implements HelloService {
>     public String hello()  {
>         return "Hello, world";
>     }
>  }
>
>  public class HttpClientbsh implements HelloService {
>       private static String url = "http://10.204.88.20/xxx";;
>       public void httpbsh() {
>             HessianProxyFactory factory = new HessianProxyFactory();
>             HelloBasic basic = (HelloBasic)
>  factory.create(HelloBasic.class, url);
>              }
>  }
>
>  HttpClientbsh bsh = new HttpClientbsh();
>  bsh.httpbsh();
>
>  //--- end of the script
>
>  Below is the message which I receive from jmeter when I run my testplan,
>  which consists of a single Beanshell sampler only:
>
>  Response message: org.apache.jorphan.util.JMeterException: Error invoking
>  bsh method: source      Sourced file: c:\tmp\Hessian.bshrc : Method
>  Invocation bsh.httpbsh
>

Is this the full error message?
Anything in jmeter.log ?

>  When I remove the line keeping
>  "HelloBasic basic = (HelloBasic) factory.create(HelloBasic.class, url);"
>  then the sampler runs into a green sign when watched at the "View Results
>  Tree Listener".
>  However, according the Hessian documentation
>  I wouldn't be able to setup any proper Hessian client
>  unless I call factory.create().
>
>  After I downloaded the current hessian.jar
>  I looked up the class HessianProxyFactory for a method 'create()' and, yep,
>  it exists and is declared to be public.
>
>  At this place I must confess that I am not a born Java programmer.
>  My conclusion is that I used the "HelloBasic basic = ..." in a wrong way,
>  but I don't know what might be wrong with it.
>
>  Please, can anyone who has experience with Beanshell under jmeter help me?
>

If you put the code above in a file, you should be able to try
executing it directly from BeanShell without using JMeter:

java  -cp bsh.jar;httpclient.jar;etc   bsh.Interpreter filename

This might give some more clues.

>
>
>  Thanks in advance
>  Christoph
>
>  ____________________________________________________________________
>  Geschäftsführung: Lothar Engelke (Vors.), Hans Berg
>  Vorsitzender des Aufsichtsrates: Michael Kurtenbach
>  Sitz der Gesellschaft: Köln
>  Registergericht: Amtsgericht Köln HRB Nr. 25642
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to