jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Renaud, Martin" <Martin.Ren...@nuance.com>
Subject RE: HTTP Request Sampler configuration for REST
Date Wed, 12 May 2010 18:24:33 GMT
Hi,

Thanks for the quick response. I tried with your suggestion and the
received type was still not the one expected by the app.

It is good to know that what I'm trying to do is not supported (yet?), I
will stop trying and concentrate on the Java Request Sample instead.

However if someone found a way to achieve that with an HTTP Sampler, I
would be glad to hear how.

Thanks again,

-Martin

-----Original Message-----
From: Deepak Shetty [mailto:shettyd@gmail.com] 
Sent: Wednesday, May 12, 2010 1:43 PM
To: JMeter Users List
Subject: Re: HTTP Request Sampler configuration for REST

The HTTPSampler probably can only use the types that form can use are
application/x-www-form-urlencoded
or multipart/form-data . So I dont think what you want is currently
supported

The mime type against the file parameter , should be the mime-type of
the
file - text/xml or whatever not of the entire request , can you try with
that and multipart/form-data , i find it surprising that your receiving
application mandates multipart/mixed.
You can either use a different tool like SOAP UI which should have
better
support or you can code this as a java class and invoke it with a Java
Sampler  in jmeter if you dont feel like diving into Jmeter code.

regards
deeoak


On Wed, May 12, 2010 at 8:48 AM, Renaud, Martin
<Martin.Renaud@nuance.com>wrote:

> Hi All,
>
>
>
> I'm trying to use JMeter 2.3.4 to send a request to a REST application
> without success.
>
>
>
> I'm using the HTTP Request Sampler. And I cannot find the good
> configuration for the request to be consumed by my application. More
> precisely, I cannot get the request sent by JMeter to have the
> "Content-Type: multipart/mixed;boundary=Boundary_xyz" I need.
>
>
>
> Info on my application:
>
> *       Reachable by a "simple url": no argument to be extracted from
it
> to be sent as handler parameters.
> *       Attached XML that is unmarshaled using JAXB.
> *       The handler consumes multipart/mixed POST requests.
>
>
>
> What I did:
>
> *       Attach an XML file using the "Send Files With the Request". I
> have no parameter name and the MIME type set to "multipart/mixed"
> *       Added a Header manager with Accept=multipart/mixed.
> *       Request checkbox "Redirect": unchecked
> *       Request checkbox "Follow Redirects": unchecked
> *       Request checkbox "Use KeepAlive": checked
>
>
>
> Depending if the Request checkbox "Use multipart/form-data for HTTP
> POST" is check, I get the following:
>
>
>
> Check:
>
> *       The request received by my app has "Content-Type:
> multipart/form-data; boundary=a-boundary"
> *       The content-type is not good: my app consumes multipart/mixed.
>
>
>
> Unchecked:
>
> *       The request received by my app has "Content-Type:
> multipart/mixed"   , but no boundary.
> *       The parsing of the request throws a
> org.jvnet.mimepull.MIMEParsingException because no boundary is found.
>
>
>
>
>
> Can you please tell me what I'm doing wrong.
>
>
>
> Also, I found in the net the following Sampler:
>
http://smartrics.blogspot.com/2009/04/jmeter-to-test-robustness-of-syste
>
m.html<http://smartrics.blogspot.com/2009/04/jmeter-to-test-robustness-o
f-syste%0Am.html>
>
>
>
> Unfortunately,  it does not seems compatible with the latest version
of
> JMeter, anyone have found a workaround ?
>
>
>
> Thanks a lot,
>
>
>
> Martin
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message