Discussion:
Trouble sending HTTP request with POST variable
gau12
2012-11-20 10:37:45 UTC
Permalink
Hello,

I am trying to load test a java servlet that fetches records from an archive
database.

The servlet works as follows:

1-Reads in post variables from HTTP header
2-Uses variables to query database
3-Returns XML


I have setup a test which I want to fire off HTTP requests with post
variables however the test is not working, getting errors with J Meter.

*Screenshot 1 - Shows the structure of the test*

<Loading Image...>

*Screenshot 2 - Shows the CSV file I am reading from*

<Loading Image...>

I have placed the CSV file in the same folder that my test plan is saved in!

*Screenshot 3 - Shows the HTTP request *

<Loading Image...>



This is the error output:









Please help!

Thanks




--
View this message in context: http://jmeter.512774.n5.nabble.com/Trouble-sending-HTTP-request-with-POST-variable-tp5715355.html
Sent from the JMeter - User mailing list archive at Nabble.com.
b***@bt.com
2012-11-20 10:40:44 UTC
Permalink
Hello,

I am trying to load test a java servlet that fetches records from an archive database.

The servlet works as follows:

1-Reads in post variables from HTTP header
2-Uses variables to query database
3-Returns XML


I have setup a test which I want to fire off HTTP requests with post variables however the test is not working, getting errors with J Meter.

Screenshot 1 - Shows the structure of the test

[cid:***@01CDC70B.7B16EC80]

Screenshot 2 - Shows the CSV file I am reading from

[cid:***@01CDC70B.7B16EC80]

I have placed the CSV file in the same folder that my test plan is saved in!

Screenshot 3 - Shows the HTTP request

[cid:***@01CDC70B.7B16EC80]



This is the error output:
Thread Name: Thread Group 1-1
Sample Start: 2012-11-20 10:35:27 GMT
Load time: 0
Latency: 0
Size in bytes: 1113
Headers size in bytes: 0
Body size in bytes: 1113
Sample Count: 1
Error Count: 1
Response code: Non HTTP response code: java.net.URISyntaxException
Response message: Non HTTP response message: Expected closing bracket for IPv6 address at index 13: http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/

Response headers:


HTTPSampleResult fields:
ContentType:
DataEncoding: null


POST Request

POST http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/

POST data:


[no cookies]

Response DATA
java.net.URISyntaxException: Expected closing bracket for IPv6 address at index 13: http://[http://sophos1.testserver.co.uk/servlet/archive]:61061/
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.failExpecting(Unknown Source)
at java.net.URI$Parser.parseServer(Unknown Source)
at java.net.URI$Parser.parseAuthority(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at java.net.URL.toURI(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:232)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
at java.lang.Thread.run(Unknown Source)











Please help!

Thanks
sebb
2012-11-20 11:19:12 UTC
Permalink
Post by gau12
Hello,
I am trying to load test a java servlet that fetches records from an archive
database.
1-Reads in post variables from HTTP header
2-Uses variables to query database
3-Returns XML
I have setup a test which I want to fire off HTTP requests with post
variables however the test is not working, getting errors with J Meter.
*Screenshot 1 - Shows the structure of the test*
<http://jmeter.512774.n5.nabble.com/file/n5715355/s1.png>
*Screenshot 2 - Shows the CSV file I am reading from*
<http://jmeter.512774.n5.nabble.com/file/n5715355/s2.png>
I have placed the CSV file in the same folder that my test plan is saved in!
*Screenshot 3 - Shows the HTTP request *
<http://jmeter.512774.n5.nabble.com/file/n5715355/s3.png>
As its name indicates, the field "Server name or IP" should only
contain the server name or its IP address, not the full URL.

However, as a special case you can use the full URL in the Path field,
in which case server name and port are ignored.
Post by gau12
Please help!
Thanks
--
View this message in context: http://jmeter.512774.n5.nabble.com/Trouble-sending-HTTP-request-with-POST-variable-tp5715355.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
ZK
2012-11-21 08:11:44 UTC
Permalink
Hi,
remove the "HTTP://" from the web server field


ZK



--
View this message in context: http://jmeter.512774.n5.nabble.com/Trouble-sending-HTTP-request-with-POST-variable-tp5715355p5715371.html
Sent from the JMeter - User mailing list archive at Nabble.com.

Loading...