Hi Isomorphic,
as the more general "How to use the RESTHandler servlet" usage problem is solved, I'll open this thread for RESTHandler bugs.
I'm using default v11.1p_2017-11-01 BuiltInDS with no changes in FF26 Classic Dev mode with Jetty (to explain how I start the system, this should be server-only).
1) Just calling "http://127.0.0.1:8888/builtinds/sc/RESTHandler/" gives an exception, where I'd expect an error message instead.
2)
http://127.0.0.1:8888/builtinds/sc/R...ler/employees/ is working and fetches the whole DS data
http://127.0.0.1:8888/builtinds/sc/R...er/employees/4 is also working in browser and gets "Charles Madigen"-data
The same URL called from ARC in Chromium 62 (Advanced REST client 10.0.8-stable from the Chrome Web store) as GET request gives this error:
3) http://127.0.0.1:8888/builtinds/sc/R...dler/employees sent as POST from ARC (not useful without further data for an ADD-operation, but it shows the problem) gives you:
4) HTTP POST from ARC to http://127.0.0.1:8888/builtinds/sc/RESTHandler with data
The exception I get is:
Also, one top enclosing <transaction>...</transaction> does not help and results in a different error.
Here I'm not sure <transaction> is the correct root element, I might have read that in an older version of the documentation.
Best regards
Blama
as the more general "How to use the RESTHandler servlet" usage problem is solved, I'll open this thread for RESTHandler bugs.
I'm using default v11.1p_2017-11-01 BuiltInDS with no changes in FF26 Classic Dev mode with Jetty (to explain how I start the system, this should be server-only).
1) Just calling "http://127.0.0.1:8888/builtinds/sc/RESTHandler/" gives an exception, where I'd expect an error message instead.
Code:
java.lang.Exception: The DataSource ID was missing from the request. at com.isomorphic.rpc.RestRequestParser.parseRequest(RestRequestParser.java:565) ......
http://127.0.0.1:8888/builtinds/sc/R...ler/employees/ is working and fetches the whole DS data
http://127.0.0.1:8888/builtinds/sc/R...er/employees/4 is also working in browser and gets "Charles Madigen"-data
The same URL called from ARC in Chromium 62 (Advanced REST client 10.0.8-stable from the Chrome Web store) as GET request gives this error:
Code:
There was an error parsing JSON data Unexpected token < in JSON at position 0
Code:
com.isomorphic.js.parser.TokenMgrError: Lexical error at line 1, column 1. Encountered: "<" (60), after : "" at com.isomorphic.js.parser.JSParserTokenManager.getNextToken(JSParserTokenManager.java:1554) at com.isomorphic.js.parser.JSParser.jj_ntk_f(JSParser.java:1004) at com.isomorphic.js.parser.JSParser.JSDataStructure(JSParser.java:149) at com.isomorphic.js.parser.JSParser.parseDataStruct(JSParser.java:134) at com.isomorphic.js.parser.JSParser.parseDataStruct(JSParser.java:64) at com.isomorphic.js.JSTranslater.fromJS(JSTranslater.java:2143) at com.isomorphic.js.JSTranslater.fromJS(JSTranslater.java:2131) at com.isomorphic.rpc.RestRequestParser.parseRequest(RestRequestParser.java:268) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:392) at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:511) at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:421) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:176) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:247) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:93) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Unknown Source)
Code:
<request> <dataSource>employees</dataSource> <operationType>fetch</operationType> <startRow>0</startRow> <endRow>75</endRow> <textMatchStyle>exact</textMatchStyle> </request> <request> <dataSource>employees</dataSource> <operationType>fetch</operationType> <startRow>75</startRow> <endRow>150</endRow> <textMatchStyle>exact</textMatchStyle> </request>
Code:
com.isomorphic.xml.XMLParsingException: [ "XML parser fatal error: file '(in memory stream)' line 8: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 2; Markup im Dokument nach dem Root-Element muss ordnungsgemäß formatiert sein." ] at com.isomorphic.xml.XML.parseXML(XML.java:354) at com.isomorphic.xml.XML.parseRestrictedXML(XML.java:149) at com.isomorphic.xml.XML.toDSRecords(XML.java:497) at com.isomorphic.xml.XML.toDSRecords(XML.java:493) at com.isomorphic.rpc.RestRequestParser.parseRequest(RestRequestParser.java:261) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:392) at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:511) at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:421) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:176) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:247) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:93) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Unknown Source)
Here I'm not sure <transaction> is the correct root element, I might have read that in an older version of the documentation.
Best regards
Blama
Comment