I have a HTTP Request Sampler in my test plan. I have given my server name or IP, port and url. I chose the Body Data tab and gave an XML request in this way:
None
ABC
XYZ
However, this what I am getting back the following as the Sampler result:
Response code: Non HTTP response code: java.net.ConnectException
Response message: Non HTTP response message: Connection refused
Response headers:
HTTPSampleResult fields:
ContentType:
DataEncoding: null
I have made sure that I can ping my server. Its up and running.
Is there something else that I am missing here?
Thanks in advance!
解决方案
I find it the easiest to just use a SOAP/XML-RPC Request for this kind of stuff. Simply enter the XML you want to send and the URL and make sure that Send SOAPAction is unchecked if you're not using it.
The problem you're having seems to be unrelated though. It looks like JMeter can't get a connection to the server. You should try it manually by using your browser and going to the URL you want to send the XML to. You should at least get a 400 error. "Connection Refused" looks more like the server isn't running.