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 <[email protected]>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-of-syste%0Am.html>
>
>
>
> Unfortunately,  it does not seems compatible with the latest version of
> JMeter, anyone have found a workaround ?
>
>
>
> Thanks a lot,
>
>
>
> Martin
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Reply via email to