You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Martin Ramshaw <mr...@yahoo.ca> on 2003/12/05 22:23:00 UTC

Re: I have updates to handle XMLHTTP from MS ActiveX control, but not sure if anyone is interested.

 --- "Chenis, Kenneth (Temporary)"
<ke...@McKesson.com> wrote: 

> I have been trying to use JMeter Proxy to capture,
> and enable the test of an
> application that makes use of MS XMLHTTP ActiveX
> object. This object runs in
> client-side JavaScript to send XML Posts to the
> server, and collect XML
> replies in real-time, then it uses DHTML to
> re-render the client based on
> the response.
> 
> The post to the server gets mangled by the JMeter
> proxy as it tries to
> interpret the inbound data as name/value pairs -
> This wreaks havoc with
> parameterized XML communications, and the body of
> the post basically ends up
> getting lost.  The server under test ends up getting
> a bunch of parameters
> it doesn't know what to do with, and no body
> (Servlet InputStream content)
> to parse into an XML stream.
> 
> In any case - I have modified HTTPSampler,
> PostWriter, and HTTPArgument -
> now when the XMLHTTP control posts XML data to the
> proxy, it gets stored in
> a special request parameter called "XMLHTTP" with
> native XML enclosed (no
> encoding, no parameter parsing).  Playback does the
> same thing - if it
> encounters an "XMLHTTP" argument, it just opens the
> output stream, and sends
> it verbatim.  (I am simply checking the content, and
> if it starts with "<"
> and ends with ">" I make an assumption (possibly
> poor, but safe I think)
> that it is an XML post - I could not identify a
> better way to tell as the MS
> XML control just sends the XML data on the stream
> with no other auxiliary
> info.
> 
> The work-around is not perfect, but it seems to work
> for my purpose.
> 
> Is this of any interest to anyone else?  I would be
> happy to provide the
> patch files, or send the sources or what ever.  I
> built it off of the latest
> CVS drop using Eclipse, but I have not updated from
> CVS for a few days while
> I have been working on this.  
> 
> I know there is other SOAP/XML working going on, and
> I'm not sure how that
> relates to this - particularly because I addressed
> this on the HTTP Request
> side for general proxy use as opposed to trying to
> recognizing these inbound
> posts as some form of SOAP/XML request, and
> intertwining those with the HTTP
> Request in the recorder.  In other words, if I went
> down the wrong path
> here, let me know, and I'll try to fix it up if you
> want - it is possible
> I'm not the only one forced to use the MS XML
> Control on the client side so
> there could be others that would benefit from this. 
> Basically, this is
> something I really needed to be able to stress test
> in my current job, and I
> couldn't find any way to capture/emulate the
> conversations with JMeter as it
> stands - of course that could also be my own
> inexperience with JMeter as I
> have just started using it (convert from OpenSTA).
> 
> Let me know if you want any of this or not ... and
> thanks for working on and
> supporting what looks like a great open source tool
> - I hope my contribution
> (if you want it) will be helpful to someone else.

Based on my quick reading of your post, it all seems
to make sense. My suggestion to you would be to log
a bug report against JMeter (mark the bug as an
Enhancement) and then you can post your patch to
that bug report (this way your code is always there
for someone else to use at a later date).

Because it is logged there, you can be reasonably
certain that someone will look at it sooner or later.

Say hi to Ellen Hosier for me ;^}

    Regards

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

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