Forum Discussion
I am seeing the same problem with 5.0.0, have ever got any response to your question.
- droidlooms10 years agoNew Contributor
Created a mock rest service which returns the response based on the content of request. So I created the script under the mock service script editor and trying to read the request line by line. But the line mockRequest.getRequest().getReader().ready() returns false, I have to wait for 8-10 mins before it clears off itself and return true. Its making me to wait for sometime before making another request. I also tried using mockRequest.getRequest().getReader().close() before returning but no use.
- compumimo10 years agoNew Member
I'm having the same problem with SoapUI 5.0.0 (Free) and REST mockservice scripting.
1. This script returns null for the requestContent:
def requestContent = mockRequest.getRequestContent()
log.info "message content: " + requestContent--> Mon Mar 30 11:50:27 EEST 2015:INFO:message content: null
2. This next scripts return the message content in the first time to the script log fine, but in the second time it returns false, as said in the previous comments. I need to restart the REST mockservice, then it works in the first again, but then again in second time it returns false, so something seems to be wrong with the scripts on SoapUI 5.0.0?
try {
log.info mockRequest.getRequest().getReader().ready()
while ((line = mockRequest.getRequest().getReader().readLine()) != null)
log.info("line:" + line);
} catch (Exception e) {
log.error("exception:" + e)
}-->
Mon Mar 30 11:53:01 EEST 2015:INFO:true
Mon Mar 30 11:53:01 EEST 2015:INFO:line:<?xml version="1.0" encoding="UTF-8"?>
Mon Mar 30 11:53:01 EEST 2015:INFO:line:<msg:deliveryInfoNotification xmlns:msg="urn:oma:xml:rest:netapi:messaging:1">
Mon Mar 30 11:53:01 EEST 2015:INFO:line:<deliveryInfo>In second request it is not working anymore:
--> Mon Mar 30 11:49:41 EEST 2015:INFO:false
In error log I can see there error logs:
Mon Mar 30 11:43:51 EEST 2015:ERROR:java.lang.IllegalStateException: READER
java.lang.IllegalStateException: READER
at org.mortbay.jetty.Request.getInputStream(Request.java:718)
at com.eviware.soapui.monitor.JettyMockEngine$MockRequestLog.log(JettyMockEngine.java:797)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:51)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)- maddzy9 years agoOccasional Contributor
I'm having this exact same issue in 5.2.1
Does anyone have a solution?
- viswam_i9 years agoNew Contributor
All,
I am using SOAP UI 5.2.1, seeing the same issue. Anyone has solution for this?
- naveedw8 years agoSenior Member
Try this:
mockRequest.getRequest().getReader().reset()
Related Content
- 8 years ago
- 8 years ago
- 12 years ago
Recent Discussions
- 15 years ago