dseel
15 years agoContributor
POST with no body causes 'Unexpected end of file after null'
Hi:
I'm using SOAPUI Pro 3.5.1 to run a REST mock service using a groovy script in the OnRequest tab. When I send a normal POST request to the mock service, everything works fine. However, if I send a POST that has no content at all (application/x-www-form-urlencoded, or any other content type) the mock service returns this error:
HTTP/1.1 500 Internal Server Error\r\n
Content-Type: text/html; charset=iso-8859-1\r\n
Transfer-Encoding: chunked\r\n
Server: Jetty(6.1.x)\r\n
\r\n
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">\r\n
<soapenv:Body>\r\n
<soapenv:Fault>\r\n
<faultcode>Server</faultcode>\r\n
<faultstring>org.apache.xmlbeans.XmlException: error: Unexpected end of file after null</faultstring>\r\n
</soapenv:Fault>\r\n
</soapenv:Body>\r\n
</soapenv:Envelope>
Even if I comment out everything in the OnRequest tab of the Mock Service, I still get this error. I do *not* have 'Enable Mock HTTP Log' enabled in preferences, as I noticed on the forums that this could cause this error as well.
Please let me know if there is a workaround or if it can be fixed.
Thanks,
Dave
I'm using SOAPUI Pro 3.5.1 to run a REST mock service using a groovy script in the OnRequest tab. When I send a normal POST request to the mock service, everything works fine. However, if I send a POST that has no content at all (application/x-www-form-urlencoded, or any other content type) the mock service returns this error:
HTTP/1.1 500 Internal Server Error\r\n
Content-Type: text/html; charset=iso-8859-1\r\n
Transfer-Encoding: chunked\r\n
Server: Jetty(6.1.x)\r\n
\r\n
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">\r\n
<soapenv:Body>\r\n
<soapenv:Fault>\r\n
<faultcode>Server</faultcode>\r\n
<faultstring>org.apache.xmlbeans.XmlException: error: Unexpected end of file after null</faultstring>\r\n
</soapenv:Fault>\r\n
</soapenv:Body>\r\n
</soapenv:Envelope>
Even if I comment out everything in the OnRequest tab of the Mock Service, I still get this error. I do *not* have 'Enable Mock HTTP Log' enabled in preferences, as I noticed on the forums that this could cause this error as well.
Please let me know if there is a workaround or if it can be fixed.
Thanks,
Dave