HTTP Raw Request for SOAP + MTOM

4477 views
Skip to first unread message

mrlabbe

unread,
Jun 6, 2011, 10:59:57 PM6/6/11
to jmeter-plugins
Hi,

I am in a situation where I need to load test file uploads (+40MB
size) to a web service using SOAP with MTOM. I haven't found any
useful information about how to do this with standard jmeter's
samplers. I luckily stumbled on jmeter-plugins and I was wondering if
the HTTP Raw Request Sampler could be used for that? It would be event
better if someone had already done such a thing.

... I am still wondering why we opted to use SOAP + MTOM at the time :
(

thanks :)

Andrey Pohilko

unread,
Jun 7, 2011, 7:56:20 AM6/7/11
to jmeter-...@googlegroups.com
Hi!

Well, there is hidden and undocumented workaround in HTTP Raw Request for
efficient sending large requests via network ;)

Read topic here how to use it: http://jmeter.512774.n5.nabble.com/fileupload-
test-with-JMeter-td4267154.html

Let me know if it helps

В сообщении от 7 июня 2011 06:59:57 автор mrlabbe написал:

mrlabbe

unread,
Jun 7, 2011, 11:12:02 AM6/7/11
to jmeter-plugins
Right, thanks for the link. I searched for information like that but
couldn't find it.

So we are saying that we need to setup a file which mimics a client
transferring the whole file using SOAP + MTOM? And the file will be
read sequentially and not loaded in memory right?

I was kind of expecting that and it would suit me alright.

Let me try it and get back to you!

Andrey Pohilko

unread,
Jun 7, 2011, 11:18:06 AM6/7/11
to jmeter-...@googlegroups.com
Yep, it just opens TCP connection, send file contents, and close connection. Entire file not placed in memory, so it is efficient.

Marc Labbe

unread,
Jun 16, 2011, 9:20:48 AM6/16/11
to jmeter-...@googlegroups.com
Finally got time to test it, it works but I need a bit more I am afraid...

The HTTPRawSamplerDirectFile doesn't seem to convert the variables I set in the file the same way that HTTPRawSampler does, is that correct? I mean, if I get a token from an authentication method prior to the Raw Request and use a variable (e.g. ${UserToken}) in the request, the value doesn't get replaced if I use HTTPRawSamplerDirectFile. It works with HTTPRawSampler however.

Another thing also, I expected the HTTP Raw Request behavior to change based on the startup option (-JdirectFileSender=1). It was a misunderstanding on my part and it took me a bit of experimentation to figure out that only the samplers created while the option is set will use HTTPRawSamplerDirectFile instead of HTTPRawSampler. Once I figured that out, it was simply a matter of having the right request in the file to make it work. It would probably good to document that if it ever makes it as an official feature. Actually, it seems to me that the best option would be to have a file selector in the UI to replace the value of the text box, similar to what the WebService(SOAP) Request offers. Want me to open a feature request for that? :)

Other than that, I am not yet at the stage where I am sending a large file but since I am able to send regular soap request from a file, I don't expect trouble with that anymore.

Andrey Pohilko

unread,
Jun 16, 2011, 10:19:34 AM6/16/11
to jmeter-...@googlegroups.com
About variable conversion: yes, the file flows directly from disk to network, without variable processing. Otherwise I need to put it on the memory and have all problems with memory.

It would be nice if you'll create an anhancement request with your ideas.

Thank you for your feedback!

Marc Labbe

unread,
Jun 16, 2011, 11:02:36 AM6/16/11
to jmeter-...@googlegroups.com
Since my data is only in the first portion of the file, can you suggest a hack we could do in the code to allow variable processing? The request is a multipart request split using boundaries, I guess we could load only the first part using the boundaries and then let go of it. It involves a bit of processing but if it's limited to the beginning, it would have less impact... what do you think?

I still have few things to look at, I have the feeling I have gone through all the possibilities yet. I'll keep you posted.

Enhancement request coming :)


Andrey Pohilko

unread,
Jun 16, 2011, 12:03:23 PM6/16/11
to jmeter-...@googlegroups.com
Ok, I made small change to the plugin: now you should prefix filename with FileToInclude: marker
All other data before last marker will be processed for variables and sent to server.
For example:
GET /test?a=b HTTP/1.0 
FileToInclude:/tmp/filetosend.txt
 

Andrey Pohilko

unread,
Jun 16, 2011, 12:03:51 PM6/16/11
to jmeter-...@googlegroups.com
Check downloads for snapshot3, it contains changes

shailes...@gmail.com

unread,
Aug 30, 2019, 11:31:58 AM8/30/19
to jmeter-plugins

Hi guys, 
Need help.
When I sending load with an HTTP request for  large file(>10MB or 1GB files) getting TimeoutException 
How to send large files(>10MB files with concurrency)  

Colin McCormack

unread,
Aug 25, 2021, 10:07:07 AM8/25/21
to jmeter-plugins
i plain can't use it - getting these types of errors in JMeter (i end every line with : \n\r

Caused by: java.lang.NumberFormatException: For input string: "Host:"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_292]
at java.lang.Integer.parseInt(Integer.java:580) ~[?:1.8.0_292]
at java.lang.Integer.parseInt(Integer.java:615) ~[?:1.8.0_292]
at kg.apc.jmeter.modifiers.RawRequestSourcePreProcessor.getNextChunkSize(RawRequestSourcePreProcessor.java:150) ~[jmeter-plugins-httpraw-0.1.jar:?]
... 6 more
2021-08-25 14:57:36,389 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'jp@gc - HTTP Raw Request'.
java.lang.RuntimeException: Error reading next chunk

Reply all
Reply to author
Forward
0 new messages