REST Query doesnt accept single quotes

1
Hi, I am trying to call a REST service using the following URL: http://mobileproxy.superp.nl/sap/opu/odata/sap/HCM_TIMESHEET_MAN_SRV/TimeDataList?$filter= StartDate eq '20170828' and EndDate eq '20170828'&sap-client=001 the call works perfectly fine when entered in the browser.  When I try to use the call in de Call Rest function within mendix it doesn't accept the quotes and throws an error.   An error has occurred while handling the request. [User 'demo_mechanic' with session id '5e868e7c-2402-489a-8f42-435fdfff3227' and roles 'Mechanic'] -------- com.mendix.modules.microflowengine.MicroflowException: Illegal character in query at index 90: http://mobileproxy.superp.nl/sap/opu/odata/sap/HCM_TIMESHEET_MAN_SRV/TimeDataList?$filter= StartDate eq '20170828' and EndDate eq '20170828'&sap-client=001     at TimeRegistration.SF_GetTimeDataList (CallRest : 'Call REST (GET)')     at TimeRegistration.IVK_NextWeek (SubMicroflow : 'SF_GetTimeDataList') Advanced stacktrace:     at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:144) Caused by: java.lang.IllegalArgumentException: Illegal character in query at index 90: http://mobileproxy.superp.nl/sap/opu/odata/sap/HCM_TIMESHEET_MAN_SRV/TimeDataList?$filter= StartDate eq '20170828' and EndDate eq '20170828'&sap-client=001     at java.net.URI.create(URI.java:852)     at com.mendix.http.HttpLocation.toUri(HttpLocation.scala:24)     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:40)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:655)     at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:577)     at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:315)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:300)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:300)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.basis.actionmanagement.IMonitoredAction$class.monitor(IMonitoredAction.scala:49)     at com.mendix.webui.requesthandling.ClientRequestHandler$ClientMonitoredAction.monitor(ClientRequestHandler.scala:418)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:300)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleActionWithSessionRequired(ClientRequestHandler.scala:238)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:205)     at com.mendix.webui.requesthandling.ClientRequestHandler.liftedTree1$1(ClientRequestHandler.scala:104)     at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:96)     at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:70)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:67)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73)     at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:876)     at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.handle(RuntimeHandler.java:41)     at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)     at org.eclipse.jetty.server.Server.handle(Server.java:368)     at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)     at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)     at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)     at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)     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:628)     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(Thread.java:745) Caused by: java.net.URISyntaxException: Illegal character in query at index 90: http://mobileproxy.superp.nl/sap/opu/odata/sap/HCM_TIMESHEET_MAN_SRV/TimeDataList?$filter= StartDate eq '20170828' and EndDate eq '20170828'&sap-client=001     at java.net.URI$Parser.fail(URI.java:2848)     at java.net.URI$Parser.checkChars(URI.java:3021)     at java.net.URI$Parser.parseHierarchical(URI.java:3111)     at java.net.URI$Parser.parse(URI.java:3053)     at java.net.URI.<init>(URI.java:588)     at java.net.URI.create(URI.java:850)     at com.mendix.http.HttpLocation.toUri(HttpLocation.scala:24)     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:40)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:655)     at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:577)     at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:315)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:300)     at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:300)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.basis.actionmanagement.IMonitoredAction$class.monitor(IMonitoredAction.scala:49)     at com.mendix.webui.requesthandling.ClientRequestHandler$ClientMonitoredAction.monitor(ClientRequestHandler.scala:418)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:300)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleActionWithSessionRequired(ClientRequestHandler.scala:238)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:205)     at com.mendix.webui.requesthandling.ClientRequestHandler.liftedTree1$1(ClientRequestHandler.scala:104)     at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:96)     at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:70)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:67)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)     at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73)     at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:876)     at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.handle(RuntimeHandler.java:41)     at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)     at org.eclipse.jetty.server.Server.handle(Server.java:368)     at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)     at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)     at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)     at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)     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:628)     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(Thread.java:745)    
asked
1 answers
8

HP,

Try to URLencode your whole endpoint or maybe only the single quote only works; http://mobileproxy.superp.nl/sap/opu/odata/sap/HCM_TIMESHEET_MAN_SRV/TimeDataList?$filter= StartDate eq %2720170828%27 and EndDate eq %2720170828%27&sap-client=001

answered