0
votes

I am trying to test a soap service using Jmeter. The service is giving proper results when SOAP/XML-RPC Request element is used. It gives proper response(Response code 200) when executed using Fiddler.

But when I run the same service on Jmeter using Http Request. It returns response code as 500 and gives

"Request format is invalid: text/xml."

This in response data. I have tried changing it to many formats like "application/xml" etc but of no use.

enter image description here

[HTTP_Request][2][soap-rpc][3]

soap_error2

3

3 Answers

1
votes

Did you set a Header Manager under your request that contains :

Content-Type : application/soap+xml; charset=utf-8

1
votes
  1. Inspect what requests are being sent using Request tab of the View Results Tree listener for both SOAP/XML-RPC and HTTP Request samplers. Detect any differences and apply the proper configuration so requests would be identical.
  2. Add HTTP Header Manager as a child of the HTTP Request sampler and make sure it's configured to send the following headers:

    • Content-Type - text/xml
    • SOAPAction - required SOAPAction header value. The value may be blank.

References:

0
votes

Well, I understood what was causing the problem and have rectified it. In the Path field of HTTP request, i had put the name of the web method(which was not needed so i removed it) i.e. suppose my url is 172.1.1.1:8082/abc.asmx/method so in the path , i mentioned only "/abc.asmx" and it worked.