05-27-2016 12:20 AM
I'm having issue setting up data source through the web service tab in Incident Analyzer Enterprise.
I have the error: The CORS "Access-Control-Allow-Origin" header is missing.
Blocage d'une requête multi-origines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://vps161031.ovh.net/erdas-apollo/vector/CENTROIDS_ZONAL15XSEUIL0025MH15M?service=WFS&request=Ge...?. Raison : l'en-tête CORS « Access-Control-Allow-Origin » est manquant.
How can I solve this?
Also i realized that there is an additional ? that is added to the given URL and before the request is send out by the app.
That leads to a wrong request. However I don't think we should only key in the server address since we don't have a field to specify the feature we want etc.
Do you have an example of functionning parameters for this use case?
I will love to see it or have more info on the URL to be given.
I've looked into the help here but couldn't find such info.
Thanks in advance
05-27-2016 06:38 AM
Thank you for your inquiry. Your question has been forwarded to the appropriate individuals and we have requested their feedback. We will reply here with the information they provide.
Hexagon Geospatial Support
05-27-2016 07:29 AM
Incident Analyser development report that what you are seeing is an expected protection mechanism.
They state that:
There’s a process to follow to enable CORS access on the server. Here’s [an] article that helped configure a server to support CORS: http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
Here are the CORS domains that need to be added to the server config:
Please be sure to update this discussion if this fails to resolve the issue, or if you need additional assistance.
Hexagon Geospatial Support
05-27-2016 08:22 AM
Thanks for the answer. I've also find that info but not the domains needed for Incident Analyzer.
However, the thing is that I am trying to use either a Web Service i published through Apollo or some public web services. In both cases, i don't have access to source code.
Does this mean that the app can only talk to servers where these headers have been previously defined?
This is quite limitating i must say.
Can you confirm that there is no workaround?
06-01-2016 06:13 AM
Developer replies to your questions with:
“IA only works with a specific web service format which is outlined in the documentation. It’s expecting data in JSON format and has all the same field requirements as a CSV file (I.e. lat/long, date/time field). The current process is to write a connector that will read the data from a custom source and serve it in a format IA can understand.”
I believe you will hear further regarding possible developer help writing a custom connector.