responding with more information... here's what i jmeter records when
i submit some simple xml data.  note that all the data is in the
Argument.name field.

          <HTTPSampler>
            <stringProp name="HTTPSampler.path">/ds/MyServlet</stringProp>
            <stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.http.sampler.HTTPSampler</stringProp>
            <stringProp name="HTTPSampler.method">POST</stringProp>
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
            <stringProp name="HTTPSampler.protocol">http</stringProp>
            <boolProp name="TestElement.enabled">true</boolProp>
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
            <stringProp name="HTTPSampler.port">8080</stringProp>
            <elementProp name="HTTPsampler.Arguments"
elementType="org.apache.jmeter.config.Arguments">
              <stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel</stringProp>
              <stringProp
name="TestElement.test_class">org.apache.jmeter.config.Arguments</stringProp>
              <collectionProp name="Arguments.arguments">
                <elementProp name=""
elementType="org.apache.jmeter.protocol.http.util.HTTPArgument">
                  <stringProp name="Argument.metadata"></stringProp>
                  <stringProp name="Argument.value"></stringProp>
                  <stringProp name="Argument.name">&lt;foo&gt;&#x0D;
 &lt;bar&gt;data here&lt;/bar&gt;&#x0D;
&lt;/foo&gt;</stringProp>
                  <boolProp name="HTTPArgument.always_encode">true</boolProp>
                </elementProp>
              </collectionProp>
              <stringProp name="TestElement.name"></stringProp>
              <boolProp name="TestElement.enabled">true</boolProp>
            </elementProp>
            <stringProp name="HTTPSampler.mimetype"></stringProp>
            <stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui</stringProp>
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
            <stringProp
name="TestElement.name">/ds/DestinationStation</stringProp>
            <stringProp name="HTTPSampler.monitor">false</stringProp>
            <stringProp name="HTTPSampler.domain">localhost</stringProp>
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          </HTTPSampler>

now, if i modify the xml slightly such that there's an attribute in
the xml, here's what is recorded (note the name/value fields):

          <HTTPSampler>
            <stringProp name="HTTPSampler.path">/ds/MyServlet</stringProp>
            <stringProp
name="TestElement.test_class">org.apache.jmeter.protocol.http.sampler.HTTPSampler</stringProp>
            <stringProp name="HTTPSampler.method">POST</stringProp>
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
            <stringProp name="HTTPSampler.protocol">http</stringProp>
            <boolProp name="TestElement.enabled">true</boolProp>
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
            <stringProp name="HTTPSampler.port">8080</stringProp>
            <elementProp name="HTTPsampler.Arguments"
elementType="org.apache.jmeter.config.Arguments">
              <stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel</stringProp>
              <stringProp
name="TestElement.test_class">org.apache.jmeter.config.Arguments</stringProp>
              <collectionProp name="Arguments.arguments">
                <elementProp name=""
elementType="org.apache.jmeter.protocol.http.util.HTTPArgument">
                  <stringProp name="Argument.metadata">=</stringProp>
                  <stringProp
name="Argument.value">&quot;blah&quot;&gt;data here&lt;/bar&gt;&#x0D;
&lt;/foo&gt;</stringProp>
                  <stringProp name="Argument.name">&lt;foo&gt;&#x0D;
 &lt;bar id</stringProp>
                  <boolProp name="HTTPArgument.always_encode">true</boolProp>
                </elementProp>
              </collectionProp>
              <stringProp name="TestElement.name"></stringProp>
              <boolProp name="TestElement.enabled">true</boolProp>
            </elementProp>
            <stringProp name="HTTPSampler.mimetype"></stringProp>
            <stringProp
name="TestElement.gui_class">org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui</stringProp>
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
            <stringProp
name="TestElement.name">/ds/DestinationStation</stringProp>
            <stringProp name="HTTPSampler.monitor">false</stringProp>
            <stringProp name="HTTPSampler.domain">localhost</stringProp>
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          </HTTPSampler>

i'm not quite sure what the difference is, but neither seems to post
the xml data properly.  when i setup a simple soap/XML-rpc request,
with the xml data and the url, it seems to post the data ok. i haven't
had a chance to put together a sharable test case for this issue.

On 11/29/05, Mark Lybarger <[EMAIL PROTECTED]> wrote:
> i have a simple application that submits xml data from the browser to
> a servlet.  the xml data is recieved as the payload.  when recording
> via jmeter, if there's an XML declaration in the xml being sent :
> <?xml version="1.0" encoding="UTF-8" ?>,
> then jmeter gives the following in the jmx:
>
>                   <stringProp name="Argument.name">&lt;?xml
> version</stringProp>
>
> the rest of the data is in the value
>
> <stringProp name="Argument.value">&quot;1.0&quot;
> encoding=&quot;UTF-8&quot; ?&gt;
> ... continued with actual xml data...
>
> if i remove the xml declaration at the top, then, the data is all part
> of the name parameter, at least according to the gui.  by the way, my
> xml data contains no = symbols, as there are no attributes in the xml.
>
> i'm still working with this, my goal is to post xml data as the
> payload to a URL via jmeter. any insights would be most appreciated.
>
> ~mark
>
>
> On 11/12/05, sebb <[EMAIL PROTECTED]> wrote:
> > On 12/11/05, Carsten Sensler <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > >
> > >
> > > can I record and test XMLHTTPRequests like AJAX-based websites?
> >
> > Why not try it?
> >
> > >
> > >
> > > How can i implement a XMLHTTPRequest, if no solution exists?
> > >
> >
> > Isn't XML HTTP just an HTTP request with an XML payload?
> >
> > In which case, it should just work as normal - if it does not work,
> > raise a Bug ...
> >
> > S.
> >
> > ---------------------------------------------------------------------
> > 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