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 Two Hawk <th...@hotmail.com> on 2007/02/25 00:16:54 UTC

HTTP Proxy with XML-RPC

Hi

I have added some code to allow xml-rpc communication to be recorded 
correctly when using the http proxy. Would anyone be interested in adding 
this to the codebase? If yes, how do i proceed from here?

Best regards,
Jesper

_________________________________________________________________
Download din yndlingsmusik pĺ MSN Music:  http://www.msn.dk/music  - det er 
nemt og billigt


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


Re: HTTP Proxy with XML-RPC

Posted by sebb <se...@gmail.com>.
Thanks - I've added it to SVN

On 02/03/07, Jesper Thorhauge <jt...@gmail.com> wrote:
> Hi
>
> I have now tried to move the fix into HttpRequestHdr and make it
> non-xml-rpc strict. Postdata starting with "<?" is now treated as xml
> - simple, and a lot faster, no xml parsing/schema checking.
>
> In httpsamplerbase the only code needed is a wrapper method for adding
> the postdata nonencoded. It can also be used for other purposes.
>
> /Jesper
>
> On 2/27/07, sebb <se...@gmail.com> wrote:
> > OK, that looks better.
> >
> > But I'm still unsure as to why one would ever want to split XML data
> > into name/value pairs. Surely one cannot have a parameter name
> > starting with "<?xml " ?
> >
> > Also, it looks like parseArguments() was originally intended only for
> > use by the proxy, but is now also being used elsewhere.
> >
> > It seems to me that either the fix should be moved to the proxy code,
> > i.e. HttpRequestHdr, or there should be a wrapper function in
> > HTTPSamplerBase that is only used by the proxy routines (and this
> > should be documented).
> >
> > S.
> > On 27/02/07, Jesper Thorhauge <jt...@gmail.com> wrote:
> > > Ok, cleaned up version of HTTPSamplerBase is now in bugzilla. It is
> > > still validating the xml against the xml-rpc xsd, but let me know if
> > > you wan't me to change it into a "generalized" xml detection thing, ie
> > > isXmlData (or add this extra "option"). The code is modified according
> > > to your comments ...
> > >
> > > Let me know what you think.
> > >
> > > /Jesper
> > >
> > > On 2/27/07, sebb <se...@gmail.com> wrote:
> > > > New files can be provided as patches, but it is usually easier to
> > > > provide the source.
> > > >
> > > > Please ensure that you include the ASF license header; thanks.
> > > >
> > > > S.
> > > > On 27/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > > > Hi
> > > > >
> > > > > Thanks for your comments. My reason for validating the xml against the
> > > > > schema is only to be sure that it is an xml-rpc call and not just some xml
> > > > > being posted. The alternative is to call the feature isXmlData, not
> > > > > isXmlRpc, and then skip the parsing and schema checking?
> > > > >
> > > > > Also, i will fix my code according to your comments asap, and repost my
> > > > > files on bugzilla. A quick question regarding my bugzilla post; should new
> > > > > files (xml-rpc.xsd and XmlRpcErrorHandler.java) go as patches or ...?
> > > > >
> > > > > /Jesper
> > > > >
> > > > > >From: sebb <se...@gmail.com>
> > > > > >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > > >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > > >Subject: Re: HTTP Proxy with XML-RPC
> > > > > >Date: Mon, 26 Feb 2007 18:26:40 +0000
> > > > > >
> > > > > >Thanks.
> > > > > >
> > > > > >Just wondering why the query string needs to be compared against a schema?
> > > > > >
> > > > > >If the content starts with <?xml surely this means that the string
> > > > > >should not be parsed into name/value pairs?
> > > > > >
> > > > > >Or am I missing something here?
> > > > > >
> > > > > >Unless the DOM parsing is needed, it would obviously be a lot cheaper
> > > > > >to omit it.
> > > > > >
> > > > > >Some minor issues:
> > > > > >- unless the DOMParser is thread-safe, one cannot use a static copy.
> > > > > >- catch Exception is not a good idea; one should only catch expected errors
> > > > > >- should probably use log.warn rather than log.debug for logging the
> > > > > >exception.
> > > > > >
> > > > > >S.
> > > > > >On 26/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > > > >>Hi
> > > > > >>
> > > > > >>My code is now submitted to bugzilla as #41707. Looking forward to hear
> > > > > >>your
> > > > > >>reactions/comments ...
> > > > > >>
> > > > > >>/Jesper
> > > > > >>
> > > > > >> >From: sebb <se...@gmail.com>
> > > > > >> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > > >> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > > >> >Subject: Re: HTTP Proxy with XML-RPC
> > > > > >> >Date: Sun, 25 Feb 2007 18:36:14 +0000
> > > > > >> >
> > > > > >> >Thanks! Sounds useful.
> > > > > >> >
> > > > > >> >Please create a Bugzilla enhancement issue describing the code.
> > > > > >> >
> > > > > >> >You can then add any patches or new code as attachments to the issue.
> > > > > >> >
> > > > > >> >Please ensure that any patches are in unified diff format (as
> > > > > >> >generated by Eclipse), and are generated against branches/rel-2-2, not
> > > > > >> >the trunk, which is very out of date.
> > > > > >> >
> > > > > >> >On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > > > >> >>Hi
> > > > > >> >>
> > > > > >> >>I have added some code to allow xml-rpc communication to be recorded
> > > > > >> >>correctly when using the http proxy. Would anyone be interested in
> > > > > >>adding
> > > > > >> >>this to the codebase? If yes, how do i proceed from here?
> > > > > >> >>
> > > > > >> >>Best regards,
> > > > > >> >>Jesper
> > > > > >> >>
> > > > > >> >>_________________________________________________________________
> > > > > >> >>Download din yndlingsmusik på MSN Music:  http://www.msn.dk/music  -
> > > > > >>det
> > > > > >> >>er
> > > > > >> >>nemt og billigt
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>---------------------------------------------------------------------
> > > > > >> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > > >> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > > >> >>
> > > > > >> >>
> > > > > >> >
> > > > > >> >---------------------------------------------------------------------
> > > > > >> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > > >> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > > >> >
> > > > > >>
> > > > > >>_________________________________________________________________
> > > > > >>Ta' på udsalg året rundt på MSN Shopping:  http://shopping.msn.dk  - her
> > > > > >>finder du altid de bedste priser
> > > > > >>
> > > > > >>
> > > > > >>---------------------------------------------------------------------
> > > > > >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > > >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > > >>
> > > > > >>
> > > > > >
> > > > > >---------------------------------------------------------------------
> > > > > >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > > >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > > _________________________________________________________________
> > > > > Del dine store filer uden problemer på MSN Messenger:
> > > > > http://messenger.msn.dk/
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: HTTP Proxy with XML-RPC

Posted by Jesper Thorhauge <jt...@gmail.com>.
Hi

I have now tried to move the fix into HttpRequestHdr and make it
non-xml-rpc strict. Postdata starting with "<?" is now treated as xml
- simple, and a lot faster, no xml parsing/schema checking.

In httpsamplerbase the only code needed is a wrapper method for adding
the postdata nonencoded. It can also be used for other purposes.

/Jesper

On 2/27/07, sebb <se...@gmail.com> wrote:
> OK, that looks better.
>
> But I'm still unsure as to why one would ever want to split XML data
> into name/value pairs. Surely one cannot have a parameter name
> starting with "<?xml " ?
>
> Also, it looks like parseArguments() was originally intended only for
> use by the proxy, but is now also being used elsewhere.
>
> It seems to me that either the fix should be moved to the proxy code,
> i.e. HttpRequestHdr, or there should be a wrapper function in
> HTTPSamplerBase that is only used by the proxy routines (and this
> should be documented).
>
> S.
> On 27/02/07, Jesper Thorhauge <jt...@gmail.com> wrote:
> > Ok, cleaned up version of HTTPSamplerBase is now in bugzilla. It is
> > still validating the xml against the xml-rpc xsd, but let me know if
> > you wan't me to change it into a "generalized" xml detection thing, ie
> > isXmlData (or add this extra "option"). The code is modified according
> > to your comments ...
> >
> > Let me know what you think.
> >
> > /Jesper
> >
> > On 2/27/07, sebb <se...@gmail.com> wrote:
> > > New files can be provided as patches, but it is usually easier to
> > > provide the source.
> > >
> > > Please ensure that you include the ASF license header; thanks.
> > >
> > > S.
> > > On 27/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > > Hi
> > > >
> > > > Thanks for your comments. My reason for validating the xml against the
> > > > schema is only to be sure that it is an xml-rpc call and not just some xml
> > > > being posted. The alternative is to call the feature isXmlData, not
> > > > isXmlRpc, and then skip the parsing and schema checking?
> > > >
> > > > Also, i will fix my code according to your comments asap, and repost my
> > > > files on bugzilla. A quick question regarding my bugzilla post; should new
> > > > files (xml-rpc.xsd and XmlRpcErrorHandler.java) go as patches or ...?
> > > >
> > > > /Jesper
> > > >
> > > > >From: sebb <se...@gmail.com>
> > > > >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > >Subject: Re: HTTP Proxy with XML-RPC
> > > > >Date: Mon, 26 Feb 2007 18:26:40 +0000
> > > > >
> > > > >Thanks.
> > > > >
> > > > >Just wondering why the query string needs to be compared against a schema?
> > > > >
> > > > >If the content starts with <?xml surely this means that the string
> > > > >should not be parsed into name/value pairs?
> > > > >
> > > > >Or am I missing something here?
> > > > >
> > > > >Unless the DOM parsing is needed, it would obviously be a lot cheaper
> > > > >to omit it.
> > > > >
> > > > >Some minor issues:
> > > > >- unless the DOMParser is thread-safe, one cannot use a static copy.
> > > > >- catch Exception is not a good idea; one should only catch expected errors
> > > > >- should probably use log.warn rather than log.debug for logging the
> > > > >exception.
> > > > >
> > > > >S.
> > > > >On 26/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > > >>Hi
> > > > >>
> > > > >>My code is now submitted to bugzilla as #41707. Looking forward to hear
> > > > >>your
> > > > >>reactions/comments ...
> > > > >>
> > > > >>/Jesper
> > > > >>
> > > > >> >From: sebb <se...@gmail.com>
> > > > >> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > >> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > > >> >Subject: Re: HTTP Proxy with XML-RPC
> > > > >> >Date: Sun, 25 Feb 2007 18:36:14 +0000
> > > > >> >
> > > > >> >Thanks! Sounds useful.
> > > > >> >
> > > > >> >Please create a Bugzilla enhancement issue describing the code.
> > > > >> >
> > > > >> >You can then add any patches or new code as attachments to the issue.
> > > > >> >
> > > > >> >Please ensure that any patches are in unified diff format (as
> > > > >> >generated by Eclipse), and are generated against branches/rel-2-2, not
> > > > >> >the trunk, which is very out of date.
> > > > >> >
> > > > >> >On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > > >> >>Hi
> > > > >> >>
> > > > >> >>I have added some code to allow xml-rpc communication to be recorded
> > > > >> >>correctly when using the http proxy. Would anyone be interested in
> > > > >>adding
> > > > >> >>this to the codebase? If yes, how do i proceed from here?
> > > > >> >>
> > > > >> >>Best regards,
> > > > >> >>Jesper
> > > > >> >>
> > > > >> >>_________________________________________________________________
> > > > >> >>Download din yndlingsmusik på MSN Music:  http://www.msn.dk/music  -
> > > > >>det
> > > > >> >>er
> > > > >> >>nemt og billigt
> > > > >> >>
> > > > >> >>
> > > > >> >>---------------------------------------------------------------------
> > > > >> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > >> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > >> >>
> > > > >> >>
> > > > >> >
> > > > >> >---------------------------------------------------------------------
> > > > >> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > >> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > >> >
> > > > >>
> > > > >>_________________________________________________________________
> > > > >>Ta' på udsalg året rundt på MSN Shopping:  http://shopping.msn.dk  - her
> > > > >>finder du altid de bedste priser
> > > > >>
> > > > >>
> > > > >>---------------------------------------------------------------------
> > > > >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >---------------------------------------------------------------------
> > > > >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > > >
> > > >
> > > > _________________________________________________________________
> > > > Del dine store filer uden problemer på MSN Messenger:
> > > > http://messenger.msn.dk/
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: HTTP Proxy with XML-RPC

Posted by sebb <se...@gmail.com>.
OK, that looks better.

But I'm still unsure as to why one would ever want to split XML data
into name/value pairs. Surely one cannot have a parameter name
starting with "<?xml " ?

Also, it looks like parseArguments() was originally intended only for
use by the proxy, but is now also being used elsewhere.

It seems to me that either the fix should be moved to the proxy code,
i.e. HttpRequestHdr, or there should be a wrapper function in
HTTPSamplerBase that is only used by the proxy routines (and this
should be documented).

S.
On 27/02/07, Jesper Thorhauge <jt...@gmail.com> wrote:
> Ok, cleaned up version of HTTPSamplerBase is now in bugzilla. It is
> still validating the xml against the xml-rpc xsd, but let me know if
> you wan't me to change it into a "generalized" xml detection thing, ie
> isXmlData (or add this extra "option"). The code is modified according
> to your comments ...
>
> Let me know what you think.
>
> /Jesper
>
> On 2/27/07, sebb <se...@gmail.com> wrote:
> > New files can be provided as patches, but it is usually easier to
> > provide the source.
> >
> > Please ensure that you include the ASF license header; thanks.
> >
> > S.
> > On 27/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > Hi
> > >
> > > Thanks for your comments. My reason for validating the xml against the
> > > schema is only to be sure that it is an xml-rpc call and not just some xml
> > > being posted. The alternative is to call the feature isXmlData, not
> > > isXmlRpc, and then skip the parsing and schema checking?
> > >
> > > Also, i will fix my code according to your comments asap, and repost my
> > > files on bugzilla. A quick question regarding my bugzilla post; should new
> > > files (xml-rpc.xsd and XmlRpcErrorHandler.java) go as patches or ...?
> > >
> > > /Jesper
> > >
> > > >From: sebb <se...@gmail.com>
> > > >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > >Subject: Re: HTTP Proxy with XML-RPC
> > > >Date: Mon, 26 Feb 2007 18:26:40 +0000
> > > >
> > > >Thanks.
> > > >
> > > >Just wondering why the query string needs to be compared against a schema?
> > > >
> > > >If the content starts with <?xml surely this means that the string
> > > >should not be parsed into name/value pairs?
> > > >
> > > >Or am I missing something here?
> > > >
> > > >Unless the DOM parsing is needed, it would obviously be a lot cheaper
> > > >to omit it.
> > > >
> > > >Some minor issues:
> > > >- unless the DOMParser is thread-safe, one cannot use a static copy.
> > > >- catch Exception is not a good idea; one should only catch expected errors
> > > >- should probably use log.warn rather than log.debug for logging the
> > > >exception.
> > > >
> > > >S.
> > > >On 26/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > >>Hi
> > > >>
> > > >>My code is now submitted to bugzilla as #41707. Looking forward to hear
> > > >>your
> > > >>reactions/comments ...
> > > >>
> > > >>/Jesper
> > > >>
> > > >> >From: sebb <se...@gmail.com>
> > > >> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > >> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > > >> >Subject: Re: HTTP Proxy with XML-RPC
> > > >> >Date: Sun, 25 Feb 2007 18:36:14 +0000
> > > >> >
> > > >> >Thanks! Sounds useful.
> > > >> >
> > > >> >Please create a Bugzilla enhancement issue describing the code.
> > > >> >
> > > >> >You can then add any patches or new code as attachments to the issue.
> > > >> >
> > > >> >Please ensure that any patches are in unified diff format (as
> > > >> >generated by Eclipse), and are generated against branches/rel-2-2, not
> > > >> >the trunk, which is very out of date.
> > > >> >
> > > >> >On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
> > > >> >>Hi
> > > >> >>
> > > >> >>I have added some code to allow xml-rpc communication to be recorded
> > > >> >>correctly when using the http proxy. Would anyone be interested in
> > > >>adding
> > > >> >>this to the codebase? If yes, how do i proceed from here?
> > > >> >>
> > > >> >>Best regards,
> > > >> >>Jesper
> > > >> >>
> > > >> >>_________________________________________________________________
> > > >> >>Download din yndlingsmusik på MSN Music:  http://www.msn.dk/music  -
> > > >>det
> > > >> >>er
> > > >> >>nemt og billigt
> > > >> >>
> > > >> >>
> > > >> >>---------------------------------------------------------------------
> > > >> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > >> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > >> >>
> > > >> >>
> > > >> >
> > > >> >---------------------------------------------------------------------
> > > >> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > >> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > >> >
> > > >>
> > > >>_________________________________________________________________
> > > >>Ta' på udsalg året rundt på MSN Shopping:  http://shopping.msn.dk  - her
> > > >>finder du altid de bedste priser
> > > >>
> > > >>
> > > >>---------------------------------------------------------------------
> > > >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > >>
> > > >>
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > > >
> > >
> > > _________________________________________________________________
> > > Del dine store filer uden problemer på MSN Messenger:
> > > http://messenger.msn.dk/
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: HTTP Proxy with XML-RPC

Posted by Jesper Thorhauge <jt...@gmail.com>.
Ok, cleaned up version of HTTPSamplerBase is now in bugzilla. It is
still validating the xml against the xml-rpc xsd, but let me know if
you wan't me to change it into a "generalized" xml detection thing, ie
isXmlData (or add this extra "option"). The code is modified according
to your comments ...

Let me know what you think.

/Jesper

On 2/27/07, sebb <se...@gmail.com> wrote:
> New files can be provided as patches, but it is usually easier to
> provide the source.
>
> Please ensure that you include the ASF license header; thanks.
>
> S.
> On 27/02/07, Two Hawk <th...@hotmail.com> wrote:
> > Hi
> >
> > Thanks for your comments. My reason for validating the xml against the
> > schema is only to be sure that it is an xml-rpc call and not just some xml
> > being posted. The alternative is to call the feature isXmlData, not
> > isXmlRpc, and then skip the parsing and schema checking?
> >
> > Also, i will fix my code according to your comments asap, and repost my
> > files on bugzilla. A quick question regarding my bugzilla post; should new
> > files (xml-rpc.xsd and XmlRpcErrorHandler.java) go as patches or ...?
> >
> > /Jesper
> >
> > >From: sebb <se...@gmail.com>
> > >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > >Subject: Re: HTTP Proxy with XML-RPC
> > >Date: Mon, 26 Feb 2007 18:26:40 +0000
> > >
> > >Thanks.
> > >
> > >Just wondering why the query string needs to be compared against a schema?
> > >
> > >If the content starts with <?xml surely this means that the string
> > >should not be parsed into name/value pairs?
> > >
> > >Or am I missing something here?
> > >
> > >Unless the DOM parsing is needed, it would obviously be a lot cheaper
> > >to omit it.
> > >
> > >Some minor issues:
> > >- unless the DOMParser is thread-safe, one cannot use a static copy.
> > >- catch Exception is not a good idea; one should only catch expected errors
> > >- should probably use log.warn rather than log.debug for logging the
> > >exception.
> > >
> > >S.
> > >On 26/02/07, Two Hawk <th...@hotmail.com> wrote:
> > >>Hi
> > >>
> > >>My code is now submitted to bugzilla as #41707. Looking forward to hear
> > >>your
> > >>reactions/comments ...
> > >>
> > >>/Jesper
> > >>
> > >> >From: sebb <se...@gmail.com>
> > >> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > >> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> > >> >Subject: Re: HTTP Proxy with XML-RPC
> > >> >Date: Sun, 25 Feb 2007 18:36:14 +0000
> > >> >
> > >> >Thanks! Sounds useful.
> > >> >
> > >> >Please create a Bugzilla enhancement issue describing the code.
> > >> >
> > >> >You can then add any patches or new code as attachments to the issue.
> > >> >
> > >> >Please ensure that any patches are in unified diff format (as
> > >> >generated by Eclipse), and are generated against branches/rel-2-2, not
> > >> >the trunk, which is very out of date.
> > >> >
> > >> >On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
> > >> >>Hi
> > >> >>
> > >> >>I have added some code to allow xml-rpc communication to be recorded
> > >> >>correctly when using the http proxy. Would anyone be interested in
> > >>adding
> > >> >>this to the codebase? If yes, how do i proceed from here?
> > >> >>
> > >> >>Best regards,
> > >> >>Jesper
> > >> >>
> > >> >>_________________________________________________________________
> > >> >>Download din yndlingsmusik på MSN Music:  http://www.msn.dk/music  -
> > >>det
> > >> >>er
> > >> >>nemt og billigt
> > >> >>
> > >> >>
> > >> >>---------------------------------------------------------------------
> > >> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > >> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > >> >>
> > >> >>
> > >> >
> > >> >---------------------------------------------------------------------
> > >> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > >> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > >> >
> > >>
> > >>_________________________________________________________________
> > >>Ta' på udsalg året rundt på MSN Shopping:  http://shopping.msn.dk  - her
> > >>finder du altid de bedste priser
> > >>
> > >>
> > >>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > >>
> > >>
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> > >
> >
> > _________________________________________________________________
> > Del dine store filer uden problemer på MSN Messenger:
> > http://messenger.msn.dk/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: HTTP Proxy with XML-RPC

Posted by sebb <se...@gmail.com>.
New files can be provided as patches, but it is usually easier to
provide the source.

Please ensure that you include the ASF license header; thanks.

S.
On 27/02/07, Two Hawk <th...@hotmail.com> wrote:
> Hi
>
> Thanks for your comments. My reason for validating the xml against the
> schema is only to be sure that it is an xml-rpc call and not just some xml
> being posted. The alternative is to call the feature isXmlData, not
> isXmlRpc, and then skip the parsing and schema checking?
>
> Also, i will fix my code according to your comments asap, and repost my
> files on bugzilla. A quick question regarding my bugzilla post; should new
> files (xml-rpc.xsd and XmlRpcErrorHandler.java) go as patches or ...?
>
> /Jesper
>
> >From: sebb <se...@gmail.com>
> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> >Subject: Re: HTTP Proxy with XML-RPC
> >Date: Mon, 26 Feb 2007 18:26:40 +0000
> >
> >Thanks.
> >
> >Just wondering why the query string needs to be compared against a schema?
> >
> >If the content starts with <?xml surely this means that the string
> >should not be parsed into name/value pairs?
> >
> >Or am I missing something here?
> >
> >Unless the DOM parsing is needed, it would obviously be a lot cheaper
> >to omit it.
> >
> >Some minor issues:
> >- unless the DOMParser is thread-safe, one cannot use a static copy.
> >- catch Exception is not a good idea; one should only catch expected errors
> >- should probably use log.warn rather than log.debug for logging the
> >exception.
> >
> >S.
> >On 26/02/07, Two Hawk <th...@hotmail.com> wrote:
> >>Hi
> >>
> >>My code is now submitted to bugzilla as #41707. Looking forward to hear
> >>your
> >>reactions/comments ...
> >>
> >>/Jesper
> >>
> >> >From: sebb <se...@gmail.com>
> >> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> >> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> >> >Subject: Re: HTTP Proxy with XML-RPC
> >> >Date: Sun, 25 Feb 2007 18:36:14 +0000
> >> >
> >> >Thanks! Sounds useful.
> >> >
> >> >Please create a Bugzilla enhancement issue describing the code.
> >> >
> >> >You can then add any patches or new code as attachments to the issue.
> >> >
> >> >Please ensure that any patches are in unified diff format (as
> >> >generated by Eclipse), and are generated against branches/rel-2-2, not
> >> >the trunk, which is very out of date.
> >> >
> >> >On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
> >> >>Hi
> >> >>
> >> >>I have added some code to allow xml-rpc communication to be recorded
> >> >>correctly when using the http proxy. Would anyone be interested in
> >>adding
> >> >>this to the codebase? If yes, how do i proceed from here?
> >> >>
> >> >>Best regards,
> >> >>Jesper
> >> >>
> >> >>_________________________________________________________________
> >> >>Download din yndlingsmusik på MSN Music:  http://www.msn.dk/music  -
> >>det
> >> >>er
> >> >>nemt og billigt
> >> >>
> >> >>
> >> >>---------------------------------------------------------------------
> >> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> >> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >> >>
> >> >>
> >> >
> >> >---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> >> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >> >
> >>
> >>_________________________________________________________________
> >>Ta' på udsalg året rundt på MSN Shopping:  http://shopping.msn.dk  - her
> >>finder du altid de bedste priser
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >
>
> _________________________________________________________________
> Del dine store filer uden problemer på MSN Messenger:
> http://messenger.msn.dk/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: HTTP Proxy with XML-RPC

Posted by Two Hawk <th...@hotmail.com>.
Hi

Thanks for your comments. My reason for validating the xml against the 
schema is only to be sure that it is an xml-rpc call and not just some xml 
being posted. The alternative is to call the feature isXmlData, not 
isXmlRpc, and then skip the parsing and schema checking?

Also, i will fix my code according to your comments asap, and repost my 
files on bugzilla. A quick question regarding my bugzilla post; should new 
files (xml-rpc.xsd and XmlRpcErrorHandler.java) go as patches or ...?

/Jesper

>From: sebb <se...@gmail.com>
>Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
>To: "JMeter Developers List" <jm...@jakarta.apache.org>
>Subject: Re: HTTP Proxy with XML-RPC
>Date: Mon, 26 Feb 2007 18:26:40 +0000
>
>Thanks.
>
>Just wondering why the query string needs to be compared against a schema?
>
>If the content starts with <?xml surely this means that the string
>should not be parsed into name/value pairs?
>
>Or am I missing something here?
>
>Unless the DOM parsing is needed, it would obviously be a lot cheaper
>to omit it.
>
>Some minor issues:
>- unless the DOMParser is thread-safe, one cannot use a static copy.
>- catch Exception is not a good idea; one should only catch expected errors
>- should probably use log.warn rather than log.debug for logging the 
>exception.
>
>S.
>On 26/02/07, Two Hawk <th...@hotmail.com> wrote:
>>Hi
>>
>>My code is now submitted to bugzilla as #41707. Looking forward to hear 
>>your
>>reactions/comments ...
>>
>>/Jesper
>>
>> >From: sebb <se...@gmail.com>
>> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
>> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
>> >Subject: Re: HTTP Proxy with XML-RPC
>> >Date: Sun, 25 Feb 2007 18:36:14 +0000
>> >
>> >Thanks! Sounds useful.
>> >
>> >Please create a Bugzilla enhancement issue describing the code.
>> >
>> >You can then add any patches or new code as attachments to the issue.
>> >
>> >Please ensure that any patches are in unified diff format (as
>> >generated by Eclipse), and are generated against branches/rel-2-2, not
>> >the trunk, which is very out of date.
>> >
>> >On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
>> >>Hi
>> >>
>> >>I have added some code to allow xml-rpc communication to be recorded
>> >>correctly when using the http proxy. Would anyone be interested in 
>>adding
>> >>this to the codebase? If yes, how do i proceed from here?
>> >>
>> >>Best regards,
>> >>Jesper
>> >>
>> >>_________________________________________________________________
>> >>Download din yndlingsmusik pĺ MSN Music:  http://www.msn.dk/music  - 
>>det
>> >>er
>> >>nemt og billigt
>> >>
>> >>
>> >>---------------------------------------------------------------------
>> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
>> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>> >>
>> >>
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
>> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>> >
>>
>>_________________________________________________________________
>>Ta' pĺ udsalg ĺret rundt pĺ MSN Shopping:  http://shopping.msn.dk  - her
>>finder du altid de bedste priser
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>

_________________________________________________________________
Del dine store filer uden problemer pĺ MSN Messenger:  
http://messenger.msn.dk/


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


Re: HTTP Proxy with XML-RPC

Posted by sebb <se...@gmail.com>.
Thanks.

Just wondering why the query string needs to be compared against a schema?

If the content starts with <?xml surely this means that the string
should not be parsed into name/value pairs?

Or am I missing something here?

Unless the DOM parsing is needed, it would obviously be a lot cheaper
to omit it.

Some minor issues:
- unless the DOMParser is thread-safe, one cannot use a static copy.
- catch Exception is not a good idea; one should only catch expected errors
- should probably use log.warn rather than log.debug for logging the exception.

S.
On 26/02/07, Two Hawk <th...@hotmail.com> wrote:
> Hi
>
> My code is now submitted to bugzilla as #41707. Looking forward to hear your
> reactions/comments ...
>
> /Jesper
>
> >From: sebb <se...@gmail.com>
> >Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
> >To: "JMeter Developers List" <jm...@jakarta.apache.org>
> >Subject: Re: HTTP Proxy with XML-RPC
> >Date: Sun, 25 Feb 2007 18:36:14 +0000
> >
> >Thanks! Sounds useful.
> >
> >Please create a Bugzilla enhancement issue describing the code.
> >
> >You can then add any patches or new code as attachments to the issue.
> >
> >Please ensure that any patches are in unified diff format (as
> >generated by Eclipse), and are generated against branches/rel-2-2, not
> >the trunk, which is very out of date.
> >
> >On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
> >>Hi
> >>
> >>I have added some code to allow xml-rpc communication to be recorded
> >>correctly when using the http proxy. Would anyone be interested in adding
> >>this to the codebase? If yes, how do i proceed from here?
> >>
> >>Best regards,
> >>Jesper
> >>
> >>_________________________________________________________________
> >>Download din yndlingsmusik på MSN Music:  http://www.msn.dk/music  - det
> >>er
> >>nemt og billigt
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
> >
>
> _________________________________________________________________
> Ta' på udsalg året rundt på MSN Shopping:  http://shopping.msn.dk  - her
> finder du altid de bedste priser
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: HTTP Proxy with XML-RPC

Posted by Two Hawk <th...@hotmail.com>.
Hi

My code is now submitted to bugzilla as #41707. Looking forward to hear your 
reactions/comments ...

/Jesper

>From: sebb <se...@gmail.com>
>Reply-To: "JMeter Developers List" <jm...@jakarta.apache.org>
>To: "JMeter Developers List" <jm...@jakarta.apache.org>
>Subject: Re: HTTP Proxy with XML-RPC
>Date: Sun, 25 Feb 2007 18:36:14 +0000
>
>Thanks! Sounds useful.
>
>Please create a Bugzilla enhancement issue describing the code.
>
>You can then add any patches or new code as attachments to the issue.
>
>Please ensure that any patches are in unified diff format (as
>generated by Eclipse), and are generated against branches/rel-2-2, not
>the trunk, which is very out of date.
>
>On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
>>Hi
>>
>>I have added some code to allow xml-rpc communication to be recorded
>>correctly when using the http proxy. Would anyone be interested in adding
>>this to the codebase? If yes, how do i proceed from here?
>>
>>Best regards,
>>Jesper
>>
>>_________________________________________________________________
>>Download din yndlingsmusik pĺ MSN Music:  http://www.msn.dk/music  - det 
>>er
>>nemt og billigt
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>

_________________________________________________________________
Ta' pĺ udsalg ĺret rundt pĺ MSN Shopping:  http://shopping.msn.dk  - her 
finder du altid de bedste priser


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


Re: HTTP Proxy with XML-RPC

Posted by sebb <se...@gmail.com>.
Thanks! Sounds useful.

Please create a Bugzilla enhancement issue describing the code.

You can then add any patches or new code as attachments to the issue.

Please ensure that any patches are in unified diff format (as
generated by Eclipse), and are generated against branches/rel-2-2, not
the trunk, which is very out of date.

On 24/02/07, Two Hawk <th...@hotmail.com> wrote:
> Hi
>
> I have added some code to allow xml-rpc communication to be recorded
> correctly when using the http proxy. Would anyone be interested in adding
> this to the codebase? If yes, how do i proceed from here?
>
> Best regards,
> Jesper
>
> _________________________________________________________________
> Download din yndlingsmusik på MSN Music:  http://www.msn.dk/music  - det er
> nemt og billigt
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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