You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Luca Maragnani <lu...@zeropiu.it> on 2007/06/11 12:25:32 UTC
SOAP and slow connection
Hi,
I need to test a SOAP application using SlowSocket to simulate real
users links.
So I modified jmeter.properties to use HTTPSampler2 and setted the cps
property.
Last, to get it work I had to overwrite in a custom library
SlowHttpClientSocketFactory because the createSocket method returned
always a null value.
public Socket createSocket(String arg0, int arg1, InetAddress arg2,
int arg3, HttpConnectionParams arg4)
throws IOException, UnknownHostException,
ConnectTimeoutException {
return new
SlowSocket(JMeterUtils.getPropDefault("httpclient.socket.http.cps",
0),arg0,arg1);
}
That's not really the best solution... but works better than a null
socket :)
Is there a nicer way to get slow connection simulation working with the
SOAP Sampler (and maybe other samplers...)?
Thank you in advance.
Luca
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: SOAP and slow connection
Posted by sebb <se...@gmail.com>.
Thanks.
Tried a test - HTTPSampler2 also fails if the slow socket is enabled,
so obviously the unimplemented method is now needed.
I've added the missing code in SVN r546346; this will be in a nightly
build shortly.
Thanks for reporting the problem - no need to file a Bugzilla report now.
I still need to fix the HTTPS version (not sure that ever can have worked).
S.
On 11/06/07, Luca Maragnani <lu...@zeropiu.it> wrote:
> Quoting sebb <se...@gmail.com>:
>
> > Are you using SOAP/XML-RPC or WebService (SOAP) ?
>
> I'm using SOAP/XML-RPC.
>
> Luca
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: SOAP and slow connection
Posted by Luca Maragnani <lu...@zeropiu.it>.
Quoting sebb <se...@gmail.com>:
> Are you using SOAP/XML-RPC or WebService (SOAP) ?
I'm using SOAP/XML-RPC.
Luca
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: SOAP and slow connection
Posted by sebb <se...@gmail.com>.
On 11/06/07, Luca Maragnani <lu...@zeropiu.it> wrote:
> Thank you Sebb.
>
> sebb wrote:
> > Which version of JMeter are you using?
> >
> > Which SOAP sampler are you using?
Are you using SOAP/XML-RPC or WebService (SOAP) ?
> >
> I'm using version 2.2 from stable downloads (for both SOAP Sampler and
> SlowHttpClientSocketFactory).
> >> Last, to get it work I had to overwrite in a custom library
> >> SlowHttpClientSocketFactory because the createSocket method returned
> >> always a null value.
> >
> > Yes - I did not bother implementing the method, as it was not needed
> > for HTTPSampler2, but it should really have have thrown a NotSupported
> > exception...
> >
> I tried to find in trunk repository
The trunk is old; the current code is in branches/rel-2-2.
> org.apache.jmeter.protocol.http.util.SlowHttpClientSocketFactory but
> it's no longer there. Documentation tell nothing about
> any exception in createSocket
> (http://jakarta.apache.org/jmeter/api/org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.html),
> so I think it lacks at least in version 2.2.
I meant that the method should have thrown an Exception instead of
returning null.
> >> Is there a nicer way to get slow connection simulation working with the
> >> SOAP Sampler
> >
> > Not sure what you mean by nicer - if the null method is fixed, does
> > the SOAP sampler work OK?
> >
>
> I mean that the code I wrote in previuos post is the quickest dirty
> solution. Accessing cps configuration for http exclude the https setting
> and even trying to understand setting from port is not correct... so I
> think other parameters are needed. Last but not least, this code does
> not honour the HttpConnectionParameters.
OK, understood.
> I confirm that if the null method is fixed, SOAP Sampler works with slow
> socket.
But which SOAP Sampler ... (see above)
> Luca
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: SOAP and slow connection
Posted by Luca Maragnani <lu...@zeropiu.it>.
Thank you Sebb.
sebb wrote:
> Which version of JMeter are you using?
>
> Which SOAP sampler are you using?
>
I'm using version 2.2 from stable downloads (for both SOAP Sampler and
SlowHttpClientSocketFactory).
>> Last, to get it work I had to overwrite in a custom library
>> SlowHttpClientSocketFactory because the createSocket method returned
>> always a null value.
>
> Yes - I did not bother implementing the method, as it was not needed
> for HTTPSampler2, but it should really have have thrown a NotSupported
> exception...
>
I tried to find in trunk repository
org.apache.jmeter.protocol.http.util.SlowHttpClientSocketFactory but
it's no longer there. Documentation tell nothing about
any exception in createSocket
(http://jakarta.apache.org/jmeter/api/org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.html),
so I think it lacks at least in version 2.2.
>> Is there a nicer way to get slow connection simulation working with the
>> SOAP Sampler
>
> Not sure what you mean by nicer - if the null method is fixed, does
> the SOAP sampler work OK?
>
I mean that the code I wrote in previuos post is the quickest dirty
solution. Accessing cps configuration for http exclude the https setting
and even trying to understand setting from port is not correct... so I
think other parameters are needed. Last but not least, this code does
not honour the HttpConnectionParameters.
I confirm that if the null method is fixed, SOAP Sampler works with slow
socket.
Luca
Re: SOAP and slow connection
Posted by sebb <se...@gmail.com>.
On 11/06/07, Luca Maragnani <lu...@zeropiu.it> wrote:
> Hi,
> I need to test a SOAP application using SlowSocket to simulate real
> users links.
Which version of JMeter are you using?
Which SOAP sampler are you using?
> So I modified jmeter.properties to use HTTPSampler2 and setted the cps
> property.
>
> Last, to get it work I had to overwrite in a custom library
> SlowHttpClientSocketFactory because the createSocket method returned
> always a null value.
Yes - I did not bother implementing the method, as it was not needed
for HTTPSampler2, but it should really have have thrown a NotSupported
exception...
> public Socket createSocket(String arg0, int arg1, InetAddress arg2,
> int arg3, HttpConnectionParams arg4)
> throws IOException, UnknownHostException,
> ConnectTimeoutException {
> return new
> SlowSocket(JMeterUtils.getPropDefault("httpclient.socket.http.cps",
> 0),arg0,arg1);
> }
>
> That's not really the best solution... but works better than a null
> socket :)
Please file a Buzgilla report so it does not get forgotten.
> Is there a nicer way to get slow connection simulation working with the
> SOAP Sampler
Not sure what you mean by nicer - if the null method is fixed, does
the SOAP sampler work OK?
Perhaps there should be a separate property for slow SOAP sockets.
And/or a GUI field for the CPS value on all the samplers that support it?
> (and maybe other samplers...)?
The SlowSocket feature can only work where it is possible to override
the SocketFactory - so it cannot work with the Java HTTP sampler - but
I guess it could be added to at least some other samplers.
Feel free to create a Buzilla enhancement request.
> Luca
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org