简体   繁体   中英

Sending xml content with http header using Apache Jmeter

I am trying to send one xml file content by pasting in Post Body section of HTTP Request along with two headers in HTTP Header Manager using Apache Jmeter2.8.The response should be another xml file,but the response data is showing xml parsing error. I am getting following in the sampler result section

Thread Name: SOS_Secured_SOS_Local 1-1
Sample Start: 2013-01-11 17:22:25 GMT+05:30
Load time: 746
Latency: 746
Size in bytes: 21586
Headers size in bytes: 256
Body size in bytes: 21330
Sample Count: 1
Error Count: 0
Response code: 200
Response message: OK

Response headers:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: Content-Type
Content-Type: text/xml
Content-Length: 21330
Date: Fri, 11 Jan 2013 11:52:26 GMT


HTTPSampleResult fields:
ContentType: text/xml
DataEncoding: null

But the Response Data section is showing the following-

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsAll.xsd" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ows:Exception exceptionCode="MissingParameterValue">
    <ows:ExceptionText>Premature end of file.</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Does anyone have idea what may the solution for this?

I guess the parameters you have put in Header Manager should be in path like this:

/path?param1=value1&param2=value2

Unfortunately without a screenshot of your configuration it's hard to be sure it's the answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM