Hello -- Has there been a "generic" XML adapter created for GeoEvent? Thank you...
Hello Gal -
I'm not seeing any problem with the XML returned from the above URL. The GeoEvent's XML adapter is able to parse it just fine. I've attached illustrations of my 'Receive XML on a REST Endpoint' input configuration and the generated GeoEvent Definition. I chose to have the adapter look specifically for <surface_station> nodes, rather than receiving the <israel_surface_data> structure in as a single event. I used a Chrome Poster plug-in to HTTP / POST the attached XML to the GeoEvent input's REST endpoint.
What I did notice was that, when using a 'Poll an External Website for XML' input, there were errors logged by the HTTP inbound transport to the effect that requests to http://www.ims.gov.il/ims/PublicXML/observ.xml returned an HTTP 406 'Not Acceptable' error.
2015-09-15 11:50:58,156 | ERROR | gov.il/ims/PublicXML/observ.xml] | HttpInboundTransport | nsport.http.HttpInboundTransport 456 | 272 - com.esri.ges.framework.transport.http-transport - 10.3.1 | http://www.ims.gov.il/ims/PublicXML/observ.xml: Request failed (HTTP/1.1 406 Not Acceptable).
I'll ask to see if one of the developers can tell me why the request to your server are being returned as 'Not Acceptable', but it doesn't appear to be an issue with the XML formatting or content.
Did you resolve why you were getting the 406 error?
Have same error when trying to hook into this XML feed
I know I am a bit late to the discussion here but I wanted to provide a response in case someone else comes across this discussion. The issue with the 406 error looks to be due to the acceptable MIME type included in the HTTP request header.
By default, the "Poll An External Website for XML" input connector defines the default acceptable MIME type as "application/xml". This MIME type isn't always defined on the web server and therefore isn't acceptable for (hence the 406). As a result, it is up to us to change the acceptable MIME type to something the external web server recognizes in order to issue a 'successful' request (I emphasize successful since the request is in fact valid.. it's just not what the web server wants or recognizes). With external XML sources, I have had success with changing the acceptable MIME type to text/xml, application/xhtml+xml, etc. I would recommend reviewing the MIME types available for XML and changing the acceptable MIME type in ArcGIS GeoEvent Server from application/xml as needed.
In situations where we have direct access to the web server hosting the XML, a different solution to this problem would be to define the MIME type on the web server to use application/xml (ArcGIS GeoEvent Server's default). In Microsoft IIS for example (installed with the ArcGIS Web Adaptor), we can see that the default MIME type for .xml extensions is text/xml. If we wanted to, we could change the default MIME type in Microsoft IIS from text/xml to application/xml for .xml extensions. With this change in place, we wouldn't need to adjust the acceptable MIME type default in ArcGIS GeoEvent Server (however we could if we wanted to hence the previous paragraph).
The key takeaway here is to pay close attention to the MIME types being used. Sometimes what ArcGIS GeoEvent Server uses by default isn't what the web server recognizes and vice versa. Hope this helps!
Retrieving data ...