Skip to main content
Question

Importing Odata feed with HTTPS URL


Whenever I try to import data using an Odata reader, I get the following error:

A potentially dangerous Request.Path value was detected from the client (:).Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 

This is the link ( https://opendata.cbs.nl/ODataFeed/odata/81573NED )

I'm able to specify the right tables in the parameters, so there is nothing wrong with the URL. It also works when i try this link in other software as Excel.

Does it have something to do with the fact that is an 'https' url instead of 'http'? Because this URL works http://services.odata.org/Odata/Odata.svc

Anybody have any experience with this? Or has any ideas?

Thanks in Advance!

Niels

3 replies

  • October 5, 2018

I am running into the same issue. Does anyone know a solution?

 

@niels606?

  • October 5, 2018

Some additional information. I use the same kind of URL as @niels606 since it is our national statistics center.

After enabling debug logging in FME it seems that a request is made to: "http://opendata.cbs.nl/ODataApi/odata/83523NED/TypedDataSet?$top=1000&$skip=0"." target="_blank">https://opendata.cbs.nl/ODataApi/odata/83523NED/http://opendata.cbs.nl/ODataApi/odata/83523NED/TypedDataSet?$top=1000&$skip=0". FME prepends the url with the base url of the feature reader, which is why the website CBS responds that there is a faulty ":" in the url.

See more debugging information:

DEBUG: Configured logging for ODataReader
DEBUG: ODataReader.open('https://opendata.cbs.nl/ODataApi/odata/83523NED', [])
DEBUG: ODataCommon __init__()
DEBUG: Inspecting mapping file
DEBUG: Feature Geometry Priority: 'none'
DEBUG: Feature Type(s): 'TypedDataSet,UntypedDataSet'
OData Reader: Performing client-side pagination with 1000 features per request
DEBUG: DEF line: ODATA_2_DEF TypedDataSet odata_type odata_none fme_attribute_reading defined ID int32 RegioS string ...
DEBUG: Attributes: ID RegioS Perioden BeroepsEnNietBeroepsbevolking_1 Beroepsbevolking_2 WerkzameBeroepsbevolking_3 ...
DEBUG: Options: odata_type fme_attribute_reading
DEBUG: DEF line: ODATA_2_DEF UntypedDataSet odata_type odata_none fme_attribute_reading defined ID int32 RegioS ...
DEBUG: Attributes: ID RegioS Perioden BeroepsEnNietBeroepsbevolking_1 Beroepsbevolking_2 WerkzameBeroepsbevolking_3 ...
DEBUG: Options: odata_type fme_attribute_reading
DEBUG: No username or password supplied. Authentication will not be performed
FME API version of module 'NULL' matches current internal version (3.8 20180209)
FME API version of module 'NULL' matches current internal version (3.8 20180209)
Loaded module 'LogCount_func' from file 'C:\Program Files\FME\plugins/LogCount_func.dll'
FME API version of module 'LogCount_func' matches current internal version (3.8 20180209)
Loaded module 'InspectorFactory' from file 'C:\Program Files\FME\plugins/InspectorFactory.dll'
FME API version of module 'InspectorFactory' matches current internal version (3.8 20180209)
FME API version of module 'InspectorFactory' matches current internal version (3.8 20180209)
DEBUG: URL with appended params: https://opendata.cbs.nl/ODataApi/odata/83523NED
DEBUG: URL with appended params: https://opendata.cbs.nl/ODataApi/odata/83523NED/$metadata
DEBUG: Intersected attributes to be read: 'set(['BeroepsEnNietBeroepsbevolking_1', 'Beroepsbevolking_2', 'WerkzameBeroepsbevolking_3', 'PositieInDeWerkkringOnbekend_6', 'Werkloosheidspercentage_13', 'RegioS', 'Beroepsniveau2_8', 'Beroepsniveau4_10', 'Beroepsniveau3_9', 'Zelfstandige_5', 'WerklozeBeroepsbevolking_12', 'Werknemer_4', 'NietBeroepsbevolking_14', 'Beroepsniveau1_7', 'BeroepsniveauOnbekend_11', 'ID', 'BrutoArbeidsparticipatie_15', 'NettoArbeidsparticipatie_16', 'Perioden'])'
DEBUG: URL with appended params: https://opendata.cbs.nl/ODataApi/odata/83523NED
DEBUG: Fetching 1000 features after 0
DEBUG: URL with appended params: http://opendata.cbs.nl/ODataApi/odata/83523NED/TypedDataSet?$top=1000&$skip=0" target="_blank">https://opendata.cbs.nl/ODataApi/odata/83523NED/http://opendata.cbs.nl/ODataApi/odata/83523NED/TypedDataSet?$top=1000&$skip=0
OData Reader: HTTP error response could not be parsed. The raw error response was: '<!DOCTYPE html> <html> <head> <title>A potentially dangerous Request.Path value was detected from the client (:).</title> <meta name="viewport" content="width=device-width" /> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5pxb {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5pxH1 font-family:"Verdana";font-weight:normal;font-size:18pt;color:red H2 font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt.marker {font-weight: boldcolor: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable text-decoration:underlinefont-weight:boldcolor:navycursor:hand} @media screen and (max-width: 639px) pre width: 440pxoverflow: autowhite-space: pre-wrapword-wrap: break-word} } @media screen and (max-width: 479px) pre width: 280px} } </style> </head> <body bgcolor="white"> <span><H1>Server Error in '/ODataApi' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>A potentially dangerous Request.Path value was detected from the client (:).</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br><br> <b> Exception Details: </b>System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (:).<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code> An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code> </td> </tr> </table> <br> <b>Stack Trace:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code><pre> [HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (:).] System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +12407047 System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +166 </pre></code> </td> </tr> </table> <br> <hr width=100% size=1 color=silver> <b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36430 </font> </body> </html> <!-- [HttpException]: A potentially dangerous Request.Path value was detected from the client (:). at System.Web.HttpRequest.ValidateInputIfRequiredByConfig() at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->'
OData Reader: Client error was received: '400'. The error message was: ''
BADNEWS: A fatal error has occurred. Check the logfile above for details (dynaread.cpp:245)
A fatal error has occurred. Check the logfile above for details
(stftrans.cpp:293) - (simptran.cpp:777) - (stftrans.cpp:323) - (readrimp.cpp:1147) - (readrimp.cpp:1511) - (readrimp.cpp:1767) - (readrimp.cpp:1898) - (readrimp.cpp:1147) - (readrimp.cpp:1511) - (readrimp.cpp:1767) - (readrimp.cpp:1898) - (dynaread.cpp:245)

 


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • January 12, 2019

Hi @tjaad and @niels606,

You can use a XML reader pointing to the different XML elements to read the data into a workspace.

For example https://opendata.cbs.nl/ODataFeed/odata/81573NED/TableInfos with the following element to match feed/entry will return the data schema of the service.

Hope this helps.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings