You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "NEVEU Anthony (EURIWARE SA)" <an...@euriware.fr> on 2007/08/16 17:59:12 UTC

Jmeter and Multipart/form-data

Hi all,

 

I'm using jmeter 2.3RC3 and I have a problem with a multipar/form-data form.

 

 

1)       First, I get with paros http proxy the request of http that I want to test with jmeter

 

POST http://10.24.10.129:8080/nuxeo/create_document.faces HTTP/1.1

Host: 10.24.10.129:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060130 Red Hat/1.7.12-1.4.2 Paros/3.2.13

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Proxy-Connection: keep-alive

Referer: http://10.24.10.129:8080/nuxeo/nxdoc/default/71322d51-532f-4716-9ffe-9077a8db3bfa/create_geide_workspace?conversationId=0NXMAIN2&tabId=GEIDE_TAB_CONTENT&subTabId=&conversationIsLongRunning=true

Cookie: JSESSIONID=A240A94D4F5CE8042A269F7129075FE0

Content-Type: multipart/form-data; boundary=---------------------------20944579171226107605927256923

Content-Length: 944

 

-----------------------------20944579171226107605927256923

Content-Disposition: form-data; name="j_id203:j_id207:0:j_id209:0:h_inputText"

 

azerty

-----------------------------20944579171226107605927256923

Content-Disposition: form-data; name="j_id203:j_id207:0:j_id209:1:h_inputTextarea"

 

 

-----------------------------20944579171226107605927256923

Content-Disposition: form-data; name="j_id203:j_id207:0:j_id209:2:t_inputCalendar"

 

 

-----------------------------20944579171226107605927256923

Content-Disposition: form-data; name="org.apache.myfaces.trinidad.faces.FORM"

 

j_id203

-----------------------------20944579171226107605927256923

Content-Disposition: form-data; name="org.apache.myfaces.trinidad.faces.STATE"

 

!j_id937:j_id938

-----------------------------20944579171226107605927256923

Content-Disposition: form-data; name="source"

 

j_id203:j_id238

-----------------------------20944579171226107605927256923--

 

            2) Second, I make a httpSampler with those parameters

 

        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Requête HTTP creéation workspace" enabled="false">

          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Variables définies pour l&apos;Utilisateur" enabled="true">

            <collectionProp name="Arguments.arguments">

              <elementProp name="" elementType="HTTPArgument">

                <boolProp name="HTTPArgument.always_encode">true</boolProp>

                <stringProp name="Argument.value">toto4</stringProp>

                <stringProp name="Argument.metadata">=</stringProp>

                <boolProp name="HTTPArgument.use_equals">true</boolProp>

                <stringProp name="Argument.name">j_id203:j_id207:0:j_id209:0:h_inputText</stringProp>

              </elementProp>

              <elementProp name="" elementType="HTTPArgument">

                <boolProp name="HTTPArgument.always_encode">true</boolProp>

                <stringProp name="Argument.value">tata4</stringProp>

                <stringProp name="Argument.metadata">=</stringProp>

                <boolProp name="HTTPArgument.use_equals">true</boolProp>

                <stringProp name="Argument.name">j_id203:j_id207:0:j_id209:1:h_inputTextarea</stringProp>

              </elementProp>

              <elementProp name="" elementType="HTTPArgument">

                <boolProp name="HTTPArgument.always_encode">true</boolProp>

                <stringProp name="Argument.value"></stringProp>

                <stringProp name="Argument.metadata">=</stringProp>

                <boolProp name="HTTPArgument.use_equals">true</boolProp>

                <stringProp name="Argument.name">j_id203:j_id207:0:j_id209:2:t_inputCalendar</stringProp>

              </elementProp>

              <elementProp name="" elementType="HTTPArgument">

                <boolProp name="HTTPArgument.always_encode">true</boolProp>

                <stringProp name="Argument.value">j_id203</stringProp>

                <stringProp name="Argument.metadata">=</stringProp>

                <boolProp name="HTTPArgument.use_equals">true</boolProp>

                <stringProp name="Argument.name">org.apache.myfaces.trinidad.faces.FORM</stringProp>

              </elementProp>

              <elementProp name="" elementType="HTTPArgument">

                <boolProp name="HTTPArgument.always_encode">true</boolProp>

                <stringProp name="Argument.value">${variable_1}</stringProp>

                <stringProp name="Argument.metadata">=</stringProp>

                <boolProp name="HTTPArgument.use_equals">true</boolProp>

                <stringProp name="Argument.name">org.apache.myfaces.trinidad.faces.STATE</stringProp>

              </elementProp>

              <elementProp name="" elementType="HTTPArgument">

                <boolProp name="HTTPArgument.always_encode">true</boolProp>

                <stringProp name="Argument.value">j_id203:j_id238</stringProp>

                <stringProp name="Argument.metadata">=</stringProp>

                <boolProp name="HTTPArgument.use_equals">true</boolProp>

                <stringProp name="Argument.name">source</stringProp>

              </elementProp>

            </collectionProp>

          </elementProp>

          <stringProp name="HTTPSampler.domain"></stringProp>

          <stringProp name="HTTPSampler.port"></stringProp>

          <stringProp name="HTTPSampler.protocol"></stringProp>

          <stringProp name="HTTPSampler.method">POST</stringProp>

          <stringProp name="HTTPSampler.contentEncoding"></stringProp>

          <stringProp name="HTTPSampler.path">/nuxeo/create_document.faces</stringProp>

          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>

          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>

          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>

          <boolProp name="HTTPSampler.DO_MULTIPART_POST">true</boolProp>

          <stringProp name="HTTPSampler.mimetype"></stringProp>

          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>

          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>

          <stringProp name="HTTPSampler.monitor">false</stringProp>

          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>

        </HTTPSampler>

 

3)       Third, I always have the same error on my application server, because the http request is not correct

 

2007-08-16 13:37:31,697 DEBUG [org.apache.catalina.connector.CoyoteAdapter]  Requested cookie session id is F258DD54B68CEE4BEAE6158D08E7567D

2007-08-16 13:37:31,699 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Filter start request processing at 8/16/07 1:37 PM  for uri: /nuxeo/create_document.faces

2007-08-16 13:37:31,699 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Incoming request has Content-Type header without character encoding: multipart/form-data; boundary=---------------------------7d159c1302d0y0

2007-08-16 13:37:31,699 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Filter request output to XML

2007-08-16 13:37:31,703 ERROR [STDERR] Aug 16, 2007 1:37:31 PM org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl beginRequest

SEVERE: null

java.io.IOException

        at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler.getNextPart(MultipartFormHandler.java:206)

        at org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl.beginRequest(FileUploadConfiguratorImpl.java:116)

        at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:445)

        at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:193)

 

 

Thanks for your help